Weird problems with disappearing slash commands, "Unknown Integration"

TLDR; Slashcommands disappearing after single use, spitting out "Unknown integration". Re-adding bot to server resets the issue so you can use it again, one time. Github: https://github.com/SidneyPiper/strafen-bot DiscordJS: 14.15.2 Bun: 1.0.35 Background: Dear DJS Community. We are a small group of friends that had a pycord bot for years which tracked various penalties and their infractions on the discord server. Like when someone made background noises, is unmuted AFK or doesn't properly greet. Sound a bit strict but the money we collect through it, will be spent on a party someday. We wrote our pycord bot v1 ourselfs and it was dead simple, sqlite database, a few slash commands and simple messages. Then we wanted to step it up and fix some core issues, and make it overall nicer but therefore also more complex under the hood and switched to DiscordJS. The problem: The main problem we have is that we have Slash commands disappearing after a single use, or just responding with "Unknown Integration". When we fetch the slash commands, it shows them gone (Like 4/8 are still there, the rest is gone). Restarting and therefore reuploading the commands does not change the situation but removing the Integration from the DC Server and then adding it back in allows another single use of the commands in question before they dissappear again. Anyone knows whats going on here? Solutions we tried: It kinda worked with application guild commands but thats not what we want. These commands work server independent so they should be global application commands. We tried using deferReply in case a command is taking too long, so that shouldnt be a problem. We tried deleting all previous slash commands via api before we add the new ones.
GitHub
GitHub - SidneyPiper/strafen-bot
Contribute to SidneyPiper/strafen-bot development by creating an account on GitHub.
4 Replies
d.js toolkit
d.js toolkit5mo ago
- 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!
treble/luna
treble/luna5mo ago
this https://bork.treble-is-fluffy.gay/floofd39abb6a.png is a horrible approach and you're likely getting ratelimited
treble/luna
treble/luna5mo ago
you should only deploy once, and globally also no need to fetch guilds there, they are cached by the Guilds intent
Cainy
CainyOP5mo ago
I know this is hella scuffed but you can think of all the guild stuff being removed anyways. this was just a try if it changes anything. I just pushed the local version I removed all of that But you think the problems (that arose yesterday after a long day of testing and not knowing that you wont have to delete them) might have caused a silent ratelimiting to happen? We only really redeploy when we change something so its convenient to have it reload them on startup. But isn't it 200 / day / server ? We created brand new servers and had the exact same issues. Oh okay. I will definitely recheck today, yesterday I was just broken. We definitely had those 29. And probably best to put this in a separate script like you said, because really it doesnt matter if the listener changes, only matters if the Command name/options change. Good to know, thanks!
Want results from more Discord servers?
Add your server