mirror of
https://github.com/aiogram/aiogram.git
synced 2026-04-08 16:37:47 +00:00
Change using helper to using enum.Enum
This commit is contained in:
parent
25aafbca49
commit
406ce01055
1 changed files with 15 additions and 17 deletions
|
|
@ -1,7 +1,7 @@
|
|||
from ..utils import helper
|
||||
import enum
|
||||
|
||||
|
||||
class ChatAction(helper.Helper):
|
||||
class ChatAction(str, enum.Enum):
|
||||
"""
|
||||
This object represents bot actions.
|
||||
|
||||
|
|
@ -18,18 +18,16 @@ class ChatAction(helper.Helper):
|
|||
Source: https://core.telegram.org/bots/api#sendchataction
|
||||
"""
|
||||
|
||||
mode = helper.HelperMode.snake_case
|
||||
|
||||
TYPING: str = helper.Item() # typing
|
||||
UPLOAD_PHOTO: str = helper.Item() # upload_photo
|
||||
RECORD_VIDEO: str = helper.Item() # record_video
|
||||
UPLOAD_VIDEO: str = helper.Item() # upload_video
|
||||
RECORD_AUDIO: str = helper.Item() # record_audio
|
||||
UPLOAD_AUDIO: str = helper.Item() # upload_audio
|
||||
RECORD_VOICE: str = helper.Item() # record_voice
|
||||
UPLOAD_VOICE: str = helper.Item() # upload_voice
|
||||
UPLOAD_DOCUMENT: str = helper.Item() # upload_document
|
||||
FIND_LOCATION: str = helper.Item() # find_location
|
||||
RECORD_VIDEO_NOTE: str = helper.Item() # record_video_note
|
||||
UPLOAD_VIDEO_NOTE: str = helper.Item() # upload_video_note
|
||||
CHOOSE_STICKER: str = helper.Item() # choose_sticker
|
||||
TYPING: str = "typing" # typing
|
||||
UPLOAD_PHOTO: str = "upload_photo" # upload_photo
|
||||
RECORD_VIDEO: str = "record_video" # record_video
|
||||
UPLOAD_VIDEO: str = "upload_video" # upload_video
|
||||
RECORD_AUDIO: str = "record_audio" # record_audio
|
||||
UPLOAD_AUDIO: str = "upload_audio" # upload_audio
|
||||
RECORD_VOICE: str = "record_voice" # record_voice
|
||||
UPLOAD_VOICE: str = "upload_voice" # upload_voice
|
||||
UPLOAD_DOCUMENT: str = "upload_document" # upload_document
|
||||
FIND_LOCATION: str = "find_location" # find_location
|
||||
RECORD_VIDEO_NOTE: str = "record_video_note" # record_video_note
|
||||
UPLOAD_VIDEO_NOTE: str = "upload_video_note" # upload_video_note
|
||||
CHOOSE_STICKER: str = "choose_sticker" # choose_sticker
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue