mirror of
https://github.com/aiogram/aiogram.git
synced 2026-04-08 16:37:47 +00:00
feature: add aliases for InaccessibleMessage type
This commit is contained in:
parent
fb1e5cad59
commit
ad943d0028
3 changed files with 3723 additions and 4 deletions
275
.butcher/types/InaccessibleMessage/aliases.yml
Normal file
275
.butcher/types/InaccessibleMessage/aliases.yml
Normal file
|
|
@ -0,0 +1,275 @@
|
|||
answer:
|
||||
method: sendMessage
|
||||
code: &assert-chat |
|
||||
assert self.chat is not None, "This method can be used only if chat is present in the message."
|
||||
fill: &fill-answer
|
||||
chat_id: self.chat.id
|
||||
|
||||
reply:
|
||||
method: sendMessage
|
||||
code: *assert-chat
|
||||
fill: &fill-reply
|
||||
<<: *fill-answer
|
||||
reply_parameters: self.as_reply_parameters()
|
||||
ignore: &ignore-reply
|
||||
- reply_to_message_id
|
||||
|
||||
answer_animation:
|
||||
method: sendAnimation
|
||||
code: *assert-chat
|
||||
fill: *fill-answer
|
||||
|
||||
reply_animation:
|
||||
method: sendAnimation
|
||||
code: *assert-chat
|
||||
fill: *fill-reply
|
||||
ignore: *ignore-reply
|
||||
|
||||
answer_audio:
|
||||
method: sendAudio
|
||||
code: *assert-chat
|
||||
fill: *fill-answer
|
||||
|
||||
reply_audio:
|
||||
method: sendAudio
|
||||
code: *assert-chat
|
||||
fill: *fill-reply
|
||||
ignore: *ignore-reply
|
||||
|
||||
answer_contact:
|
||||
method: sendContact
|
||||
code: *assert-chat
|
||||
fill: *fill-answer
|
||||
|
||||
reply_contact:
|
||||
method: sendContact
|
||||
code: *assert-chat
|
||||
fill: *fill-reply
|
||||
ignore: *ignore-reply
|
||||
|
||||
answer_document:
|
||||
method: sendDocument
|
||||
code: *assert-chat
|
||||
fill: *fill-answer
|
||||
|
||||
reply_document:
|
||||
method: sendDocument
|
||||
code: *assert-chat
|
||||
fill: *fill-reply
|
||||
ignore: *ignore-reply
|
||||
|
||||
answer_game:
|
||||
method: sendGame
|
||||
code: *assert-chat
|
||||
fill: *fill-answer
|
||||
|
||||
reply_game:
|
||||
method: sendGame
|
||||
code: *assert-chat
|
||||
fill: *fill-reply
|
||||
ignore: *ignore-reply
|
||||
|
||||
answer_invoice:
|
||||
method: sendInvoice
|
||||
code: *assert-chat
|
||||
fill: *fill-answer
|
||||
|
||||
reply_invoice:
|
||||
method: sendInvoice
|
||||
code: *assert-chat
|
||||
fill: *fill-reply
|
||||
ignore: *ignore-reply
|
||||
|
||||
answer_location:
|
||||
method: sendLocation
|
||||
code: *assert-chat
|
||||
fill: *fill-answer
|
||||
|
||||
reply_location:
|
||||
method: sendLocation
|
||||
code: *assert-chat
|
||||
fill: *fill-reply
|
||||
ignore: *ignore-reply
|
||||
|
||||
answer_media_group:
|
||||
method: sendMediaGroup
|
||||
code: *assert-chat
|
||||
fill: *fill-answer
|
||||
|
||||
reply_media_group:
|
||||
method: sendMediaGroup
|
||||
code: *assert-chat
|
||||
fill: *fill-reply
|
||||
ignore: *ignore-reply
|
||||
|
||||
answer_photo:
|
||||
method: sendPhoto
|
||||
code: *assert-chat
|
||||
fill: *fill-answer
|
||||
|
||||
reply_photo:
|
||||
method: sendPhoto
|
||||
code: *assert-chat
|
||||
fill: *fill-reply
|
||||
ignore: *ignore-reply
|
||||
|
||||
answer_poll:
|
||||
method: sendPoll
|
||||
code: *assert-chat
|
||||
fill: *fill-answer
|
||||
|
||||
reply_poll:
|
||||
method: sendPoll
|
||||
code: *assert-chat
|
||||
fill: *fill-reply
|
||||
ignore: *ignore-reply
|
||||
|
||||
answer_dice:
|
||||
method: sendDice
|
||||
code: *assert-chat
|
||||
fill: *fill-answer
|
||||
|
||||
reply_dice:
|
||||
method: sendDice
|
||||
code: *assert-chat
|
||||
fill: *fill-reply
|
||||
ignore: *ignore-reply
|
||||
|
||||
answer_sticker:
|
||||
method: sendSticker
|
||||
code: *assert-chat
|
||||
fill: *fill-answer
|
||||
|
||||
reply_sticker:
|
||||
method: sendSticker
|
||||
code: *assert-chat
|
||||
fill: *fill-reply
|
||||
ignore: *ignore-reply
|
||||
|
||||
answer_venue:
|
||||
method: sendVenue
|
||||
code: *assert-chat
|
||||
fill: *fill-answer
|
||||
|
||||
reply_venue:
|
||||
method: sendVenue
|
||||
code: *assert-chat
|
||||
fill: *fill-reply
|
||||
ignore: *ignore-reply
|
||||
|
||||
answer_video:
|
||||
method: sendVideo
|
||||
code: *assert-chat
|
||||
fill: *fill-answer
|
||||
|
||||
reply_video:
|
||||
method: sendVideo
|
||||
code: *assert-chat
|
||||
fill: *fill-reply
|
||||
ignore: *ignore-reply
|
||||
|
||||
answer_video_note:
|
||||
method: sendVideoNote
|
||||
code: *assert-chat
|
||||
fill: *fill-answer
|
||||
|
||||
reply_video_note:
|
||||
method: sendVideoNote
|
||||
code: *assert-chat
|
||||
fill: *fill-reply
|
||||
ignore: *ignore-reply
|
||||
|
||||
answer_voice:
|
||||
method: sendVoice
|
||||
code: *assert-chat
|
||||
fill: *fill-answer
|
||||
|
||||
reply_voice:
|
||||
method: sendVoice
|
||||
code: *assert-chat
|
||||
fill: *fill-reply
|
||||
ignore: *ignore-reply
|
||||
|
||||
answer_paid_media:
|
||||
method: sendPaidMedia
|
||||
code: *assert-chat
|
||||
fill: *fill-answer
|
||||
|
||||
reply_paid_media:
|
||||
method: sendPaidMedia
|
||||
code: *assert-chat
|
||||
fill: *fill-reply
|
||||
ignore: *ignore-reply
|
||||
|
||||
copy_to:
|
||||
method: copyMessage
|
||||
code: *assert-chat
|
||||
fill:
|
||||
from_chat_id: self.chat.id
|
||||
message_id: self.message_id
|
||||
|
||||
forward:
|
||||
method: forwardMessage
|
||||
code: *assert-chat
|
||||
fill:
|
||||
from_chat_id: self.chat.id
|
||||
message_id: self.message_id
|
||||
|
||||
edit_text:
|
||||
method: editMessageText
|
||||
code: *assert-chat
|
||||
fill: &message-target
|
||||
chat_id: self.chat.id
|
||||
message_id: self.message_id
|
||||
|
||||
edit_media:
|
||||
method: editMessageMedia
|
||||
fill: *message-target
|
||||
code: *assert-chat
|
||||
|
||||
edit_reply_markup:
|
||||
method: editMessageReplyMarkup
|
||||
code: *assert-chat
|
||||
fill: *message-target
|
||||
|
||||
delete_reply_markup:
|
||||
method: editMessageReplyMarkup
|
||||
code: *assert-chat
|
||||
fill:
|
||||
<<: *message-target
|
||||
reply_markup: None
|
||||
|
||||
edit_live_location:
|
||||
method: editMessageLiveLocation
|
||||
code: *assert-chat
|
||||
fill: *message-target
|
||||
|
||||
stop_live_location:
|
||||
method: stopMessageLiveLocation
|
||||
code: *assert-chat
|
||||
fill: *message-target
|
||||
|
||||
edit_caption:
|
||||
method: editMessageCaption
|
||||
code: *assert-chat
|
||||
fill: *message-target
|
||||
|
||||
delete:
|
||||
method: deleteMessage
|
||||
code: *assert-chat
|
||||
fill: *message-target
|
||||
|
||||
pin:
|
||||
method: pinChatMessage
|
||||
code: *assert-chat
|
||||
fill: *message-target
|
||||
|
||||
unpin:
|
||||
method: unpinChatMessage
|
||||
code: *assert-chat
|
||||
fill: *message-target
|
||||
|
||||
react:
|
||||
method: setMessageReaction
|
||||
code: *assert-chat
|
||||
fill: *message-target
|
||||
File diff suppressed because it is too large
Load diff
|
|
@ -1467,7 +1467,7 @@ class Message(MaybeInaccessibleMessage):
|
|||
|
||||
:param title: Product name, 1-32 characters
|
||||
:param description: Product description, 1-255 characters
|
||||
:param payload: Bot-defined invoice payload, 1-128 bytes. This will not be displayed to the user, use for your internal processes.
|
||||
:param payload: Bot-defined invoice payload, 1-128 bytes. This will not be displayed to the user, use it for your internal processes.
|
||||
:param currency: Three-letter ISO 4217 currency code, see `more on currencies <https://core.telegram.org/bots/payments#supported-currencies>`_. Pass 'XTR' for payments in `Telegram Stars <https://t.me/BotNews/90>`_.
|
||||
:param prices: Price breakdown, a JSON-serialized list of components (e.g. product price, tax, discount, delivery cost, delivery tax, bonus, etc.). Must contain exactly one item for payments in `Telegram Stars <https://t.me/BotNews/90>`_.
|
||||
:param provider_token: Payment provider token, obtained via `@BotFather <https://t.me/botfather>`_. Pass an empty string for payments in `Telegram Stars <https://t.me/BotNews/90>`_.
|
||||
|
|
@ -1582,7 +1582,7 @@ class Message(MaybeInaccessibleMessage):
|
|||
|
||||
:param title: Product name, 1-32 characters
|
||||
:param description: Product description, 1-255 characters
|
||||
:param payload: Bot-defined invoice payload, 1-128 bytes. This will not be displayed to the user, use for your internal processes.
|
||||
:param payload: Bot-defined invoice payload, 1-128 bytes. This will not be displayed to the user, use it for your internal processes.
|
||||
:param currency: Three-letter ISO 4217 currency code, see `more on currencies <https://core.telegram.org/bots/payments#supported-currencies>`_. Pass 'XTR' for payments in `Telegram Stars <https://t.me/BotNews/90>`_.
|
||||
:param prices: Price breakdown, a JSON-serialized list of components (e.g. product price, tax, discount, delivery cost, delivery tax, bonus, etc.). Must contain exactly one item for payments in `Telegram Stars <https://t.me/BotNews/90>`_.
|
||||
:param provider_token: Payment provider token, obtained via `@BotFather <https://t.me/botfather>`_. Pass an empty string for payments in `Telegram Stars <https://t.me/BotNews/90>`_.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue