fix: send correct error message if a parsed command is not implemented, etc

This commit is contained in:
dusk 2025-01-05 02:21:23 +09:00
parent 2027da40ad
commit 1a781014bd
No known key found for this signature in database
7 changed files with 31 additions and 33 deletions

View file

@ -57,8 +57,12 @@ public class Context
}
catch (PKError e)
{
// todo: not this
Reply($"{Emojis.Error} {e.Message}");
// don't send an "invalid command" response if the guild has those turned off
if (!(GuildConfig != null && GuildConfig!.InvalidCommandResponseEnabled != true))
{
// todo: not this
Reply($"{Emojis.Error} {e.Message}");
}
throw;
}
}