fix check for chats in response module

This commit is contained in:
Von Random 2023-11-05 15:05:06 +00:00
parent 696bf5492b
commit 6da6769c25

View file

@ -101,7 +101,8 @@ class Responder:
event: telethon.events.common.EventBuilder) -> None: event: telethon.events.common.EventBuilder) -> None:
if not self.enabled: if not self.enabled:
return None return None
if event.message.peer_id not in self.chats: chat_id = telethon.utils.get_peer_id(event.message.peer_id)
if chat_id not in self.chats:
return None return None
message = event.message.text.lower() message = event.message.text.lower()
tokens = self.tokenize(message) tokens = self.tokenize(message)