From eb6b22d93e77a1c57b3cad12497c4a2de5c09c6d Mon Sep 17 00:00:00 2001 From: Andrei Date: Wed, 14 Feb 2018 20:54:47 -0800 Subject: [PATCH] state listeners should use Priority.BEFORE --- disco/state.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/disco/state.py b/disco/state.py index a25dc27..3f33dea 100644 --- a/disco/state.py +++ b/disco/state.py @@ -3,6 +3,7 @@ import weakref from collections import deque, namedtuple from gevent.event import Event +from holster.emitter import Priority from disco.types.base import UNSET from disco.util.config import Config @@ -132,7 +133,7 @@ class State(object): for event in self.EVENTS: func = 'on_' + underscore(event) - self.listeners.append(self.client.events.on(event, getattr(self, func))) + self.listeners.append(self.client.events.on(event, getattr(self, func)), priority=Priority.BEFORE) def fill_messages(self, channel): for message in reversed(next(channel.messages_iter(bulk=True))):