Don't show disabled commands.
This commit is contained in:
parent
d81aa6d7fb
commit
4d0d730a75
|
@ -8,10 +8,11 @@ def help(inp, bot=None, pm=None):
|
|||
".help [command] -- gives a list of commands/help for a command"
|
||||
|
||||
funcs = {}
|
||||
disabled = bot.config.get('disabled_plugins', [])
|
||||
for command, (func, args) in bot.commands.iteritems():
|
||||
fn = re.match(r'^plugins.(.+).py$', func._filename)
|
||||
disabled = bot.config.get('disabled_plugins', [])
|
||||
if fn.group(1).lower() not in disabled:
|
||||
if command not in bot.config.get('disabled_commands', []):
|
||||
if func.__doc__ is not None:
|
||||
if func in funcs:
|
||||
if len(funcs[func]) < len(command):
|
||||
|
|
Loading…
Reference in New Issue