Merge pull request #51 from Klemek/dev

1.15.3 small improvement
This commit is contained in:
Klemek
2021-06-04 15:38:42 +02:00
committed by GitHub
2 changed files with 7 additions and 2 deletions
+1 -1
View File
@@ -18,7 +18,7 @@ emojis.load_emojis()
bot = Bot(
"Discord Analyst",
"1.15.2",
"1.15.3",
alias="%",
)
+6 -1
View File
@@ -92,7 +92,9 @@ class Scanner(ABC):
dates = []
for i, arg in enumerate(args[1:]):
skip_check = False
if re.match(r"^<@!?\d+>$", arg):
if self.all_args and f"'{arg}'" in message.content or f"\"{arg}\"" in message.content:
self.other_args += [arg]
elif re.match(r"^<@!?\d+>$", arg):
arg = arg[3:-1] if "!" in arg else arg[2:-1]
elif re.match(r"^<#!?\d+>$", arg):
arg = arg[3:-1] if "!" in arg else arg[2:-1]
@@ -121,6 +123,9 @@ class Scanner(ABC):
)
return
for arg in self.other_args:
args.remove(arg)
self.start_date = None if len(dates) < 1 else min(dates)
self.stop_date = None if len(dates) < 2 else max(dates)