- What's your exact discord.js
npm list discord.jsand nodenode -vversion? - Not a discord.js issue? Check out #1081585952654360687.
- 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!
#Stand-off command
25 messages · Page 1 of 1 (latest)
If you know you have to use a reaction listener, what's the problem?
https://pastebin.com/z11Qqcua
this is what i got so far, but i can't seem to get the bot to put the reaction?
Pastebin
Pastebin.com is the number one paste tool since 2002. Pastebin is a website where you can store text online for a set period of time.
the only code I see for reacting is in the collect event for your reaction collector
this means that it will react when a reaction is received
are you sure this is what you intended to do?
I think you cant use a collection reaction in a file like this
you can
no no lol, i want it to react first, and then i can react in the span of only a few seconds
ohhh so would i have to move that out of the collector for it to work?
ill try that out
(sry for double ping)
so guys i editied it, now it will react(stupid for putting it in the collector) but now when i click the reaction nothing happens? check it out for me?@native meadow@keen trail
Pastebin
Pastebin.com is the number one paste tool since 2002. Pastebin is a website where you can store text online for a set period of time.
have you tried logging throughout to see what executes and what doesn't?
does the collect event emit in the first place?
does your bot even receive a reaction in the first place?
does your filter execute?
does it pass the filter? (the answer here is probably not given that <:revolver_left:1137134967697182741 isn't an id)
do you have the proper intents?
Stand-off command
just tried logging the error, im pretty sure it's the filter, not sure tho could be wrong
[Function: collectorFilter] ReactionCollector {
_events: [Object: null prototype] {
end: [Function: bound onceWrapper] { listener: [Function (anonymous)] },
collect: [Function (anonymous)],
remove: [Function (anonymous)]
},
_eventsCount: 3,
_maxListeners: undefined,
filter: [Function: collectorFilter],
options: { filter: [Function: collectorFilter], time: 10000 },
collected: Collection(0) [Map] {},
ended: false,
_timeout: Timeout {
_idleTimeout: 10000,
_idlePrev: [TimersList],
_idleNext: [TimersList],
_idleStart: 14602,
_onTimeout: [Function (anonymous)],
_timerArgs: undefined,
_repeat: null,
_destroyed: false,
[Symbol(refed)]: false,
[Symbol(kHasPrimitive)]: false,
[Symbol(asyncId)]: 8017,
[Symbol(triggerId)]: 0
},
_idletimeout: null,
_endReason: null,
handleCollect: [Function: bound handleCollect] AsyncFunction,
handleDispose: [Function: bound handleDispose] AsyncFunction,
lastCollectedTimestamp: null,
message: Message {
channelId: '832218391624155136',
guildId: '758465602913697822',
id: '1137920497057796257',
createdTimestamp: 1691371788039,
type: 20,
system: false,
content: '🤠 🤠',
author: ClientUser {
id: '798109762864152596',
bot: true,
system: false,
flags: [UserFlagsBitField],
username: 'CITY',
discriminator: '4160',
avatar: 'ffc9432db4d99fe36cac624684608b4c',
banner: null,
accentColor: null,
verified: true,
mfaEnabled: true
},
pinned: false,
tts: false,
nonce: '1137920481840594944',
embeds: [ [Embed] ],
components: [],
attachments: Collection(0) [Map] {},
stickers: Collection(0) [Map] {},
position: null,
roleSubscriptionData: null,
editedTimestamp: null,
reactions: ReactionManager { message: [Message] },
mentions: MessageMentions {
everyone: false,
users: Collection(0) [Map] {},
roles: Collection(0) [Map] {},
_members: null,
_channels: null,
_parsedUsers: null,
crosspostedChannels: Collection(0) [Map] {},
repliedUser: null
},
webhookId: '798109762864152596',
groupActivityApplication: null,
applicationId: '798109762864152596',
activity: null,
flags: MessageFlagsBitField { bitfield: 0 },
reference: null,
interaction: {
id: '1137920495245860975',
type: 2,
commandName: 'standoff',
user: [User]
}
},
users: Collection(0) [Map] {},
total: 0,
empty: [Function: bound empty],
_handleChannelDeletion: [Function: bound _handleChannelDeletion],
_handleThreadDeletion: [Function: bound _handleThreadDeletion],
_handleGuildDeletion: [Function: bound _handleGuildDeletion],
_handleMessageDeletion: [Function: bound _handleMessageDeletion],
[Symbol(kCapture)]: false
}
also when i log the end of my collectors it tells me it caught 0 reactions
so im rly not sure
this just looks like you logged your filter function and the collector itself
this only really answers my first question in that it's unlikely that you've logged throughout to see what executes and what doesn't
If you aren't getting any errors, try to place console.log checkpoints throughout your code to find out where execution stops.
- Once you do, log relevant values and if-conditions
- More sophisticated debugging methods are breakpoints and runtime inspections: learn more
thats what i did yeah, ill try the log checkpoints
alright buddy, so i've logged where i know the problem is nearly located, and this is what happened,
the last three all happen basically right at the same time, there's no wait. between the collector and when the collector is off. so it must be something to do with my collector's time, right?
since it's basically turning off instantly
@native meadowI FUCKING GOT IT
I FIXED IT
FINALLY