-
-
Notifications
You must be signed in to change notification settings - Fork 739
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 #2646
Comments
Personally speaking, I feel like this would not be a reliable way at all to check for polls. While I haven't encountered any other cases, I'm sure there can be situations where a message may not contain any content while of message type default (I would assume Webhook messages can be?). What should be done instead is to request proper addition of API from Discord, so that bots have a reliable way of figuring out if a message is a poll... As an example:
I agree that Polls in their current form are a mess to put it very simple, so changes are necessary here. In the meantime, set up auto-mod rules, since Polls also are send through it, so if you have a decent auto-mod setup, polls may not get send at all. |
If you look at the raw data, it is similar to an embed but unlike an embed, only one poll can be in a message. |
I've looked at the API docs repository of Discord and it seems there is actually API available, just not yet documented.
So, we better should wait for the docs to be finalized and published before making any changes to JDA here. |
If your goal is to know if a poll is in a message, you can check it the data Discord sends with |
There is a usable PR (#2649), which implements polls. However, the underlying API is still somewhat unstable and not fully released by Discord. |
This is now supported in 5.0.0-beta.23 |
General Troubleshooting
Feature Request
Allow getMessage() to see if the message contains a poll and get its contents.
Currently, there is no way to disable polls and anyone with send message perms are able to send polls.
Discord has now enabled polls on all servers and this is causing users to bypass filters and create spam.
Messages with polls are currently MessageType.DEFAULT and have content of "".
https://support.discord.com/hc/en-us/articles/22163184112407-Polls-FAQ#h_01HSED5BPEDH4YYFVVCXQ2NKZ1
Example Use-Case
The text was updated successfully, but these errors were encountered: