messageSubcommandNoMatch listener not working
Hello again
Currently I am trying to handle the
messageSubcommandNoMatch
error. I've registered a listener for it:
listeners/messageSubcommandNoMatch.ts
Now when I am trying to execute a subcommand which does not exist, this listener does not get executed. Instead I just see the error in the console from Sapphires default error listener.
Taking the log in the console, I can confirm that the expected identifier
is messageSubcommandNoMatch
I have checked whether the listener is actually registered, and for me it appears all right. (Check screenshot)
My other listeners e.g. messageCreate
work just fine. Is there something I am missing? Maybe because this is not a event directly bound to Discord? 2 Replies
I kind of fixed it by doing this:
listeners/messageCommandError.ts
Now my messageSubcommandNoMatch
listener works.
So is this the intended way of tackling that, or am I doing something else wrong Hm no it definitely isn’t the listener should just be triggered.
I’ll have to investigate this