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

Polls #11

Open
Coca162 opened this issue Dec 19, 2022 · 4 comments
Open

Polls #11

Coca162 opened this issue Dec 19, 2022 · 4 comments
Labels
enhancement New feature or request

Comments

@Coca162
Copy link
Collaborator

Coca162 commented Dec 19, 2022

A poll functionality allows users to input choices that can then be voted on by the public.

Issues

The primary difficulty is getting user input back, some bots use reaction but ctx.say() does not return a message as that message could actually be ephemeral. The harder way would probably be reactions and they have the downside of not allowing for voting while the bot is shut down.

@Coca162 Coca162 added the enhancement New feature or request label Dec 19, 2022
@abrasmag3
Copy link

ctx.say does not return a message

No, but it returns a Result<ReplyHandle>, which can be used to get the message

@abrasmag3
Copy link

Most implementations of polling won't work when the bot is down. Do you have any ideas for one that will?

@Coca162
Copy link
Collaborator Author

Coca162 commented Dec 19, 2022

ctx.say does not return a message

No, but it returns a Result<ReplyHandle>, which can be used to get the message

Ah I found the .into_message() method on ReplyHandle

@Coca162
Copy link
Collaborator Author

Coca162 commented Dec 19, 2022

Most implementations of polling won't work when the bot is down. Do you have any ideas for one that will?

I think a reactions implementation will be the best, with in the future optional time limits that will can tracked by a tokio thread. This way we simply get the votes at the end of the limit and not use events

Repository owner locked and limited conversation to collaborators Dec 21, 2022
Repository owner unlocked this conversation Dec 21, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants