Make ignore logic PRIORITY_HIGH so it catches before format events
This commit is contained in:
parent
8d2978e161
commit
8b431d25e5
1 changed files with 2 additions and 1 deletions
|
@ -1,7 +1,7 @@
|
||||||
#--depends-on commands
|
#--depends-on commands
|
||||||
#--depends-on permissions
|
#--depends-on permissions
|
||||||
|
|
||||||
from src import ModuleManager, utils
|
from src import EventManager, ModuleManager, utils
|
||||||
|
|
||||||
class Module(ModuleManager.BaseModule):
|
class Module(ModuleManager.BaseModule):
|
||||||
def _user_ignored(self, user):
|
def _user_ignored(self, user):
|
||||||
|
@ -23,6 +23,7 @@ class Module(ModuleManager.BaseModule):
|
||||||
@utils.hook("received.message.channel")
|
@utils.hook("received.message.channel")
|
||||||
@utils.hook("received.notice.private")
|
@utils.hook("received.notice.private")
|
||||||
@utils.hook("received.notice.channel")
|
@utils.hook("received.notice.channel")
|
||||||
|
@utils.kwarg("priority", EventManager.PRIORITY_HIGH)
|
||||||
def message(self, event):
|
def message(self, event):
|
||||||
if self._user_ignored(event["user"]):
|
if self._user_ignored(event["user"]):
|
||||||
event.eat()
|
event.eat()
|
||||||
|
|
Loading…
Reference in a new issue