"The application did not respond" on bulkDelete message use
Hello, just built my first slash command, what I coded seems fair though the command doesn't seem to be registered. When writing down
/
I don't even see my bot appearing (only the built-in stuff).
Does the code seem fair? I can't see any major mistake that would make it not register...
Also I get this in the console if that means something
29 Replies
Tried kicking - reinviting the bot which displays the command but then it says "application did not respond" and obviously kicking the bot each time I make or update a command isn't the way lol
Also added
ApplicationCommandRegistries.setDefaultBehaviorWhenNotIdentical(RegisterBehavior.BulkOverwrite);
but that doesn't seem to change anything
Also is that how you "idHint" a command?
Couldn't find more precision in the doc except telling you to do itit's not
Global commands usually take a bit to update (up to an hour, usually under 10 minutes in my experience, and quicker if you restart your Discord client often). When you kicked and re-invited it, it probably refreshed its commands for your Discord client. But at that point the bot might've been offline or you had a different error in your code so it wasn't responsive
idHints are part of the options of
registerChatInputCommand
https://sapphirejs.dev/docs/Guide/commands/application-commands/application-command-registry/registering-chat-input-commands/#idhintsSapphire Framework
Registering Chat Input Commands | Sapphire
To register a Chat Input Command (also known as a Slash Command) with Discord, you need to acquire an application
nah it's instant. It took that long only in slash v1 which is gone for a long time now.
but there can be client side caching yes
Oh oops
That's good
Well well
also aliases do nothing for slash commands btw. Since you provide the name and it only responds to that name
OK I'm on the wrong path for idHints first, got there which I thought was good lmao
that is also wrong
Well yes now I know
Thank you for that :)
Just saying but if you would switch from JavaScript to TypeScript the compiler would tell you about such mistakes, something to consider perhaps
Also true will look into that
Hmm now I've got idHints thing correct
Do I need to like clear my command to start fresh and actually put the idHints before it was generated 20 times?
shouldnt need to but if you want to see what is currently registered you can use https://slash-commands-gui.androz2091.fr
Slash Commands GUI
Graphical User Interface to explore and edit your bot's slash commands!
OK that's nice because now there's nothing
as for the application not responding, at a glance the code looks fine although I would make chatInputRun async, await then bulkDelete then reply. I would also add a defer at the top since a bulk delete can take a while and you must respond within 5 seconds otherwise Discord considers the application failed to respond
I mean I did nothing and application still not responding from Discord so that makes sense but I really don't know what to aim for now
defer? you mean? Also that looks like that now if that is what you meant. And also I'm trying to delete just 1 message for testing purpose so I don't know if it should take that long or if that doesn't matter but yeah
Lots of efforts for a 5 lines command ahah, thanks for your help btw hopefully next commands will be easier to setup
Well kind of made some research and got there but still
The application did not respond
. I think it's me not having the logic to make something long cool for Discord's API so if anyone has the recipe I'll take itMade a cool
hello.mjs
that does work in the meantime lolWell still not
I am now filled with despair from a simple missed use of the integrated bulkDelete method :depressed:
@Helpers if that makes sense....
This worked (o1 generated) I'm just stunned right now because it's smart and at the same time why can I not just call bulkDelete? Anyway I guess that'll do... Thanks y'all. By the way if anyone can spot what makes the difference I'll take it
Solution
More readable code :
Never fucking mind I had to pass "true" as bulkDelete second parameter, and I'm talking alone too much hope you had fun, I'm out!