Do a default event for received data if there's no hooks for it

This commit is contained in:
jesopo 2018-08-29 12:43:54 +01:00
parent fead75cd2f
commit 0b95dfb98b

View file

@ -76,7 +76,7 @@ class LineHandler(object):
#server, prefix, command, args, arbitrary #server, prefix, command, args, arbitrary
self.bot.events.on("raw").on(command).call(server=server, self.bot.events.on("raw").on(command).call(server=server,
prefix=prefix, args=args, arbitrary=arbitrary) prefix=prefix, args=args, arbitrary=arbitrary)
if default_event: if default_event or not hooks:
if command.isdigit(): if command.isdigit():
self.bot.events.on("received").on("numeric").on(command self.bot.events.on("received").on("numeric").on(command
).call(line=line, line_split=line.split(" "), ).call(line=line, line_split=line.split(" "),