-
Notifications
You must be signed in to change notification settings - Fork 20
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add poll command #193
Add poll command #193
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"\u0038\u20E3", | ||
"\u0039\u20E3", | ||
"\U0001F51F", | ||
] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Imo, rather than unicode these could just be the the Discord emoji names one
, two
, three
, etc.
max_length=100, | ||
) | ||
poll_options: discord.ui.TextInput[Any] = discord.ui.TextInput( | ||
label="The options for the poll (one per line)", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Might be good to include the max 10 in the dialog, as you don't find out til after you put more than 10
poll_options: discord.ui.TextInput[Any] = discord.ui.TextInput( | ||
label="The options for the poll (one per line)", | ||
style=discord.TextStyle.long, | ||
placeholder="Option 1 (e.g. UQ Computing Society)\nOption 2 (e.g. UQ Caveman Society)\nOption 3...", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Comment: I believe we actually refer to it as the UQ Cavepainting Society
Also could look better with a standard message and Discord's now built in markdown, if you don't want to go down the embed route |
Given that Discord is rolling out a polls feature, I'm going to close this. |
Adds a poll command that allows for multi-option polls via reacts as mentioned in #165.
Originally, I was going to use buttons as @andrewj-brown suggested, but as these are displayed identically to everyone, without ephemeral madness, I could not show which choice you had selected for the poll. Better to keep it simple and use reacts, which are pretty ideal for this case (e.g. you can see who voted for what, vote total, etc.).
I did end up using a modal for creating the poll options, as this is a bit neater than entering into 11 different arguments.
I'm going to leave the ping to
/remindme
, but happy to add it in if it's still wanted.