mirror of
https://github.com/aiogram/aiogram.git
synced 2026-04-08 16:37:47 +00:00
Add class helper ChatAction
This commit is contained in:
parent
6e39f9fada
commit
25aafbca49
2 changed files with 37 additions and 0 deletions
|
|
@ -13,6 +13,7 @@ from .bot_command_scope_default import BotCommandScopeDefault
|
|||
from .callback_game import CallbackGame
|
||||
from .callback_query import CallbackQuery
|
||||
from .chat import Chat
|
||||
from .chat_action import ChatAction
|
||||
from .chat_invite_link import ChatInviteLink
|
||||
from .chat_join_request import ChatJoinRequest
|
||||
from .chat_location import ChatLocation
|
||||
|
|
@ -259,6 +260,7 @@ __all__ = (
|
|||
"Game",
|
||||
"CallbackGame",
|
||||
"GameHighScore",
|
||||
"ChatAction"
|
||||
)
|
||||
|
||||
# Load typing forward refs for every TelegramObject
|
||||
|
|
|
|||
35
aiogram/types/chat_action.py
Normal file
35
aiogram/types/chat_action.py
Normal file
|
|
@ -0,0 +1,35 @@
|
|||
from ..utils import helper
|
||||
|
||||
|
||||
class ChatAction(helper.Helper):
|
||||
"""
|
||||
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
|
||||
"""
|
||||
|
||||
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
|
||||
Loading…
Add table
Add a link
Reference in a new issue