From 3c3d3cf9dd1b75be023b3e0c2a9c31a88122621d Mon Sep 17 00:00:00 2001 From: klemek Date: Mon, 11 Jan 2021 22:31:30 +0100 Subject: [PATCH] mentions fixing --- src/scanners/scanner.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/scanners/scanner.py b/src/scanners/scanner.py index 53d6970..453fbd3 100644 --- a/src/scanners/scanner.py +++ b/src/scanners/scanner.py @@ -44,12 +44,13 @@ class Scanner(ABC): return # check args validity - str_channel_mentions = [channel.id for channel in message.channel_mentions] - str_mentions = [member.id for member in message.mentions] + str_channel_mentions = [str(channel.id) for channel in message.channel_mentions] + str_mentions = [str(member.id) for member in message.mentions] + print(str_mentions) for i, arg in enumerate(args[1:]): if re.match(r"^<@!?\d+>$", arg): arg = arg[3:-1] if "!" in arg else arg[2:-1] - if re.match(r"^<#!?\d+>$", arg): + elif re.match(r"^<#!?\d+>$", arg): arg = arg[3:-1] if "!" in arg else arg[2:-1] if ( arg not in self.valid_args + ["me", "here", "fast"]