mirror of
https://github.com/aiogram/aiogram.git
synced 2026-04-08 16:37:47 +00:00
feat: added the classes UserShared, ChatShared
This commit is contained in:
parent
c2dadc5635
commit
cbaf40435c
3 changed files with 28 additions and 0 deletions
12
aiogram/types/chat_shared.py
Normal file
12
aiogram/types/chat_shared.py
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
from . import base, fields
|
||||
|
||||
|
||||
class ChatShared(base.TelegramObject):
|
||||
"""
|
||||
This object contains information about the chat whose identifier was
|
||||
shared with the bot using a KeyboardButtonRequestChat button.
|
||||
|
||||
https://core.telegram.org/bots/api#chatshared
|
||||
"""
|
||||
request_id: base.Integer = fields.Field()
|
||||
user_id: base.Integer = fields.Field()
|
||||
|
|
@ -8,6 +8,7 @@ from . import base, fields
|
|||
from .animation import Animation
|
||||
from .audio import Audio
|
||||
from .chat import Chat, ChatType
|
||||
from .chat_shared import ChatShared
|
||||
from .contact import Contact
|
||||
from .dice import Dice
|
||||
from .document import Document
|
||||
|
|
@ -34,6 +35,7 @@ from .reply_keyboard import ReplyKeyboardMarkup, ReplyKeyboardRemove
|
|||
from .sticker import Sticker
|
||||
from .successful_payment import SuccessfulPayment
|
||||
from .user import User
|
||||
from .user_shared import UserShared
|
||||
from .venue import Venue
|
||||
from .video import Video
|
||||
from .video_chat_ended import VideoChatEnded
|
||||
|
|
@ -112,6 +114,8 @@ class Message(base.TelegramObject):
|
|||
pinned_message: Message = fields.Field(base="Message")
|
||||
invoice: Invoice = fields.Field(base=Invoice)
|
||||
successful_payment: SuccessfulPayment = fields.Field(base=SuccessfulPayment)
|
||||
user_shared: UserShared = fields.Field(base=UserShared)
|
||||
chat_shared: ChatShared = fields.Field(base=ChatShared)
|
||||
connected_website: base.String = fields.Field()
|
||||
passport_data: PassportData = fields.Field(base=PassportData)
|
||||
proximity_alert_triggered: ProximityAlertTriggered = fields.Field(base=ProximityAlertTriggered)
|
||||
|
|
|
|||
12
aiogram/types/user_shared.py
Normal file
12
aiogram/types/user_shared.py
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
from . import base, fields
|
||||
|
||||
|
||||
class UserShared(base.TelegramObject):
|
||||
"""
|
||||
This object contains information about the user whose identifier was
|
||||
shared with the bot using a KeyboardButtonRequestUser button.
|
||||
|
||||
https://core.telegram.org/bots/api#usershared
|
||||
"""
|
||||
request_id: base.Integer = fields.Field()
|
||||
user_id: base.Integer = fields.Field()
|
||||
Loading…
Add table
Add a link
Reference in a new issue