mirror of
https://github.com/aiogram/aiogram.git
synced 2026-04-08 16:37:47 +00:00
Added new classes for topics
This commit is contained in:
parent
e2cc8ef8c1
commit
da8dc6b111
6 changed files with 46 additions and 1 deletions
|
|
@ -29,6 +29,9 @@ from .encrypted_credentials import EncryptedCredentials
|
|||
from .encrypted_passport_element import EncryptedPassportElement
|
||||
from .file import File
|
||||
from .force_reply import ForceReply
|
||||
from .forum_topic_created import ForumTopicCreated
|
||||
from .forum_topic_closed import ForumTopicClosed
|
||||
from .forum_topic_reopened import ForumTopicReopened
|
||||
from .game import Game
|
||||
from .game_high_score import GameHighScore
|
||||
from .inline_keyboard import InlineKeyboardButton, InlineKeyboardMarkup
|
||||
|
|
@ -240,6 +243,9 @@ __all__ = (
|
|||
'WebAppData',
|
||||
'WebAppInfo',
|
||||
'WebhookInfo',
|
||||
'ForumTopicCreated',
|
||||
'ForumTopicClosed',
|
||||
'ForumTopicReopened',
|
||||
'base',
|
||||
'fields',
|
||||
)
|
||||
|
|
|
|||
10
aiogram/types/forum_topic_closed.py
Normal file
10
aiogram/types/forum_topic_closed.py
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
from . import base
|
||||
|
||||
|
||||
class ForumTopicClosed(base.TelegramObject):
|
||||
"""
|
||||
This object represents a service message about a forum topic closed in the chat. Currently holds no information.
|
||||
|
||||
https://core.telegram.org/bots/api#forumtopicclosed
|
||||
"""
|
||||
pass
|
||||
13
aiogram/types/forum_topic_created.py
Normal file
13
aiogram/types/forum_topic_created.py
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
from . import base
|
||||
from . import fields
|
||||
|
||||
|
||||
class ForumTopicCreated(base.TelegramObject):
|
||||
"""
|
||||
This object represents a service message about a new forum topic created in the chat.
|
||||
|
||||
https://core.telegram.org/bots/api#forumtopiccreated
|
||||
"""
|
||||
name: base.String = fields.Field()
|
||||
icon_color: base.Integer = fields.Field()
|
||||
icon_custom_emoji_id: base.String = fields.Field()
|
||||
10
aiogram/types/forum_topic_reopened.py
Normal file
10
aiogram/types/forum_topic_reopened.py
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
from . import base
|
||||
|
||||
|
||||
class ForumTopicReopened(base.TelegramObject):
|
||||
"""
|
||||
This object represents a service message about a forum topic closed in the chat. Currently holds no information.
|
||||
|
||||
https://core.telegram.org/bots/api#forumtopicreopened
|
||||
"""
|
||||
pass
|
||||
|
|
@ -41,6 +41,9 @@ from .voice_chat_participants_invited import VoiceChatParticipantsInvited
|
|||
from .voice_chat_scheduled import VoiceChatScheduled
|
||||
from .voice_chat_started import VoiceChatStarted
|
||||
from .web_app_data import WebAppData
|
||||
from .forum_topic_created import ForumTopicCreated
|
||||
from .forum_topic_closed import ForumTopicClosed
|
||||
from .forum_topic_reopened import ForumTopicReopened
|
||||
from ..utils import helper
|
||||
from ..utils import markdown as md
|
||||
from ..utils.text_decorations import html_decoration, markdown_decoration
|
||||
|
|
@ -114,6 +117,9 @@ class Message(base.TelegramObject):
|
|||
voice_chat_participants_invited: VoiceChatParticipantsInvited = fields.Field(base=VoiceChatParticipantsInvited)
|
||||
reply_markup: InlineKeyboardMarkup = fields.Field(base=InlineKeyboardMarkup)
|
||||
web_app_data: WebAppData = fields.Field(base=WebAppData)
|
||||
forum_topic_created: ForumTopicCreated = fields.Field(base=ForumTopicCreated)
|
||||
forum_topic_closed: ForumTopicClosed = fields.Field(base=ForumTopicClosed)
|
||||
forum_topic_reopened: ForumTopicReopened = fields.Field(base=ForumTopicReopened)
|
||||
video_chat_scheduled: VideoChatScheduled = fields.Field(base=VideoChatScheduled)
|
||||
video_chat_started: VideoChatStarted = fields.Field(base=VideoChatStarted)
|
||||
video_chat_ended: VideoChatEnded = fields.Field(base=VideoChatEnded)
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ from . import mixins
|
|||
|
||||
class VideoChatStarted(base.TelegramObject, mixins.Downloadable):
|
||||
"""
|
||||
his object represents a service message about a video chat started in the chat. Currently holds no information.
|
||||
This object represents a service message about a video chat started in the chat. Currently holds no information.
|
||||
|
||||
https://core.telegram.org/bots/api#videochatstarted
|
||||
"""
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue