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/converters.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'bot/utils/converters.py') diff --git a/bot/utils/converters.py b/bot/utils/converters.py index 98607087..72b64848 100644 --- a/bot/utils/converters.py +++ b/bot/utils/converters.py @@ -37,7 +37,7 @@ class CoordinateConverter(commands.Converter): digit = coordinate[:-1] letter = coordinate[-1] - if not digit.isdigit(): + if not digit.isdecimal(): raise commands.BadArgument x = ord(letter) - ord("a") @@ -76,7 +76,7 @@ class DateConverter(commands.Converter): @staticmethod async def convert(ctx: commands.Context, argument: str) -> Union[int, datetime]: """Parse date (SOL or earth) into `datetime` or `int`. When invalid value, raise error.""" - if argument.isdigit(): + if argument.isdecimal(): return int(argument) try: date = datetime.strptime(argument, "%Y-%m-%d") -- cgit v1.2.3