Corrected error upon removing with no id passed
This commit is contained in:
parent
595496103b
commit
bf408dc60f
1 changed files with 2 additions and 2 deletions
|
@ -102,7 +102,7 @@ class Strawpoll:
|
||||||
if poll_id:
|
if poll_id:
|
||||||
poll = server_polls.get(poll_id)
|
poll = server_polls.get(poll_id)
|
||||||
if not poll:
|
if not poll:
|
||||||
fmt = "\n".join("{}: {}".format(data['title'], _poll_id) for _poll_id, data in server_polls)
|
fmt = "\n".join("{}: {}".format(data['title'], _poll_id) for _poll_id, data in server_polls.items())
|
||||||
await self.bot.say(
|
await self.bot.say(
|
||||||
"There is no poll setup with that ID! Here is a list of the current polls```\n{}```".format(fmt))
|
"There is no poll setup with that ID! Here is a list of the current polls```\n{}```".format(fmt))
|
||||||
else:
|
else:
|
||||||
|
@ -111,5 +111,5 @@ class Strawpoll:
|
||||||
config.saveContent('strawpolls', all_polls)
|
config.saveContent('strawpolls', all_polls)
|
||||||
await self.bot.say("I have just removed the poll with the ID {}".format(poll_id))
|
await self.bot.say("I have just removed the poll with the ID {}".format(poll_id))
|
||||||
else:
|
else:
|
||||||
fmt = "\n".join("{}: {}".format(data['title'], _poll_id) for _poll_id, data in server_polls)
|
fmt = "\n".join("{}: {}".format(data['title'], _poll_id) for _poll_id, data in server_polls.items())
|
||||||
await self.bot.say("Here is a list of the polls on this server:\n```\n{}```".format(fmt))
|
await self.bot.say("Here is a list of the polls on this server:\n```\n{}```".format(fmt))
|
||||||
|
|
Loading…
Reference in a new issue