Change text if no quests/side quests exist
This commit is contained in:
parent
28d2dc4244
commit
c4d1452f8a
5
bot.py
5
bot.py
|
@ -183,6 +183,11 @@ def list_quests(bot, update, player, type):
|
||||||
x = player.get_side_quests(0)
|
x = player.get_side_quests(0)
|
||||||
else:
|
else:
|
||||||
raise ValueError('Not quest or side_quest')
|
raise ValueError('Not quest or side_quest')
|
||||||
|
if len(x) == 0:
|
||||||
|
text = ("<b>You have completed every " +
|
||||||
|
{"quest": "Quests", "side_quest": "Side Quests"}[type] +
|
||||||
|
" ever known to me.</b>")
|
||||||
|
else:
|
||||||
text = "<b>List of " + {"quest": "Quests", "side_quest":
|
text = "<b>List of " + {"quest": "Quests", "side_quest":
|
||||||
"Side Quests"}[type] + "</b>\n"
|
"Side Quests"}[type] + "</b>\n"
|
||||||
x.sort(key=lambda i: (i.imp, -i.QID), reverse=True)
|
x.sort(key=lambda i: (i.imp, -i.QID), reverse=True)
|
||||||
|
|
Loading…
Reference in New Issue