Giveaway interection question
Hello , im new in discordjs, i actually download the foundation of discord bot from github, then on top of it i create my own commands...
I am trying to make a giveaway, but interactionCreate doesn't sync the button, therefore currently i put my button interaction into my giveaway.js... Seek for some help on fixing the following:
1. how can i add button into interactionCreate.js?
2. I trying to create multiple giveaway at the same time, but shows up an error like screenshot, and at the end of the giveaway the bot spam winners.
11 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!I didnt add any database like (MongoDB) for Giveaway
Message Components: Buttons
read more
Common causes of
DiscordAPIError[10062]: Unknown interaction
:
- Initial response took more than 3 seconds ➞ defer the response *.
- Wrong interaction object inside a collector.
- Two processes handling the same command (the first consumes the interaction, so it won't be valid for the other instance)
* Note: you cannot defer modal or autocomplete value responses
If you are waiting for button or select menu input from a specific message, don't create the collector on the channel.
- Channel collectors return component interactions for any component within that channel.
okay, let me try
How can i add this?
its for InteractionCreate.js or giveaway.js?
ok let me see
I got new update on this
ok hold on
Finding your bot token:
- Visit the application dashboard and select your application
- Navigate to the Bot tab (not General Information, not OAuth2)!
- Click
Reset Token
and copy token | https://i.imgur.com/c12eP0t.png (image)
Note: Remember to change the token in your application after you reset itKind of weird i got this error after put in : [ERROR] SyntaxError: Invalid or unexpected token
owh...
found it
any references I can check on?