Closed cntrlwiz closed 9 years ago
Don't we get same result using hidden commands ?
Not really. "Hidden" commands are code-driven and bot-wide. I wanted to be able to configure them with config.json per conversation. Some of my hangouts are dead serious, and some are for fun. I will 'admin' the fun functions in the serious hangouts.
I thought about creating another tier of commands, "admin-hidden", but that got muddy really fast. It was easier to just hide the admin commands from those users who can't use them anyway.
I like this. Can you go ahead and submit a pull request for it?
I didn't want the users trying every command in the help, so I borrowed check_if_can_run_command from Handlers, and put it into UtilBot for /help to access.
Modified /help command to loop through all commands, and create a commands_test list from the commands that pass the check. This list is then used in the docstring.
The user is now presented ONLY those commands that the user can run.
https://github.com/cntrlwiz/IngressBot/pull/13