1
0
Fork 0
mirror of synced 2024-09-21 03:51:46 +12:00

Made sure that the id of the strawpoll is a string, not an int, when saving

This commit is contained in:
phxntxm 2016-09-11 13:17:04 -05:00
parent 374a0433aa
commit 52ad367e0b

View file

@ -109,7 +109,7 @@ class Strawpoll:
# Save this strawpoll in the list of running strawpolls for a server
all_polls = await config.get_content('strawpolls')
server_polls = all_polls.get(ctx.message.server.id) or {}
server_polls[data['id']] = {'author': ctx.message.author.id, 'date': str(pendulum.utcnow()), 'title': title}
server_polls[str(data['id'])] = {'author': ctx.message.author.id, 'date': str(pendulum.utcnow()), 'title': title}
all_polls[ctx.message.server.id] = server_polls
await config.save_content('strawpolls', all_polls)