Cainy
DIAdiscord.js - Imagine an app
•Created by Cainy on 8/2/2024 in #djs-questions
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.14 replies