You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
No poll events are emitted when the message attached to the poll is uncached (regardless of partials). There was a discussion about it in the discord server here and the solution for now was to use the raw event to fetch the message, then resolve the poll data.
Slightly inconvenient for now as this temporary fix is not particularly type-friendly with my events framework and there is some slightly unexpected behavior from the event not being emitted, even with partials enabled.
Code sample
//pretend we received a message that has a poll object, now we go to sweep the messages cacheclient.channels.cache.get('insertIdHere').messages.cache.sweep(()=>true)//vote on the poll attached to a sweeped, uncached messageclient.on(Events.MessagePollVoteAdd,(answer: PollAnswer,userId: Snowflake)=>{console.log(answer,userId)//does not emit})
Jiralite
changed the title
poll events are not emitted when the message is uncached, regardless of partials
Emit poll events on uncached messages
Jun 6, 2024
Which package is this bug report for?
discord.js
Issue description
No poll events are emitted when the message attached to the poll is uncached (regardless of partials). There was a discussion about it in the discord server here and the solution for now was to use the
raw
event to fetch the message, then resolve the poll data.Slightly inconvenient for now as this temporary fix is not particularly type-friendly with my events framework and there is some slightly unexpected behavior from the event not being emitted, even with partials enabled.
Code sample
Versions
-discord.js v14.15.3
Issue priority
Low (slightly annoying)
Which partials do you have configured?
User, Channel, GuildMember, Message
Which gateway intents are you subscribing to?
Guilds, GuildMembers, GuildMessages, DirectMessages, MessageContent, GuildMessagePolls, DirectMessagePolls
I have tested this issue on a development release
94cc02a
The text was updated successfully, but these errors were encountered: