Constantly getting "The application did not respond"
Hello, I am constantly getting the "The application did not respond" message. Not matter what I try to achieve the only thing that is fast enough to execute is a simple
await interaction.reply('bla bla')
. Anytime I try to do something from bulkDelete to sending embeds or creating buttons, I get the thing. Is there anything to try and debug that? Is it possible that my computer is too slow for developing a bot (lmao, it is not that slow though).
Obviously defering doesn't do a thing. At first I thought my code was wrong but sometimes it works, sometimes it doesn't... One thing remains, this damn message telling me it didn't respond.
Maybe there is a problem with how Sapphire handles my commands right now, found somewhere that a command handler could mess things up and take too long to load up the commands so in the meantime, no response...
I really don't know what's happening, again if you have some kind of super debugging stuff or I don't know I'll take it18 Replies
defer the reply because you only get 3 seconds to respond to the interaction
after deferring the reply, you can then use editReply to update to your provided response
Well yes
Obviously defering doesn't do a thingAlso (sorry for long text), this used to worked like twice or thrice and then never worked again That's why I'm wondering if it isn't, not like a Sapphire problem, but how it handles things or did I mess up something at some point because clearly the code worked once then didn't work again
if deferring isn't working, it's because your doing it too late. since your use ephemeral for your errors, move the defer to the very top so it runs as soon as possible
I guess it still doesn't work
(code)
Putting it above the try also doesn't work
Also the command is received instantly so it should do
I guess neither the bot nor my pc nor Sapphire is too slow just hm not working ig
I guess adding ephemeral each time is redundant too but removing these doesn't change
is your chatInputRun method being executed? perhaps you try adding a log at the top to check but also, showing the full file might help us more than just showing that method
Pastebin
import { Command } from '@sapphire/framework';import { PermissionsB...
Pastebin.com is the number one paste tool since 2002. Pastebin is a website where you can store text online for a set period of time.
Here's the full file and let me see with log
Hmm good point it's not being executed
that would suggest that sapphire is not finding your command
is your package.json main correctly setup?
OK wait
So I removed my precondition and my idHints which I guess would most likely be the cause
Worked
Re-added the exact same idHint
Worked
Re-added the exact same precondition
Worked
So I don't know am I just gambling it's working by removing random stuff?
And restarting the bot with everything in place
Doesn't work!!!!!!!!!!!!!!!!!!!!!!!!
going mad!!!!!!!!!
it could be that your AdminOnly precondition is not passing, thus not continuing to execute your command's code
i would recommend https://www.sapphirejs.dev/docs/Guide/preconditions/reporting-precondition-failure/ for such
Sapphire Framework
Reporting precondition failure | Sapphire
When a precondition fails, it's usually important for the user to know why. For example, if they hit a cooldown or lack
Will look into that
Thank you very much for your patience and reading through long text for such a mistake
And thank you for that piece of doc
Have a very nice day Seren
Btw don't want to be too cocky but does that seem correct lmao
Cuz' it's the culprit for all my suffering
in discord.js v14, permissions aren't screaming snake case anymore so it would be
Administrator
instead of all capsOr you can just use
PermissionFlagsBits
from discord.js
const to get it. Way more reliable
member?.permissions.has(PermissionFlagsBits.Administrator)
like this