mirror of
https://github.com/Mikaela/Limnoria.git
synced 2025-01-11 20:52:42 +01:00
Better error message in the cases where there are no commands.
This commit is contained in:
parent
8569d70f85
commit
6c88a6a315
@ -88,7 +88,10 @@ class Misc(callbacks.Privmsg):
|
|||||||
irc.error('No such plugin %r exists.' % name)
|
irc.error('No such plugin %r exists.' % name)
|
||||||
elif isinstance(cb, callbacks.PrivmsgRegexp) or \
|
elif isinstance(cb, callbacks.PrivmsgRegexp) or \
|
||||||
not isinstance(cb, callbacks.Privmsg):
|
not isinstance(cb, callbacks.Privmsg):
|
||||||
irc.error('That plugin exists, but it has no commands.')
|
irc.error('That plugin exists, but it has no commands. '
|
||||||
|
'You may wish to check if it has any useful '
|
||||||
|
'configuration variables with the command '
|
||||||
|
'"config list supybot.plugins.%s".' % name)
|
||||||
else:
|
else:
|
||||||
commands = []
|
commands = []
|
||||||
for s in dir(cb):
|
for s in dir(cb):
|
||||||
@ -171,8 +174,8 @@ class Misc(callbacks.Privmsg):
|
|||||||
names = [cb.name() for cb in cbs]
|
names = [cb.name() for cb in cbs]
|
||||||
names.sort()
|
names.sort()
|
||||||
irc.error('That command exists in the %s plugins. '
|
irc.error('That command exists in the %s plugins. '
|
||||||
'Please specify exactly which plugin command '
|
'Please specify exactly which plugin command '
|
||||||
'you want help with.'% utils.commaAndify(names))
|
'you want help with.'% utils.commaAndify(names))
|
||||||
return
|
return
|
||||||
else:
|
else:
|
||||||
assert len(tokens) == 2
|
assert len(tokens) == 2
|
||||||
|
Loading…
Reference in New Issue
Block a user