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

add help handler #4

Open
mgaut72 opened this issue Nov 19, 2014 · 5 comments
Open

add help handler #4

mgaut72 opened this issue Nov 19, 2014 · 5 comments

Comments

@mgaut72
Copy link
Contributor

mgaut72 commented Nov 19, 2014

Some handler that responds to !<botname> help or maybe just !help

This might include adding another abstract method to the handler class, which is something like

abstract string getHelpMessage();

This way, the help handler could iterate over all the bots handlers and tell us about the functionality of each handler the bot has

@lnanglin
Copy link

Would this include things it can help with, such as certain commands you can run with help?

For example, if you just ran "help" or "botname help" (or it could support both), it would list the different commands it can help you with. I guess sort of like --usage but instead of different arguments you can include, it lists the different commands you can run, and a short description of each.

And then if you run "help command" it handles that command.

The only problem I can think is that you then have to hard code in each command that it handles.

What do you think? Too much?

Just throwing around ideas.

@mgaut72
Copy link
Contributor Author

mgaut72 commented Nov 21, 2014

it is common for IRC bot commands to be prefaced with a '!'

I suggested !<botname> help since this would account for the case where there are multiple bots in the channel (though this is still up for discussion).

If we did not support !<botname> help <command> I think adding the String getHelpMessage() would be sufficient to add to the bot interface. Adding support for a command is a bigger question, but I think hard coding should not be the answer. Does there need to be a distinction between a generic handler and a command?

@lnanglin
Copy link

I guess then I'm just not understanding how the getHelpMessage() would work.

I was thinking along the lines of the bots being able to help with different things and so I thought if you just said !<botname> help, it wouldn't know what to help you with. And if it doesn't know what to help you with, then I guess I just don't see the point of including it.

Also, I'm not seeing how you would be able to do things with these help messages if you don't include cases for responding appropriately. But maybe I'm just over thinking the issue.

@gizmo385
Copy link

The help message could be expressed similarly to a usage statement on command line application. It doesn't necessarily need to provide a long detailed response on how to perform an action. Stuff like that would probably be left to wiki documentation.

@lnanglin
Copy link

Oh so it would be sort of like a man page that says what the bot can do?

I was thinking you would ask the bot !<botname> help calculator 4 + 5 or something like that. That's why I was confused on why you wouldn't specify what it can help you with.

But sort of listing everything the bot does makes a lot more sense.

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

No branches or pull requests

4 participants