Voice Chat types added

This commit is contained in:
Oleg A 2021-03-10 18:35:29 +03:00
parent 77c6813177
commit f5b265d614
4 changed files with 47 additions and 0 deletions

View file

@ -69,6 +69,9 @@ from .venue import Venue
from .video import Video
from .video_note import VideoNote
from .voice import Voice
from .voice_chat_ended import VoiceChatEnded
from .voice_chat_participants_invited import VoiceChatParticipantsInvited
from .voice_chat_started import VoiceChatStarted
from .webhook_info import WebhookInfo
__all__ = (
@ -184,6 +187,9 @@ __all__ = (
'Video',
'VideoNote',
'Voice',
'VoiceChatEnded',
'VoiceChatParticipantsInvited',
'VoiceChatStarted',
'WebhookInfo',
'base',
'fields',

View file

@ -0,0 +1,13 @@
from . import base
from . import fields
from . import mixins
class VoiceChatEnded(base.TelegramObject, mixins.Downloadable):
"""
This object represents a service message about a voice chat ended in the chat.
https://core.telegram.org/bots/api#voicechatended
"""
duration: base.Integer = fields.Field()

View file

@ -0,0 +1,16 @@
import typing
from . import base
from . import fields
from . import mixins
from .user import User
class VoiceChatParticipantsInvited(base.TelegramObject, mixins.Downloadable):
"""
This object represents a service message about new members invited to a voice chat.
https://core.telegram.org/bots/api#voicechatparticipantsinvited
"""
users: typing.List[User] = fields.ListField(base=User)

View file

@ -0,0 +1,12 @@
from . import base
from . import mixins
class VoiceChatStarted(base.TelegramObject, mixins.Downloadable):
"""
This object represents a service message about a voice chat started in the chat.
Currently holds no information.
https://core.telegram.org/bots/api#voicechatstarted
"""
pass