kyle13
SIASapphire - Imagine a framework
•Created by kyle13 on 4/5/2023 in #sapphire-support
Handling deletion of all guild specific slash commands with BulkOverwrite
I've been using BulkOverwrite to manage slash commands for guilds and use the
ApplicationCommandRegistryRegisterOptions
to specify an array of guildIds
to create guild specific commands with registerChatInputCommand
. This works great as long as I have at least one guild specific command for a guild.
The issue is when II remove a guild id from all the command ApplicationCommandRegistryRegisterOptions
then it won't overwrite anything in that guild and so it doesn't delete the removed commands.
Below I've included an example of two commands. Assume that previously both commands were registered for guilds ['111','222','333'] specifically. If I make an update to remove guild '222' from the Help Command and guild '333' from both the Ping and Help Command, then guild '222' will properly delete the Help Command, however guild '333' will not be updated and keep both the Help and Ping Command.
What is the recommended approach to remove guild specific commands from '333' after an update like this? and can it be done using Sapphire and BulkOverwrite somehow?
8 replies
SIASapphire - Imagine a framework
•Created by kyle13 on 3/21/2023 in #sapphire-support
Handling BulkOverwrite Registry Errors
When I encounter this error
I want to be able to capture this error and take an action. In this case update my record of guilds to remove the inaccessible guild.
I've tried to capture the errors using the
error
event listener as well as one on commandApplicationCommandRegistryError
however neither seems to be called when this error occurs. What is the recommended way to listen for these BulkOverwrite error events?
Example listeners which are never called:
37 replies