mirror of
https://github.com/pyrogram/pyrogram
synced 2025-08-31 22:35:36 +00:00
Directly pass the message instead of the update
This commit is contained in:
@@ -67,12 +67,16 @@ class Dispatcher:
|
||||
def dispatch(self, update):
|
||||
if update.message:
|
||||
key = MessageHandler
|
||||
value = update.message
|
||||
elif update.edited_message:
|
||||
key = EditedMessageHandler
|
||||
value = update.edited_message
|
||||
elif update.channel_post:
|
||||
key = ChannelPostHandler
|
||||
value = update.channel_post
|
||||
elif update.edited_channel_post:
|
||||
key = EditedChannelPostHandler
|
||||
value = update.edited_channel_post
|
||||
else:
|
||||
return
|
||||
|
||||
@@ -80,7 +84,7 @@ class Dispatcher:
|
||||
handler = group.get(key, None)
|
||||
|
||||
if handler is not None:
|
||||
handler.callback(self.client, update)
|
||||
handler.callback(self.client, value)
|
||||
|
||||
def update_worker(self):
|
||||
name = threading.current_thread().name
|
||||
|
Reference in New Issue
Block a user