-
-
Notifications
You must be signed in to change notification settings - Fork 803
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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
- Loading branch information
1 parent
3438d24
commit 3ea73fb
Showing
370 changed files
with
18,326 additions
and
6,971 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
name: BotCommandScopeType | ||
description: | | ||
This object represents the scope to which bot commands are applied. | ||
Source: https://core.telegram.org/bots/api#botcommandscope | ||
multi_parse: | ||
attribute: type | ||
regexp: "must be ([a-z_]+)" | ||
entities: | ||
- BotCommandScopeDefault | ||
- BotCommandScopeAllPrivateChats | ||
- BotCommandScopeAllGroupChats | ||
- BotCommandScopeAllChatAdministrators | ||
- BotCommandScopeChat | ||
- BotCommandScopeChatAdministrators | ||
- BotCommandScopeChatMember |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
name: ChatAction | ||
description: | | ||
This object represents bot actions. | ||
Choose one, depending on what the user is about to receive: | ||
- typing for text messages, | ||
- upload_photo for photos, | ||
- record_video or upload_video for videos, | ||
- record_voice or upload_voice for voice notes, | ||
- upload_document for general files, | ||
- choose_sticker for stickers, | ||
- find_location for location data, | ||
- record_video_note or upload_video_note for video notes. | ||
Source: https://core.telegram.org/bots/api#sendchataction | ||
parse: | ||
format: rst | ||
entity: sendChatAction | ||
category: methods | ||
attribute: action | ||
regexp: '\*([a-z_]+)\*' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
name: ChatMemberStatus | ||
description: | | ||
This object represents chat member status. | ||
Source: https://core.telegram.org/bots/api#chatmember | ||
multi_parse: | ||
attribute: status | ||
regexp: "'([a-z_]+)'" | ||
entities: | ||
- ChatMemberOwner | ||
- ChatMemberAdministrator | ||
- ChatMemberMember | ||
- ChatMemberRestricted | ||
- ChatMemberLeft | ||
- ChatMemberBanned |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
name: ChatType | ||
description: | | ||
This object represents a chat type | ||
Source: https://core.telegram.org/bots/api#chat | ||
parse: | ||
entity: Chat | ||
attribute: type | ||
regexp: "'([a-z]+)'" | ||
static: | ||
SENDER: sender |
3 changes: 2 additions & 1 deletion
3
.butcher/enums/content_type.yml → .butcher/enums/ContentType.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
name: InlineQueryResultType | ||
description: | | ||
The part of the face relative to which the mask should be placed. | ||
Source: https://core.telegram.org/bots/api#maskposition | ||
multi_parse: | ||
attribute: type | ||
regexp: "must be ([a-z_]+)" | ||
entities: | ||
- InlineQueryResultCachedAudio | ||
- InlineQueryResultCachedDocument | ||
- InlineQueryResultCachedGif | ||
- InlineQueryResultCachedMpeg4Gif | ||
- InlineQueryResultCachedPhoto | ||
- InlineQueryResultCachedSticker | ||
- InlineQueryResultCachedVideo | ||
- InlineQueryResultCachedVoice | ||
- InlineQueryResultArticle | ||
- InlineQueryResultAudio | ||
- InlineQueryResultContact | ||
- InlineQueryResultGame | ||
- InlineQueryResultDocument | ||
- InlineQueryResultGif | ||
- InlineQueryResultLocation | ||
- InlineQueryResultMpeg4Gif | ||
- InlineQueryResultPhoto | ||
- InlineQueryResultVenue | ||
- InlineQueryResultVideo | ||
- InlineQueryResultVoice |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
name: InputMediaType | ||
description: | | ||
This object represents input media type | ||
Source: https://core.telegram.org/bots/api#inputmedia | ||
multi_parse: | ||
attribute: type | ||
regexp: 'must be ([a-z_]+)' | ||
entities: | ||
- InputMediaAnimation | ||
- InputMediaAudio | ||
- InputMediaDocument | ||
- InputMediaPhoto | ||
- InputMediaVideo |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
name: MaskPositionPoint | ||
description: | | ||
The part of the face relative to which the mask should be placed. | ||
Source: https://core.telegram.org/bots/api#maskposition | ||
parse: | ||
entity: MaskPosition | ||
attribute: point | ||
regexp: "'([a-z_]+)'" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
name: MenuButtonType | ||
description: | | ||
This object represents an type of Menu button | ||
Source: https://core.telegram.org/bots/api#menubuttondefault | ||
multi_parse: | ||
format: rst | ||
attribute: type | ||
regexp: '\*([a-z_]+)\*' | ||
entities: | ||
- MenuButtonDefault | ||
- MenuButtonCommands | ||
- MenuButtonWebApp |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
name: MessageEntityType | ||
description: | | ||
This object represents type of message entity | ||
Source: https://core.telegram.org/bots/api#messageentity | ||
parse: | ||
entity: MessageEntity | ||
category: types | ||
attribute: type | ||
regexp: "'([a-z_]+)'" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
name: ParseMode | ||
description: | | ||
Formatting options | ||
Source: https://core.telegram.org/bots/api#formatting-options | ||
static: | ||
MARKDOWN_V2: MarkdownV2 | ||
MARKDOWN: Markdown | ||
HTML: HTML |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
name: PollType | ||
description: | | ||
This object represents poll type | ||
Source: https://core.telegram.org/bots/api#poll | ||
parse: | ||
entity: Poll | ||
attribute: type | ||
regexp: "'([a-z]+)'" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
name: StickerType | ||
description: | | ||
The part of the face relative to which the mask should be placed. | ||
Source: https://core.telegram.org/bots/api#maskposition | ||
parse: | ||
entity: Sticker | ||
attribute: type | ||
regexp: "'([a-z_]+)'" |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
name: UpdateType | ||
description: | | ||
This object represents the complete list of allowed update types | ||
Source: https://core.telegram.org/bots/api#update | ||
extract: | ||
entity: Update | ||
exclude: | ||
- update_id |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
##### | ||
Types | ||
Enums | ||
##### | ||
|
||
Here is list of all available enums: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
answer: | ||
method: answerCallbackQuery | ||
fill: | ||
callback_query_id: self.id |
Oops, something went wrong.