зеркало из
https://github.com/glebtv/telegram-bot.git
synced 2026-09-07 19:35:52 +03:00
Add answer_shipping_query helper
Этот коммит содержится в:
@@ -229,6 +229,8 @@ def reply_with(type, params); end
|
|||||||
def answer_inline_query(results, params = {}); end
|
def answer_inline_query(results, params = {}); end
|
||||||
def answer_callback_query(text, params = {}); end
|
def answer_callback_query(text, params = {}); end
|
||||||
def edit_message(type, params = {}); end
|
def edit_message(type, params = {}); end
|
||||||
|
def answer_pre_checkout_query(ok, params = {}); end
|
||||||
|
def answer_shipping_query(ok, params = {}); end
|
||||||
```
|
```
|
||||||
|
|
||||||
#### Optional typecasting
|
#### Optional typecasting
|
||||||
|
|||||||
@@ -21,7 +21,7 @@ module Telegram
|
|||||||
respond_with(type, params)
|
respond_with(type, params)
|
||||||
end
|
end
|
||||||
|
|
||||||
# Same as reply_with, but for inline queries.
|
# Same as respond_with, but for inline queries.
|
||||||
def answer_inline_query(results, params = {})
|
def answer_inline_query(results, params = {})
|
||||||
params = params.merge(
|
params = params.merge(
|
||||||
inline_query_id: payload['id'],
|
inline_query_id: payload['id'],
|
||||||
@@ -30,7 +30,7 @@ module Telegram
|
|||||||
bot.answer_inline_query(params)
|
bot.answer_inline_query(params)
|
||||||
end
|
end
|
||||||
|
|
||||||
# Same as reply_with, but for callback queries.
|
# Same as respond_with, but for callback queries.
|
||||||
def answer_callback_query(text, params = {})
|
def answer_callback_query(text, params = {})
|
||||||
params = params.merge(
|
params = params.merge(
|
||||||
callback_query_id: payload['id'],
|
callback_query_id: payload['id'],
|
||||||
@@ -39,7 +39,7 @@ module Telegram
|
|||||||
bot.answer_callback_query(params)
|
bot.answer_callback_query(params)
|
||||||
end
|
end
|
||||||
|
|
||||||
# Same as reply_with, but for pre checkout queries.
|
# Same as respond_with, but for pre checkout queries.
|
||||||
def answer_pre_checkout_query(ok, params = {})
|
def answer_pre_checkout_query(ok, params = {})
|
||||||
params = params.merge(
|
params = params.merge(
|
||||||
pre_checkout_query_id: payload['id'],
|
pre_checkout_query_id: payload['id'],
|
||||||
@@ -48,6 +48,14 @@ module Telegram
|
|||||||
bot.answer_pre_checkout_query(params)
|
bot.answer_pre_checkout_query(params)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def answer_shipping_query(ok, params = {})
|
||||||
|
params = params.merge(
|
||||||
|
shipping_query_id: payload['id'],
|
||||||
|
ok: ok,
|
||||||
|
)
|
||||||
|
bot.answer_shipping_query(params)
|
||||||
|
end
|
||||||
|
|
||||||
# Edit message from callback query.
|
# Edit message from callback query.
|
||||||
def edit_message(type, params = {})
|
def edit_message(type, params = {})
|
||||||
params =
|
params =
|
||||||
|
|||||||
Ссылка в новой задаче
Block a user