How do I end a poll that is in the message?
<ref *1> Message {
channelId: '1248070720551129090',
guildId: '1226647840005160980',
id: '1250225712741220372',
createdTimestamp: 1718147437988, type: 0, system: false, content: '@Joãozinho', author: ClientUser { id: '1247652572286947339',
bot: true, system: false, flags: UserFlagsBitField { bitfield: 0 }, username: 'Joaozinho FIVEM', globalName: null, discriminator: '6978', avatar: null, banner: null, accentColor: null, avatarDecoration: null, verified: true, mfaEnabled: false }, pinned: false, tts: false, nonce: null, embeds: [], components: [ ActionRow { data: [Object], components: [Array] } ], attachments: Collection(0) [Map] {}, stickers: Collection(0) [Map] {}, position: 0, roleSubscriptionData: null, resolved: { members: Collection(0) [Map] {}, users: Collection(0) [Map] {}, roles: Collection(0) [Map] {}, channels: Collection(0) [Map] {} }, editedTimestamp: null, reactions: ReactionManager { message: [Circular *1] }, mentions: MessageMentions { everyone: false, users: Collection(1) [Map] { '852603072026247220' => [User] }, roles: Collection(0) [Map] {}, _members: null, _channels: null, _parsedUsers: null, crosspostedChannels: Collection(0) [Map] {}, repliedUser: null }, webhookId: null, groupActivityApplication: null, applicationId: null, activity: null, flags: MessageFlagsBitField { bitfield: 0 }, reference: null, interaction: null, poll: Poll { question: { text: 'a' }, answers: Collection(2) [Map] { 1 => [PollAnswer], 2 => [PollAnswer] }, expiresTimestamp: 1718752237937, allowMultiselect: false, layoutType: 1, resultsFinalized: false } }
id: '1250225712741220372',
createdTimestamp: 1718147437988, type: 0, system: false, content: '@Joãozinho', author: ClientUser { id: '1247652572286947339',
bot: true, system: false, flags: UserFlagsBitField { bitfield: 0 }, username: 'Joaozinho FIVEM', globalName: null, discriminator: '6978', avatar: null, banner: null, accentColor: null, avatarDecoration: null, verified: true, mfaEnabled: false }, pinned: false, tts: false, nonce: null, embeds: [], components: [ ActionRow { data: [Object], components: [Array] } ], attachments: Collection(0) [Map] {}, stickers: Collection(0) [Map] {}, position: 0, roleSubscriptionData: null, resolved: { members: Collection(0) [Map] {}, users: Collection(0) [Map] {}, roles: Collection(0) [Map] {}, channels: Collection(0) [Map] {} }, editedTimestamp: null, reactions: ReactionManager { message: [Circular *1] }, mentions: MessageMentions { everyone: false, users: Collection(1) [Map] { '852603072026247220' => [User] }, roles: Collection(0) [Map] {}, _members: null, _channels: null, _parsedUsers: null, crosspostedChannels: Collection(0) [Map] {}, repliedUser: null }, webhookId: null, groupActivityApplication: null, applicationId: null, activity: null, flags: MessageFlagsBitField { bitfield: 0 }, reference: null, interaction: null, poll: Poll { question: { text: 'a' }, answers: Collection(2) [Map] { 1 => [PollAnswer], 2 => [PollAnswer] }, expiresTimestamp: 1718752237937, allowMultiselect: false, layoutType: 1, resultsFinalized: false } }
10 Replies
- What's your exact discord.js
npm list discord.js
and node node -v
version?
- Not a discord.js issue? Check out #other-js-ts.
- Consider reading #how-to-get-help to improve your question!
- Explain what exactly your issue is.
- Post the full error stack trace, not just the top part!
- Show your code!
- Issue solved? Press the button!<Message>.poll.end()
Do you know how I can close all therds on a channel?
@duck
I don't believe there's a means of bulk archiving threads, so you'd basically need to fetch active threads and iterate through
depending on the number of threads there are, this could potentially be spammy
just this one in truth
threads is only message
by message id do you have it?
you'd need to fetch the thread
however threads created from existing messages share an id with the message, so you can fetch the thread with the message id if you don't already have access to the
Message
object