diff options
author | 2019-08-14 19:34:00 +0200 | |
---|---|---|
committer | 2019-08-14 19:34:00 +0200 | |
commit | 5840276f97271926f09052890d6036314dad7f07 (patch) | |
tree | b669d379880912a812c46d5d9838a0a3b47570e1 | |
parent | Revert "changed flag emoji to stay under max message lenght" (diff) |
added suggestion.
-rw-r--r-- | bot/seasons/evergreen/minesweeper.py | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/bot/seasons/evergreen/minesweeper.py b/bot/seasons/evergreen/minesweeper.py index 6f124c63..bf9633b3 100644 --- a/bot/seasons/evergreen/minesweeper.py +++ b/bot/seasons/evergreen/minesweeper.py @@ -36,11 +36,13 @@ class CoordinateConverter(commands.Converter): if not 2 <= len(coordinate) <= 3: raise commands.BadArgument('Invalid co-ordinate provided') - if len(coordinate) == 3: - digit = "10" - letter = sorted(coordinate.lower())[-1] + coordinate = coordinate.lower() + if coordinate[0].isalpha(): + digit = coordinate[1:] + letter = coordinate[0] else: - digit, letter = sorted(coordinate.lower()) + digit = coordinate[:-1] + letter = coordinate[-1] if not digit.isdigit(): raise commands.BadArgument |