From cffbcad430f937d6f48bed720db30d69873bec46 Mon Sep 17 00:00:00 2001 From: jesopo Date: Tue, 10 Dec 2019 11:27:42 +0000 Subject: support bot-wide aliases with `!balias` closes #212 --- src/core_modules/aliases.py | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src') diff --git a/src/core_modules/aliases.py b/src/core_modules/aliases.py index 3b120370..f1648fea 100644 --- a/src/core_modules/aliases.py +++ b/src/core_modules/aliases.py @@ -59,6 +59,7 @@ class Module(ModuleManager.BaseModule): event["command"].args.split(" ")) @utils.hook("received.command.alias") + @utils.hook("received.command.balias") @utils.hook("received.command.calias", require_mode="o", require_access="alias") @utils.kwarg("min_args", 1) @@ -74,6 +75,8 @@ class Module(ModuleManager.BaseModule): raise utils.EventError("%scalias can only be used in-channel" % event["command_prefix"]) target = event["target"] + elif event["command"] == "balias": + target = self.bot subcommand = event["args_split"][0].lower() if subcommand == "list": -- cgit v1.3.1-10-gc9f91