Interaction already replied while it isn't
Whenever I run a cmd which has deferReply() at start of execution, I get that interaction is already replied. It's not being defered from what I can log in terminal but still got the issue
24 Replies
you must have replied to it already then
share your command handler's code
and your command's code
show where you call onCommandsInteraction and leaderboardGraveyard
also you don't need to send your client alongside the interaction, every djs object already has a reference to the client, including interactions
the event handler hanldes the calls:
when the cmd is run the eventhandler runs, looks for event folder, then the sub folder name is used as event name,

and what about leaderboardGraveyard?
when the cmd is run the the cmd file is looked up and then the assoicated sub cmd is ran
that only loads commands though, not subcommands
leaderboardGraveyard isn't even default-exported
it's a named export, it suggests you're importing it manually and calling it
yeah, it load the cmd, the sub cmd is then called form that file:
https://sourceb.in/rS3Hxgaacx
looks fine I think, can you share the full error?
is it clear?

i mean the img
ah, that's the dapi error, not the djs one
it's likely you have two different processes handling the same command
hm
this is what i can see on running the leaderboard cmd one time, i don't think other process would be handling the same process

if you stop that process, does the bot still reply?
on running the cmd i get this error but i still get leaderboard embed
yeah that does sound like you have another process
if it was in the same process you'd get the djs error
djs stores in the interaction whether it has already been replied, but obviously it only knows about replies on its own process, it doesn't know about others'
if it has stored that the interaction has been replied, and you reply again, it'll throw a djs error, since that'll throw an api error anyways if it does get sent
but you're getting the api error, so djs doesn't know it has already been replied to, it was done by a different process
So is it a discord error? I have been some other bots taking alot more time to respond and sometimes it doesn't even execute. For example the Sapphire bot.
that'd be a different kind of error, and no, as I said, your interaction is being handled by another process, you'll need to figure which and kill it
or you can reset your token, it'll logout any existent connections
Ahh... Wait
this line cleared my issue, i already have a host running my bot 😅
The thread owner has marked this issue as solved.