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.
No description
11 Replies
d.js toolkit
d.js toolkit16mo ago
- 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!
FG
FGOP16mo ago
No description
FG
FGOP16mo ago
I didnt add any database like (MongoDB) for Giveaway
d.js docs
d.js docs16mo ago
guide 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.
- <Channel>.createMessageComponentCollector(…)
+ <Message>.createMessageComponentCollector(…)
- <Channel>.createMessageComponentCollector(…)
+ <Message>.createMessageComponentCollector(…)
FG
FGOP16mo ago
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
d.js docs
d.js docs16mo ago
To share long code snippets, use a service like gist, sourcebin, starbin, or similar instead of posting them as large code blocks or files.
FG
FGOP16mo ago
ok hold on
FG
FGOP16mo ago
SourceBin
Giveaway.js
Instantly share your code with the world.
SourceBin
InteractionCreate.js
Instantly share your code with the world.
d.js docs
d.js docs16mo ago
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 it
FG
FGOP16mo ago
Kind of weird i got this error after put in : [ERROR] SyntaxError: Invalid or unexpected token owh... found it any references I can check on?
Want results from more Discord servers?
Add your server