From 6bf457793c0d1c3d4bee711b87733dca852dfba7 Mon Sep 17 00:00:00 2001 From: Tanuj Date: Fri, 1 Jun 2018 00:54:37 +0100 Subject: [PATCH] Use event.chat_id instead of event.input_chat saving an await and a potential exception if input_chat could not be found --- stdplugins/re.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/stdplugins/re.py b/stdplugins/re.py index dc28729..df3e908 100644 --- a/stdplugins/re.py +++ b/stdplugins/re.py @@ -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(