From 2a37e1053363577d9b47601e44533733bb48560a Mon Sep 17 00:00:00 2001 From: jesopo Date: Sun, 9 Sep 2018 17:08:38 +0100 Subject: [PATCH] Change default priority to "medium", add priority lower than "low" ("monitor") --- EventManager.py | 3 ++- modules/to.py | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/EventManager.py b/EventManager.py index 560c671e..604ae337 100644 --- a/EventManager.py +++ b/EventManager.py @@ -4,8 +4,9 @@ PRIORITY_URGENT = 0 PRIORITY_HIGH = 1 PRIORITY_MEDIUM = 2 PRIORITY_LOW = 3 +PRIORITY_MONITOR = 4 -DEFAULT_PRIORITY = PRIORITY_LOW +DEFAULT_PRIORITY = PRIORITY_MEDIUM DEFAULT_DELIMITER = "." class Event(object): diff --git a/modules/to.py b/modules/to.py index e566e4c7..849f3af6 100644 --- a/modules/to.py +++ b/modules/to.py @@ -4,7 +4,7 @@ class Module(object): def __init__(self, bot, events, exports): events.on("received").on("message").on("channel" ).hook(self.channel_message, - priority=EventManager.PRIORITY_MEDIUM) + 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"),