Right now, if a command is executed in a guild that is not registered, the command fails. The user doesn't get an error message and an error in the logs appears.
Improvement
Option A
The Discord API allows apps to register commands only per guild, so the bot could register the commands first when the guild is registered on the MASZ dashboard. When the guild is deleted from MASZ, the bot removes the slash commands again. To avoid confusion, only a /help command could remain, giving a brief explanation of why commands cannot be used. I prefer this option because it is very user friendly and straight-forward.
Option B
If option A is to complex to implement, at least a good error message should be implemented, saying something like You can't use commands here, because this guild is not registered on the MASZ instance. If you are the instance admin, you can register the guild on the dasboard: [link]
Current Situation
Right now, if a command is executed in a guild that is not registered, the command fails. The user doesn't get an error message and an error in the logs appears.
Improvement
Option A
The Discord API allows apps to register commands only per guild, so the bot could register the commands first when the guild is registered on the MASZ dashboard. When the guild is deleted from MASZ, the bot removes the slash commands again. To avoid confusion, only a /help command could remain, giving a brief explanation of why commands cannot be used. I prefer this option because it is very user friendly and straight-forward.
Option B
If option A is to complex to implement, at least a good error message should be implemented, saying something like
You can't use commands here, because this guild is not registered on the MASZ instance. If you are the instance admin, you can register the guild on the dasboard: [link]