2
0
mirror of https://github.com/Nick80835/microbot synced 2025-09-01 06:55:51 +00:00

oopsie poopsie

This commit is contained in:
Nick80835
2020-07-14 09:56:45 -04:00
parent e893129345
commit 32110cf291

View File

@@ -110,22 +110,22 @@ class CommandHandler():
async def handle_inline(self, event):
for value in self.inline_photo_commands:
pattern_match = search(self.inline_pattern_template.format(value["pattern"]), event.raw_text)
pattern_match = search(self.inline_pattern_template.format(value["pattern"]), event.text)
if pattern_match:
if self.is_blacklisted(event, True):
print(f"Attempted command ({event.raw_text}) from blacklisted ID {event.from_id}")
print(f"Attempted command ({event.text}) from blacklisted ID {event.from_id}")
return
await self.handle_inline_photo(event, pattern_match, value)
return
for value in self.inline_article_commands:
pattern_match = search(self.inline_pattern_template.format(value["pattern"]), event.raw_text)
pattern_match = search(self.inline_pattern_template.format(value["pattern"]), event.text)
if pattern_match:
if self.is_blacklisted(event, True):
print(f"Attempted command ({event.raw_text}) from blacklisted ID {event.from_id}")
print(f"Attempted command ({event.text}) from blacklisted ID {event.from_id}")
return
await self.handle_inline_article(event, pattern_match, value)