mirror of
https://github.com/aiogram/aiogram.git
synced 2026-04-08 16:37:47 +00:00
Add ButtonStyle enum to represent button styles in the Telegram API
This commit is contained in:
parent
45c4c2bee5
commit
8783c4922e
5 changed files with 34 additions and 0 deletions
9
.butcher/enums/ButtonStyle.yml
Normal file
9
.butcher/enums/ButtonStyle.yml
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
name: ButtonStyle
|
||||
description: |
|
||||
This object represents a button style (inline- or reply-keyboard).
|
||||
|
||||
Source: https://core.telegram.org/bots/api#chat
|
||||
parse:
|
||||
entity: InlineKeyboardButton
|
||||
attribute: style
|
||||
regexp: "'([a-z]+)'"
|
||||
|
|
@ -1,4 +1,5 @@
|
|||
from .bot_command_scope_type import BotCommandScopeType
|
||||
from .button_style import ButtonStyle
|
||||
from .chat_action import ChatAction
|
||||
from .chat_boost_source_type import ChatBoostSourceType
|
||||
from .chat_member_status import ChatMemberStatus
|
||||
|
|
@ -36,6 +37,7 @@ from .update_type import UpdateType
|
|||
|
||||
__all__ = (
|
||||
"BotCommandScopeType",
|
||||
"ButtonStyle",
|
||||
"ChatAction",
|
||||
"ChatBoostSourceType",
|
||||
"ChatMemberStatus",
|
||||
|
|
|
|||
13
aiogram/enums/button_style.py
Normal file
13
aiogram/enums/button_style.py
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
from enum import Enum
|
||||
|
||||
|
||||
class ButtonStyle(str, Enum):
|
||||
"""
|
||||
This object represents a button style (inline- or reply-keyboard).
|
||||
|
||||
Source: https://core.telegram.org/bots/api#chat
|
||||
"""
|
||||
|
||||
DANGER = "danger"
|
||||
SUCCESS = "success"
|
||||
PRIMARY = "primary"
|
||||
9
docs/api/enums/button_style.rst
Normal file
9
docs/api/enums/button_style.rst
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
###########
|
||||
ButtonStyle
|
||||
###########
|
||||
|
||||
|
||||
.. automodule:: aiogram.enums.button_style
|
||||
:members:
|
||||
:member-order: bysource
|
||||
:undoc-members: True
|
||||
|
|
@ -11,6 +11,7 @@ Here is list of all available enums:
|
|||
:maxdepth: 1
|
||||
|
||||
bot_command_scope_type
|
||||
button_style
|
||||
chat_action
|
||||
chat_boost_source_type
|
||||
chat_member_status
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue