Discord slash command(s) deleting itself. (Sorry closed last post too early)
Hi.
Sorry, I marked my last post as solved too early.
I cannot figure out why when the bot launches and the slash commands are re-added, after the first-use of each command, they just disappear.
For one of the commands, I do get an error attempting to call it a second time, "The reply to this interaction has not been sent or deferred.", but not the other one, it just deletes.
Does anybody have any ideas?
14 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!
- ✅
Marked as resolved by OPquick update: It looks like it is just the bump command now
No. I just meant because they keep deleting or something.
My "registerCommands" method should not fire unless there is a new command
should not
here is the code for it
Yeah
It works as intended
I just sort of scrapped it up, so I wasn't sure
I was told in my previous post that it "shouldn't" be related to the commands registering anyways
I have no idea at this point. When "/bump" is fired, it deletes itself and the one other public command. When the other command is fired, I think it works continuously as intended, but deletes "/bump"
They should be added and staying, right? Instead of me having to re-add them upon every launch *
Removed the try/catch, thank you for catching that
Oh pfff
My bad
How's that
I tried to fit it as best as I could lol
I'm confused on what you mean by the "full" catch block
Sorry
this was it
I mean
That was literally it
lol
for now, I guess you can call it nothing
true I guess..
jesus im tired
let me try
i swear to you i'm not an idiot, just tired 😭
Trying right now
Thank you, lol. Much appreciated
I can't recall if
const { guild } = interaction;
is actually correct or not
oh my god wait whoops
a few minutes ago I accidentally deleted the command.execute
function
ugh
retryingThis is the only output I see.
I forgot to mention I am using sharding
I just set it up to have it there
Yeah, lol. The only difference I have seen so far is the file location.
The bad request error is my own custom error
Sent when the bot errors something like this (it errored correctly)
I'm using docker and I ran the "bot" and "api" container.
Fastify is coming from the API container (which is also logging the error class), and the bot is just logging, I think.
I don't know why they are mixed up like that.
The bot and api are not connected. They are running in separate containers and the bot is only able to communicate with the api container over the API request (network).
I see what you mean though, but I don’t think each shard would technically connect to the API, just send requests.
I do have a feeling the issue might be shard-related, but I am still not sure. I only added the bump command and the shard manager before this started happening. I have no idea what the fix is.
I removed the bump command for now.
The other two commands keep getting an "unknown interaction" error, but the interaction is infact logged. I have no idea why. It happens when I deferReply/editReply/reply