gurkult / gurkbot

Our community bot, used for running the server.
MIT License
18 stars 16 forks source link

fix UserInputError being handled incorrectly. #77

Closed vivekashok1221 closed 3 years ago

vivekashok1221 commented 3 years ago

UserInputError has been made part of the if-elif block. This should fix issue #76.

Additionally, MissingRequiredArgument now shows a different message. old: image

now: image

gustavwilliam commented 3 years ago

Thanks. Could you also capitalize the description, so it doesn’t start with a lowercase letter?

vivekashok1221 commented 3 years ago

Thanks. Could you also capitalize the description, so it doesn’t start with a lowercase letter?

Yeah, I thought of that. I think rather than capitalizing, formatting the parameter (language in this case) with backticks is more appropriate. So the description would be "language is a missing required argument which is missing."

Or, we could alter the entire sentence structure.

There are two ways this can be carried out. 1) Get the error in str and format the first word (This is assuming the first word will be the parameter) 2) I believe MissingRequriedArgument can provide you with the missing argument and we should construct a message accordingly.

Both are easy to implement.

vivekashok1221 commented 3 years ago

image

Rather than capitalising, I decided to format the missing argument with a single line code-block. Feel free to suggest changes.

Shivansh-007 commented 3 years ago

Yeah that looks better.

Shivansh-007 commented 3 years ago

Can we merge this as it is a high priority feature?

gustavwilliam commented 3 years ago

it is a high priority feature?

@Shivansh-007 Well, yeah, it's currently one of the most important features on gurkbot, but it's not per say a high priority feature. We have a label for that, and this one does not warrant it.