Skip to content
This repository has been archived by the owner on Aug 1, 2021. It is now read-only.

Commit

Permalink
state listeners should use Priority.BEFORE
Browse files Browse the repository at this point in the history
  • Loading branch information
b1naryth1ef committed Feb 15, 2018
1 parent 56d705a commit eb6b22d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion disco/state.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@

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
Expand Down Expand Up @@ -132,7 +133,7 @@ def bind(self):

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))):
Expand Down

0 comments on commit eb6b22d

Please sign in to comment.