#buttons not working

48 messages · Page 1 of 1 (latest)

fallow ironBOT
#
  • What's your exact discord.js npm list discord.js and node node -v version?
  • 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!
abstract shale
#

<@&839912195994812420>

timid bone
abstract shale
#

ooh sorry i didnt notice

timid bone
#

And you named the collector's callback as interaction too whether you already have a variable with that name, rename it to btnInt or something and us the, it might be conflicting

abstract shale
#

kk lemme try

#

nah still it didint work

timid bone
#

Show the updated code

final elbowBOT
#

To share long code snippets, use a service like gist, sourcebin, starbin, or similar instead of posting them as large code blocks or files.

abstract shale
timid bone
# abstract shale https://starb.in/EzIU0g.js

Yeah, you actually need to use the btnInt to respond to the btn interaction, you are still doing interaction.followUp here, also to use followUp it needs to be replied or deferred first, so do that or directly reply

abstract shale
#

oh kk

#

thanks

#

um

#

still i think

#

the same problem

#

@timid bone

timid bone
abstract shale
#

like that

#

?

timid bone
#

Yes

abstract shale
#

still not working

timid bone
# abstract shale still not working

In your filter, you are checking interaction.author, there is not such property on interaction, probably not passing the filter, use interaction.user

#

Wait..&& should short-circuit then ig!

#

You can also add a console log at the beginning of you collect listener to see if it receives the interaction

abstract shale
#

it worked

#

thanks

#

for your help

#

but

#

i have

#

a problem

#

now

#

when i press the button

#

i can press the other one

#

i want the buttons to be pressed once

#

@timid bone

timid bone
#

Explain, wdym but you can press the other one? While the button interaction is getting acknowledged, other buttons become disabled

abstract shale
#

no like when i ppress confirm i want the buttons to be disabled

timid bone
#

Then disable it

abstract shale
#

setdisable?

final elbowBOT
abstract shale
#

kk

#

it does not work

#

@timid bone

timid bone
#

Please do not ping, I'm here aren't I? And you do not update with the new btn, you just set the buttons disabled and that's it, buttons aren't magically going to be updated on discord's end, you need to update the original message with the new btns