diff options
| author | 2018-09-19 13:25:12 +0100 | |
|---|---|---|
| committer | 2018-09-19 13:25:12 +0100 | |
| commit | fcbb7c960ce8c9b693711b4b40d3fa86fd17d7cf (patch) | |
| tree | 0015e3da000323b8f576f3303807176f1f4ea794 /modules/to.py | |
| parent | Fix some styling in ducks.py (diff) | |
| signature | ||
Refactor everything to use delimited events
Diffstat (limited to 'modules/to.py')
| -rw-r--r-- | modules/to.py | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/modules/to.py b/modules/to.py index 849f3af6..22b9c7ac 100644 --- a/modules/to.py +++ b/modules/to.py @@ -2,13 +2,12 @@ import EventManager class Module(object): def __init__(self, bot, events, exports): - events.on("received").on("message").on("channel" - ).hook(self.channel_message, + events.on("received.message.channel").hook(self.channel_message, priority=EventManager.PRIORITY_HIGH) - events.on("received").on("command").on("to").hook( - self.to, min_args=2, help=("Relay a message to a " - "user the next time they talk in a channel"), - channel_only=True, usage="<username> <message>") + events.on("received.command.to").hook(self.to, min_args=2, + help=("Relay a message to a user the next time they talk " + "in this channel"), channel_only=True, + usage="<username> <message>") def channel_message(self, event): messages = event["channel"].get_user_setting(event["user"].get_id(), |
