mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-11-02 17:29:22 +01:00
Made a potential AssertionError not get raised.
This commit is contained in:
parent
6d117b2992
commit
de72ad4026
@ -122,12 +122,17 @@ def reply(msg, s, prefixName=True, private=False, notice=False, to=None):
|
||||
else:
|
||||
m = ircmsgs.privmsg(msg.args[0], s)
|
||||
else:
|
||||
if s:
|
||||
m = ircmsgs.privmsg(to, s)
|
||||
else:
|
||||
return error(msg, 'I tried to send you an empty message.',
|
||||
prefixName=prefixName, private=private,
|
||||
notice=notice, to=to)
|
||||
return m
|
||||
|
||||
def error(msg, s):
|
||||
def error(msg, s, **kwargs):
|
||||
"""Makes an error reply to msg with the appropriate error payload."""
|
||||
return reply(msg, 'Error: ' + s)
|
||||
return reply(msg, 'Error: ' + s, **kwargs)
|
||||
|
||||
def getHelp(method, name=None):
|
||||
if name is None:
|
||||
|
Loading…
Reference in New Issue
Block a user