bot icon indicating copy to clipboard operation
bot copied to clipboard

Ignore invalid !help arguments at the end if beginning matches valid subcommand

Open dementati opened this issue 4 years ago • 1 comments

Let's say you see an abbreviated command like

!i a l <message>

that you're not familiar with and you want to figure out what it does. So, you go:

!help i a l

Currently, the response will be:

image

This is because despite the fact that the first two characters correspond to a valid subcommand, the final term of the command line, l, is an argument and not a subcommand. Maybe you will understand this and you correct your help command and go

!help i a

which will display the description of !infraction append, including what l stands for and what it does.

At best, this means finding out what the command line does is a two-step process for no good reason. At worst, you might think you misspelled the original command line and will waste time trying to figure out what you did wrong.

This problem can be solved if we simply ignore the final arguments to !help as long as the first matches some subcommand. So, if you go

!help i a l

the first two characters will match infraction append, a valid subcommand, and will display the help page for this command, ignoring the fact that the final character does not match a command. You can then read the help page to find out that l actually is an abbreviation for the last flag.

dementati avatar Oct 31 '21 16:10 dementati

@evgriff and I would like to tackle this. Can someone assign us?

katimoth avatar Dec 03 '21 20:12 katimoth