-
Notifications
You must be signed in to change notification settings - Fork 32
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SlashCommands: report an error if a parameter is expected but missing #829
Comments
Realizing that the inverse is true, too: if I provide a parameter to a command that should not consume one, it's silently discarded. (This seems reasonable but I suppose one might want to warn on this case, too?) |
One more variation on this issue: I noticed that parsed commands tend to assume exactly one space between a slash command and its argument(s). This happens both in the frontend (e.g. So, If I am currently in the ice rink, Seems like either the regexen should eat arbitrary whitespace, or favour split() (though the latter may prove frictive with arguments where spaces are expected, like room names) |
Hello Azure team,
I'm currently attending the Roguelike Celebration and am enjoying exploring the virtual space. I noticed that if I fail to give an parameter to a slash command that expects one, such as
/look
, I get an error that reads, "Your command /look is not a registered slash command!". However, the problem is not that it's not registered, because of course it is, but rather that an argument was expected. I would expect an error closer to the form, "Your command /look requires an argument" or some such thing.I'm not a TypeScript person, but, It seems like
SlashCommands::matchingSlashCommand
could return a union literal type of the formSlashCommand | "ParamExpected" | "UnregisteredCommand"
, which the caller inreducer.ts
would match on. If you agree that this is a reasonable approach, I'm happy to put out a patch.Cheers,
Nathan
The text was updated successfully, but these errors were encountered: