Quotes: InlineKeyboard + Error-Handling, wenn keine Zitate vorhanden
This commit is contained in:
parent
570e054253
commit
81827df897
@ -75,7 +75,7 @@ function quotes:list_quotes(msg)
|
|||||||
text = text..num..") "..quote..'\n'
|
text = text..num..") "..quote..'\n'
|
||||||
end
|
end
|
||||||
if not text or text == "" then
|
if not text or text == "" then
|
||||||
return 'Es wurden noch keine Zitate gespeichert.\nSpeichere doch welche mit !addquote [Zitat]'
|
return '*Es wurden noch keine Zitate gespeichert.*\nSpeichere doch welche mit `/addquote [Zitat]`', true
|
||||||
else
|
else
|
||||||
return upload(text)
|
return upload(text)
|
||||||
end
|
end
|
||||||
@ -99,10 +99,10 @@ function quotes:action(msg, config, matches)
|
|||||||
elseif matches[1] == "listquotes" then
|
elseif matches[1] == "listquotes" then
|
||||||
local link, iserror = quotes:list_quotes(msg)
|
local link, iserror = quotes:list_quotes(msg)
|
||||||
if iserror then
|
if iserror then
|
||||||
utilities.send_reply(self, msg, link)
|
utilities.send_reply(self, msg, link, true)
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
utilities.send_reply(self, msg, '[Lise aller Zitate auf Paste.ee ansehen]('..link..')', true)
|
utilities.send_reply(self, msg, 'Ich habe eine Liste aller Zitate hochgeladen.', false, '{"inline_keyboard":[[{"text":"Alle Zitate abrufen","url":"'..link..'"}]]}')
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
utilities.send_reply(self, msg, quotes.doc, true)
|
utilities.send_reply(self, msg, quotes.doc, true)
|
||||||
|
Reference in New Issue
Block a user