From 4503a3307b989b251826f36e9370bda7471640b3 Mon Sep 17 00:00:00 2001 From: ToxicKidz Date: Sun, 9 May 2021 17:49:53 -0400 Subject: fix: Use str.isdecimal instead of str.isdigit --- bot/utils/__init__.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'bot/utils/__init__.py') diff --git a/bot/utils/__init__.py b/bot/utils/__init__.py index 2fac2086..09a4dfc3 100644 --- a/bot/utils/__init__.py +++ b/bot/utils/__init__.py @@ -51,7 +51,7 @@ async def disambiguate( choices = (f"{index}: {entry}" for index, entry in enumerate(entries, start=1)) def check(message: discord.Message) -> bool: - return (message.content.isdigit() + return (message.content.isdecimal() and message.author == ctx.author and message.channel == ctx.channel) @@ -87,7 +87,7 @@ async def disambiguate( except asyncio.TimeoutError: raise BadArgument("Timed out.") - # Guaranteed to not error because of isdigit() in check + # Guaranteed to not error because of isdecimal() in check index = int(result.content) try: -- cgit v1.2.3