Skip to content
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

Show help command on invalid syntax #94

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

HarHarLinks
Copy link
Collaborator

https://blog.craftyguy.net/cmdline-help/

if you know your user is asking for help, show them the damn help.

Getting the syntax wrong isn't totally equivalent to the user trying to get help. However, it is not unlikely they are actually looking for another command, e.g.:

  1. !remind help, !remind delete, etc
  2. Invalid syntax. Please use !remind [every <recurring time>;] <start time>; <reminder text>.
  3. User has not found the knowledge they seek

@@ -90,7 +90,8 @@ async def inner(self, *args, **kwargs):
# command's name from the `self` object passed to the command
text = (
f"Invalid syntax. Please use "
f"`{CONFIG.command_prefix}{self.command} {syntax}`."
f"`{CONFIG.command_prefix}{self.command} {syntax}`. "
f"Use `!help reminders` to see all help."
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
f"Use `!help reminders` to see all help."
f"Use `{CONFIG.command_prefix}help reminders` to see all help."

probably

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant