Skip to content

Commit

Permalink
Merge pull request #1 from GhosterBot/Chat_Handler_fix
Browse files Browse the repository at this point in the history
Telegram task : Ordering by date
  • Loading branch information
GhosterBot authored Sep 26, 2016
2 parents f9bd89d + 8d6bf72 commit b8958eb
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions pokemongo_bot/event_handlers/chat_handler.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ def get_evolved(self, num, order):
else:
num = int(num)

if order not in ["cp", "iv"]:
if order not in ["cp", "iv", "dated"]:
order = "iv"

with self.bot.database as conn:
Expand All @@ -45,7 +45,7 @@ def get_hatched(self, num, order):
else:
num = int(num)

if order not in ["cp", "iv"]:
if order not in ["cp", "iv", "dated"]:
order = "iv"

with self.bot.database as conn:
Expand All @@ -60,7 +60,7 @@ def get_caught(self, num, order):
else:
num = int(num)

if order not in ["cp", "iv"]:
if order not in ["cp", "iv", "dated"]:
order = "iv"

with self.bot.database as conn:
Expand All @@ -87,7 +87,7 @@ def get_released(self, num, order):
else:
num = int(num)

if order not in ["cp", "iv"]:
if order not in ["cp", "iv", "dated"]:
order = "iv"

with self.bot.database as conn:
Expand All @@ -102,7 +102,7 @@ def get_vanished(self, num, order):
else:
num = int(num)

if order not in ["cp", "iv"]:
if order not in ["cp", "iv", "dated"]:
order = "iv"

with self.bot.database as conn:
Expand Down Expand Up @@ -185,7 +185,7 @@ def get_top(self, num, order):
else:
num = int(num)

if order not in ["cp", "iv"]:
if order not in ["cp", "iv", "dated"]:
order = "iv"
pkmns = sorted(inventory.pokemons().all(), key=lambda p: getattr(p, order), reverse=True)[:num]
res = []
Expand Down

0 comments on commit b8958eb

Please sign in to comment.