How to access interaction.options inside button callback
Is it possible to get
interaction.options
from command handler to the button itself so i could continue with the handler?
5 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!According to this
https://discordjs.guide/message-components/interactions.html#component-collectors
If i understand it correctly i should do this.
But after clicking on my button, it doesnt get fired.
discord.js Guide
Imagine a guide... that explores the many possibilities for your discord.js bot.
I can share the full file code here, but should i use default discord formatting or hatebin ?
Pastebin
const { PrismaClient } = require("@prisma/client");const { SlashCo...
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.
announcementMessage ?
Oh
Still doesnt get fired:(
Shouldn't collector.on('collector') fire the console.log(i) anyways?
This is my full code for the button i believe
Should the if use the aMessage.customId or collector.customId ?
now im getting this error.
Huh?
i actually do have await in my code, not sure why its not in my snippet above
oh , that should be the interaction right
i dont have collect event rn
this code gives me error i gave above
i guess i did not
added await to this ^ and got method not allowed response
So got it working when it actually give me some console.log()
Should be button be callable only once?
no... i mean, doesnt matter how myn times i clicked the button , it got fired only once
Im just super dumb lol. Thanks for your assistance.