Add missing shortcuts, new enums, reworked old stuff (#1070)

* Render shortcuts

* Render docs

* Added enumerations

* Added docs

* Use enums, removed Helper

* Bump butcher

* Added InputMediaType enum

* Added MaskPositionPoint, InlineQueryResultType enums

* Update texts

* Added StickerType enum

* Cover tests

* Update docs

* Fixed imports

* Re-enabled all pre-commit hooks
This commit is contained in:
Alex Root Junior 2022-12-04 03:05:49 +02:00 committed by GitHub
parent 3438d2446d
commit 3ea73fbbbd
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
370 changed files with 19735 additions and 8380 deletions

View file

@ -0,0 +1,4 @@
answer:
method: answerCallbackQuery
fill:
callback_query_id: self.id

View file

@ -1,108 +1,108 @@
#ban_sender_chat:
# method: banChatSenderChat
# fill: &self
# chat_id: self.id
#
#unban_sender_chat:
# method: unbanChatSenderChat
# fill: *self
#
#get_administrators:
# method: getChatAdministrators
# fill: *self
#
#delete_message:
# method: deleteMessage
# fill: *self
#
#revoke_invite_link:
# method: revokeChatInviteLink
# fill: *self
#
#edit_invite_link:
# method: editChatInviteLink
# fill: *self
#
#create_invite_link:
# method: createChatInviteLink
# fill: *self
#
#export_invite_link:
# method: exportChatInviteLink
# fill: *self
#
#do:
# method: sendChatAction
# fill: *self
#
#delete_sticker_set:
# method: deleteChatStickerSet
# fill: *self
#
#set_sticker_set:
# method: setChatStickerSet
# fill: *self
#
#get_member:
# method: getChatMember
# fill: *self
#
#get_member_count:
# method: getChatMemberCount
# fill: *self
#
#leave:
# method: leaveChat
# fill: *self
#
#unpin_all_messages:
# method: unpinAllChatMessages
# fill: *self
#
#unpin_message:
# method: unpinChatMessage
# fill: *self
#
#pin_message:
# method: pinChatMessage
# fill: *self
#
#set_administrator_custom_title:
# method: setChatAdministratorCustomTitle
# fill: *self
#
#set_permissions:
# method: setChatPermissions
# fill: *self
#
#promote:
# method: promoteChatMember
# fill: *self
#
#restrict:
# method: restrictChatMember
# fill: *self
#
#unban:
# method: unbanChatMember
# fill: *self
#
#ban:
# method: banChatMember
# fill: *self
#
#set_description:
# method: setChatDescription
# fill: *self
#
#set_title:
# method: setChatTitle
# fill: *self
#
#delete_photo:
# method: deleteChatPhoto
# fill: *self
#
#set_photo:
# method: setChatPhoto
# fill: *self
ban_sender_chat:
method: banChatSenderChat
fill: &self
chat_id: self.id
unban_sender_chat:
method: unbanChatSenderChat
fill: *self
get_administrators:
method: getChatAdministrators
fill: *self
delete_message:
method: deleteMessage
fill: *self
revoke_invite_link:
method: revokeChatInviteLink
fill: *self
edit_invite_link:
method: editChatInviteLink
fill: *self
create_invite_link:
method: createChatInviteLink
fill: *self
export_invite_link:
method: exportChatInviteLink
fill: *self
do:
method: sendChatAction
fill: *self
delete_sticker_set:
method: deleteChatStickerSet
fill: *self
set_sticker_set:
method: setChatStickerSet
fill: *self
get_member:
method: getChatMember
fill: *self
get_member_count:
method: getChatMemberCount
fill: *self
leave:
method: leaveChat
fill: *self
unpin_all_messages:
method: unpinAllChatMessages
fill: *self
unpin_message:
method: unpinChatMessage
fill: *self
pin_message:
method: pinChatMessage
fill: *self
set_administrator_custom_title:
method: setChatAdministratorCustomTitle
fill: *self
set_permissions:
method: setChatPermissions
fill: *self
promote:
method: promoteChatMember
fill: *self
restrict:
method: restrictChatMember
fill: *self
unban:
method: unbanChatMember
fill: *self
ban:
method: banChatMember
fill: *self
set_description:
method: setChatDescription
fill: *self
set_title:
method: setChatTitle
fill: *self
delete_photo:
method: deleteChatPhoto
fill: *self
set_photo:
method: setChatPhoto
fill: *self

View file

@ -0,0 +1,8 @@
approve:
method: approveChatJoinRequest
fill: &request-target
chat_id: self.chat.id
user_id: self.from_user.id
decline:
method: declineChatJoinRequest
fill: *request-target

View file

@ -0,0 +1,2 @@
bases:
- _ErrorEvent

View file

@ -0,0 +1,4 @@
answer:
method: answerInlineQuery
fill:
inline_query_id: self.id

View file

@ -1,139 +1,189 @@
#answer:
# method: sendMessage
# fill: &fill-answer
# chat_id: self.chat.id
# message_thread_id: self.message_thread_id if self.is_topic_message else None
#
#reply:
# method: sendMessage
# fill: &fill-reply
# <<: *fill-answer
# reply_to_message_id: self.message_id
#
#answer_animation:
# method: sendAnimation
# fill: *fill-answer
#
#reply_animation:
# method: sendAnimation
# fill: *fill-reply
#
#answer_audio:
# method: sendAudio
# fill: *fill-answer
#
#reply_audio:
# method: sendAudio
# fill: *fill-reply
#
#answer_contact:
# method: sendContact
# fill: *fill-answer
#
#reply_contact:
# method: sendContact
# fill: *fill-reply
#
#answer_document:
# method: sendDocument
# fill: *fill-answer
#
#reply_document:
# method: sendDocument
# fill: *fill-reply
#
#answer_game:
# method: sendGame
# fill: *fill-answer
#
#reply_game:
# method: sendGame
# fill: *fill-reply
#
#answer_invoice:
# method: sendInvoice
# fill: *fill-answer
#
#reply_invoice:
# method: sendInvoice
# fill: *fill-reply
#
#answer_location:
# method: sendLocation
# fill: *fill-answer
#
#reply_location:
# method: sendLocation
# fill: *fill-reply
#
#answer_media_group:
# method: sendMediaGroup
# fill: *fill-answer
#
#reply_media_group:
# method: sendMediaGroup
# fill: *fill-reply
#
#answer_photo:
# method: sendPhoto
# fill: *fill-answer
#
#reply_photo:
# method: sendPhoto
# fill: *fill-reply
#
#answer_poll:
# method: sendPoll
# fill: *fill-answer
#
#reply_poll:
# method: sendPoll
# fill: *fill-reply
#
#answer_dice:
# method: sendDice
# fill: *fill-answer
#
#reply_dice:
# method: sendDice
# fill: *fill-reply
#
#answer_sticker:
# method: sendSticker
# fill: *fill-answer
#
#reply_sticker:
# method: sendSticker
# fill: *fill-reply
#
#answer_venue:
# method: sendVenue
# fill: *fill-answer
#
#reply_venue:
# method: sendVenue
# fill: *fill-reply
#
#answer_video:
# method: sendVideo
# fill: *fill-answer
#
#reply_video:
# method: sendVideo
# fill: *fill-reply
#
#answer_video_note:
# method: sendVideoNote
# fill: *fill-answer
#
#reply_video_note:
# method: sendVideoNote
# fill: *fill-reply
#
#answer_voice:
# method: sendVoice
# fill: *fill-answer
#
#reply_voice:
# method: sendVoice
# fill: *fill-reply
answer:
method: sendMessage
fill: &fill-answer
chat_id: self.chat.id
message_thread_id: self.message_thread_id if self.is_topic_message else None
reply:
method: sendMessage
fill: &fill-reply
<<: *fill-answer
reply_to_message_id: self.message_id
answer_animation:
method: sendAnimation
fill: *fill-answer
reply_animation:
method: sendAnimation
fill: *fill-reply
answer_audio:
method: sendAudio
fill: *fill-answer
reply_audio:
method: sendAudio
fill: *fill-reply
answer_contact:
method: sendContact
fill: *fill-answer
reply_contact:
method: sendContact
fill: *fill-reply
answer_document:
method: sendDocument
fill: *fill-answer
reply_document:
method: sendDocument
fill: *fill-reply
answer_game:
method: sendGame
fill: *fill-answer
reply_game:
method: sendGame
fill: *fill-reply
answer_invoice:
method: sendInvoice
fill: *fill-answer
reply_invoice:
method: sendInvoice
fill: *fill-reply
answer_location:
method: sendLocation
fill: *fill-answer
reply_location:
method: sendLocation
fill: *fill-reply
answer_media_group:
method: sendMediaGroup
fill: *fill-answer
reply_media_group:
method: sendMediaGroup
fill: *fill-reply
answer_photo:
method: sendPhoto
fill: *fill-answer
reply_photo:
method: sendPhoto
fill: *fill-reply
answer_poll:
method: sendPoll
fill: *fill-answer
reply_poll:
method: sendPoll
fill: *fill-reply
answer_dice:
method: sendDice
fill: *fill-answer
reply_dice:
method: sendDice
fill: *fill-reply
answer_sticker:
method: sendSticker
fill: *fill-answer
reply_sticker:
method: sendSticker
fill: *fill-reply
answer_venue:
method: sendVenue
fill: *fill-answer
reply_venue:
method: sendVenue
fill: *fill-reply
answer_video:
method: sendVideo
fill: *fill-answer
reply_video:
method: sendVideo
fill: *fill-reply
answer_video_note:
method: sendVideoNote
fill: *fill-answer
reply_video_note:
method: sendVideoNote
fill: *fill-reply
answer_voice:
method: sendVoice
fill: *fill-answer
reply_voice:
method: sendVoice
fill: *fill-reply
copy_to:
method: copyMessage
fill:
from_chat_id: self.chat.id
message_id: self.message_id
edit_text:
method: editMessageText
fill: &message-target
chat_id: self.chat.id
message_id: self.message_id
forward:
method: forwardMessage
fill:
from_chat_id: self.chat.id
message_id: self.message_id
edit_media:
method: editMessageMedia
fill: *message-target
edit_reply_markup:
method: editMessageReplyMarkup
fill: *message-target
edit_live_location:
method: editMessageLiveLocation
fill: *message-target
stop_live_location:
method: stopMessageLiveLocation
fill: *message-target
edit_caption:
method: editMessageCaption
fill: *message-target
delete:
method: deleteMessage
fill: *message-target
pin:
method: pinChatMessage
fill: *message-target
unpin:
method: unpinChatMessage
fill: *message-target

View file

@ -0,0 +1,8 @@
set_position_in_set:
method: setStickerPositionInSet
fill: &set-target
sticker: self.file_id
delete_from_set:
method: deleteStickerFromSet
fill: *set-target

View file

@ -0,0 +1,4 @@
get_profile_photos:
method: getUserProfilePhotos
fill:
user_id: self.id