forked from kate/uniborg
Use event.chat_id instead of event.input_chat
saving an await and a potential exception if input_chat could not be found
This commit is contained in:
parent
cfd6004dd9
commit
6bf457793c
|
@ -75,8 +75,7 @@ async def group_has_regex(group):
|
|||
|
||||
@borg.on(events.NewMessage)
|
||||
async def on_message(event):
|
||||
chat_id = utils.get_peer_id(await event.input_chat)
|
||||
last_msgs[chat_id].appendleft(event.message)
|
||||
last_msgs[event.chat_id].appendleft(event.message)
|
||||
|
||||
|
||||
@borg.on(events.NewMessage(
|
||||
|
|
Loading…
Reference in New Issue