Skip to content
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

Closed
wants to merge 1 commit into from
Closed

Add poll command #193

wants to merge 1 commit into from

Conversation

49Indium
Copy link
Member

@49Indium 49Indium commented Mar 4, 2024

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.

@49Indium 49Indium added enhancement update an existing command or cog for some new functionality new-command add a new command or cog for some new functionality labels Mar 4, 2024
@49Indium 49Indium linked an issue Mar 7, 2024 that may be closed by this pull request
Copy link
Member

@JamesDearlove JamesDearlove left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was playing with this, got a couple of comments. Was also wondering if this would look better styled as an embed message. Here's an example:
image

"\u0038\u20E3",
"\u0039\u20E3",
"\U0001F51F",
]
Copy link
Member

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)",
Copy link
Member

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...",
Copy link
Member

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

@JamesDearlove
Copy link
Member

JamesDearlove commented Mar 9, 2024

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

@49Indium
Copy link
Member Author

Given that Discord is rolling out a polls feature, I'm going to close this.

@49Indium 49Indium closed this Mar 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement update an existing command or cog for some new functionality new-command add a new command or cog for some new functionality
Projects
None yet
Development

Successfully merging this pull request may close these issues.

uqcsbot poll
2 participants