Unterstützung für Callback_Querys, allerdings weiß ich nicht, ob mir die aktuelle Lösung gefällt. Mal ne Nacht drüber schlafen.
This commit is contained in:
@ -52,11 +52,12 @@ end
|
||||
|
||||
-- NOTE: Telegram currently only allows file uploads up to 50 MB
|
||||
-- https://core.telegram.org/bots/api#sendphoto
|
||||
function utilities:send_photo(chat_id, file, text, reply_to_message_id)
|
||||
function utilities:send_photo(chat_id, file, text, reply_to_message_id, reply_markup )
|
||||
local output = bindings.request(self, 'sendPhoto', {
|
||||
chat_id = chat_id,
|
||||
caption = text or nil,
|
||||
reply_to_message_id = reply_to_message_id
|
||||
reply_to_message_id = reply_to_message_id,
|
||||
reply_markup = reply_markup
|
||||
}, {photo = file} )
|
||||
os.remove(file)
|
||||
print("Deleted: "..file)
|
||||
@ -149,6 +150,15 @@ function utilities:send_typing(chat_id, action)
|
||||
} )
|
||||
end
|
||||
|
||||
-- https://core.telegram.org/bots/api#answercallbackquery
|
||||
function utilities:answer_callback_query(callback, text, show_alert)
|
||||
return bindings.request(self, 'answerCallbackQuery', {
|
||||
callback_query_id = callback.id,
|
||||
text = text,
|
||||
show_alert = show_alert
|
||||
} )
|
||||
end
|
||||
|
||||
-- get the indexed word in a string
|
||||
function utilities.get_word(s, i)
|
||||
s = s or ''
|
||||
|
Reference in New Issue
Block a user