1
0
Fork 0
mirror of synced 2024-06-29 03:30:57 +12:00

Corrected printing of the polls

This commit is contained in:
Phxntxm 2016-08-13 22:56:44 -05:00
parent 009d161474
commit 0b67796c8d

View file

@ -50,8 +50,8 @@ class Strawpoll:
fmt_options = "\n\t".join("{}: {}".format(data['options'][i], data['votes'][i]) for i in range(data['options']))
author = self.bot.get_member(poll['author'])
created_ago = (pendulum.parse(poll['date'])-pendulum.utcnow()).in_words()
fmt = "Link: {}\nTitle: {}\nAuthor: {}\nCreated: {}\nOptions:\n\t{}".format("https://strawpoll.me{}".format(
str(poll_id)), data['title'], author,created_ago,fmt_options)
link = "https://strawpoll.me{}".format(str(poll_id))
fmt = "Link: {}\nTitle: {}\nAuthor: {}\nCreated: {}\nOptions:\n\t{}".format(link, data['title'], author.display_name, created_ago, fmt_options)
await self.bot.say("```\n{}```".format(fmt))