Skip to content
Snippets Groups Projects
Commit 61b20c86 authored by dnns01's avatar dnns01
Browse files

To avoid exceptions with embeds being too long, the members that voted for a...

To avoid exceptions with embeds being too long, the members that voted for a specific option, are not added to the result
parent 9bc07d7d
Branches
No related tags found
No related merge requests found
......@@ -73,19 +73,20 @@ class Poll:
reaction = self.get_reaction(OPTIONS[i])
if reaction:
name += f' : {reaction.count - 1}'
value += f'\nStimmen: '
async for user in reaction.users():
if self.bot.user == user:
continue
ping = f'<@!{str(user.id)}> '
if len(value) + len(ping) > 1024:
embed.add_field(name=name, value=value, inline=False)
answer = f''
name = "\u200b"
value += ping
# value += f'\nStimmen: '
# async for user in reaction.users():
# if self.bot.user == user:
# continue
# ping = f'<@!{str(user.id)}> '
#
# if len(value) + len(ping) > 1024:
# embed.add_field(name=name, value=value, inline=False)
# answer = f''
# name = "\u200b"
# elif
#
# value += ping
embed.add_field(name=name, value=value, inline=False)
option_ctr += 1
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment