2828 UserStatusHandler , RawUpdateHandler , InlineQueryHandler , PollHandler ,
2929 ChosenInlineResultHandler , ChatMemberUpdatedHandler , ChatJoinRequestHandler ,
3030 GuardBotQueryHandler ,
31+ BotStarsSubscriptionHandler , EphemeralBotCallbackQueryHandler , UserPhotoHandler ,
3132)
3233from pyrogram .raw .types import (
3334 UpdateNewMessage , UpdateNewChannelMessage , UpdateNewScheduledMessage ,
3738 UpdateUserStatus , UpdateBotInlineQuery , UpdateMessagePoll ,
3839 UpdateBotInlineSend , UpdateChatParticipant , UpdateChannelParticipant ,
3940 UpdateBotChatInviteRequester , UpdateBotGuestChatQuery ,
41+ UpdateBotStarsSubscription , UpdateEphemeralBotCallbackQuery , UpdateUserPhoto ,
4042)
4143
4244log = logging .getLogger (__name__ )
@@ -54,6 +56,9 @@ class Dispatcher:
5456 CHOSEN_INLINE_RESULT_UPDATES = (UpdateBotInlineSend ,)
5557 CHAT_JOIN_REQUEST_UPDATES = (UpdateBotChatInviteRequester ,)
5658 GUARD_BOT_QUERY_UPDATES = (UpdateBotGuestChatQuery ,)
59+ BOT_STARS_SUBSCRIPTION_UPDATES = (UpdateBotStarsSubscription ,)
60+ EPHEMERAL_BOT_CALLBACK_QUERY_UPDATES = (UpdateEphemeralBotCallbackQuery ,)
61+ USER_PHOTO_UPDATES = (UpdateUserPhoto ,)
5762
5863 def __init__ (self , client : "pyrogram.Client" ):
5964 self .client = client
@@ -135,6 +140,24 @@ async def guard_bot_query_parser(update, users, chats):
135140 GuardBotQueryHandler ,
136141 )
137142
143+ async def bot_stars_subscription_parser (update , users , chats ):
144+ return (
145+ pyrogram .types .BotStarsSubscription ._parse (self .client , update ),
146+ BotStarsSubscriptionHandler ,
147+ )
148+
149+ async def ephemeral_bot_callback_query_parser (update , users , chats ):
150+ return (
151+ pyrogram .types .EphemeralBotCallbackQuery ._parse (self .client , update , users ),
152+ EphemeralBotCallbackQueryHandler ,
153+ )
154+
155+ async def user_photo_parser (update , users , chats ):
156+ return (
157+ pyrogram .types .UserPhoto ._parse (self .client , update , users ),
158+ UserPhotoHandler ,
159+ )
160+
138161 self .update_parsers = {
139162 Dispatcher .NEW_MESSAGE_UPDATES : message_parser ,
140163 Dispatcher .EDIT_MESSAGE_UPDATES : edited_message_parser ,
@@ -147,6 +170,9 @@ async def guard_bot_query_parser(update, users, chats):
147170 Dispatcher .CHAT_MEMBER_UPDATES : chat_member_updated_parser ,
148171 Dispatcher .CHAT_JOIN_REQUEST_UPDATES : chat_join_request_parser ,
149172 Dispatcher .GUARD_BOT_QUERY_UPDATES : guard_bot_query_parser ,
173+ Dispatcher .BOT_STARS_SUBSCRIPTION_UPDATES : bot_stars_subscription_parser ,
174+ Dispatcher .EPHEMERAL_BOT_CALLBACK_QUERY_UPDATES : ephemeral_bot_callback_query_parser ,
175+ Dispatcher .USER_PHOTO_UPDATES : user_photo_parser ,
150176 }
151177
152178 self .update_parsers = {key : value for key_tuple , value in self .update_parsers .items () for key in key_tuple }
0 commit comments