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

Corrected printing of when the poll was created

This commit is contained in:
phxntxm 2016-08-14 00:19:18 -05:00
parent c585d3068a
commit 74130cdfbe

View file

@ -50,8 +50,8 @@ class Strawpoll:
fmt_options = "\n\t".join(
"{}: {}".format(r, data['votes'][i]) for i, r in enumerate(data['options']))
author = discord.utils.get(self.bot.get_all_members(), id=poll['author'])
created_ago = (pendulum.parse(poll['date']) - pendulum.utcnow()).in_words()
link = "https://strawpoll.me{}".format(str(poll_id))
created_ago = (pendulum.utcnow() - pendulum.parse(poll['date'])).in_words()
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)