aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar scragly <[email protected]>2019-08-19 12:01:30 +1000
committerGravatar GitHub <[email protected]>2019-08-19 12:01:30 +1000
commit9b55411679a89cd4809482154940c8d49421780d (patch)
treea8f14be8311f42f8f2007ff16e14130994c05f04
parentchanged flag again. (minesweeper) (#259) (diff)
parentadded suggestion. (diff)
fixed coordinate bug. (#256)
fixed coordinate bug.
-rw-r--r--bot/seasons/evergreen/minesweeper.py8
1 files changed, 7 insertions, 1 deletions
diff --git a/bot/seasons/evergreen/minesweeper.py b/bot/seasons/evergreen/minesweeper.py
index f09230a9..c99cefba 100644
--- a/bot/seasons/evergreen/minesweeper.py
+++ b/bot/seasons/evergreen/minesweeper.py
@@ -36,7 +36,13 @@ class CoordinateConverter(commands.Converter):
if not 2 <= len(coordinate) <= 3:
raise commands.BadArgument('Invalid co-ordinate provided')
- digit, letter = sorted(coordinate.lower())
+ coordinate = coordinate.lower()
+ if coordinate[0].isalpha():
+ digit = coordinate[1:]
+ letter = coordinate[0]
+ else:
+ digit = coordinate[:-1]
+ letter = coordinate[-1]
if not digit.isdigit():
raise commands.BadArgument