irukanoko
DIAdiscord.js - Imagine an app
•Created by irukanoko on 11/5/2023 in #djs-questions
Overloaded? DiscordAPIError[50027]: Invalid Webhook Token
I'm assuming I'm not being rate limited. Should I implement something below? Will it help?
Avoid Repetitive Interactions: To prevent repetitive interactions, you can maintain a record of interactions and ignore duplicates. You can store a unique identifier for each interaction, such as a user ID and a message ID, and check if you've already processed an interaction from the same user for the same message. If you've already processed it, you can ignore subsequent interactions.
Asynchronous Processing: Depending on your bot's architecture, you might consider offloading the processing of button interactions to a background queue system. This can help distribute the workload and improve responsiveness. (Isn't it was already async)
4 replies
DIAdiscord.js - Imagine an app
•Created by irukanoko on 9/6/2023 in #djs-questions
how do you modularize your subcommands so their implementation is in different files?
fixed it. have to
.getSubcommand()
and invoke it in the main slashcommand execute20 replies
DIAdiscord.js - Imagine an app
•Created by irukanoko on 9/6/2023 in #djs-questions
how do you modularize your subcommands so their implementation is in different files?
do i need to explain more?
20 replies
DIAdiscord.js - Imagine an app
•Created by irukanoko on 9/6/2023 in #djs-questions
how do you modularize your subcommands so their implementation is in different files?
do i need to add my subcommands separately from the main commands?
20 replies
DIAdiscord.js - Imagine an app
•Created by irukanoko on 9/6/2023 in #djs-questions
how do you modularize your subcommands so their implementation is in different files?
from my understanding, my command handler is essentially the guide's https://discordjs.guide/creating-your-bot/command-handling.html#command-categories
await command.execute(interaction);
brawl.js
on discord the ./brawl create
shows with all of it's desc and options but when i run it, executes the reply you see above. any thoughts on how to change the interaction to execute my subcommands?20 replies
DIAdiscord.js - Imagine an app
•Created by irukanoko on 9/6/2023 in #djs-questions
how do you modularize your subcommands so their implementation is in different files?
only
./brawl create
shows up. great! but the output is wrong bc it's executing the brawl.js
interaction reply (which shouldn't be seen)
do i have to change my slashcommand handler or is there something i can do inside brawl.js
20 replies
DIAdiscord.js - Imagine an app
•Created by irukanoko on 9/6/2023 in #djs-questions
how do you modularize your subcommands so their implementation is in different files?
ahhh i failed to understand that ty
20 replies
DIAdiscord.js - Imagine an app
•Created by irukanoko on 9/6/2023 in #djs-questions
how do you modularize your subcommands so their implementation is in different files?
do you have an example of something i can reference? the only thing i have in my main slashcommand is
.addSubcommand(importedcmd.data, importedcmd.execute)
20 replies
DIAdiscord.js - Imagine an app
•Created by irukanoko on 9/6/2023 in #djs-questions
how do you modularize your subcommands so their implementation is in different files?
everything works fine when i have it all in 1 file. somehow separating it is causing a problem
20 replies
DIAdiscord.js - Imagine an app
•Created by irukanoko on 9/6/2023 in #djs-questions
how do you modularize your subcommands so their implementation is in different files?
is there something special you need to do with the command handler for subcommands?
20 replies
DIAdiscord.js - Imagine an app
•Created by irukanoko on 9/6/2023 in #djs-questions
how do you modularize your subcommands so their implementation is in different files?
ideally,
/brawl create
is the only thing that should be visable. i reset the global/guild commands using the guide's deploy-commands.js20 replies
DIAdiscord.js - Imagine an app
•Created by irukanoko on 9/6/2023 in #djs-questions
how do you modularize your subcommands so their implementation is in different files?
i have that in my
deploy-commands.js
which i run everytime i start up the bot20 replies
DIAdiscord.js - Imagine an app
•Created by irukanoko on 9/6/2023 in #djs-questions
how do you modularize your subcommands so their implementation is in different files?
how do i make sure to prevent this?
20 replies
DIAdiscord.js - Imagine an app
•Created by irukanoko on 9/6/2023 in #djs-questions
how do you modularize your subcommands so their implementation is in different files?
ty for the help and clarifications!
20 replies
DIAdiscord.js - Imagine an app
•Created by irukanoko on 9/6/2023 in #djs-questions
how do you modularize your subcommands so their implementation is in different files?
let's say i just have
both
/command
and /command subcommand
show up. how do i hide the main command so just the latter shows up?20 replies