diff --git a/aiogram/types/chat_shared.py b/aiogram/types/chat_shared.py new file mode 100644 index 00000000..b6d18673 --- /dev/null +++ b/aiogram/types/chat_shared.py @@ -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() diff --git a/aiogram/types/message.py b/aiogram/types/message.py index e8051169..3609e82f 100644 --- a/aiogram/types/message.py +++ b/aiogram/types/message.py @@ -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) diff --git a/aiogram/types/user_shared.py b/aiogram/types/user_shared.py new file mode 100644 index 00000000..dcbf74de --- /dev/null +++ b/aiogram/types/user_shared.py @@ -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()