diff options
| author | Rapptz <[email protected]> | 2017-01-11 13:24:28 -0500 |
|---|---|---|
| committer | Rapptz <[email protected]> | 2017-01-11 13:24:28 -0500 |
| commit | 0e0b569d53cfb6af73f3ddaa64adf0e51c07dfa8 (patch) | |
| tree | b6892949914fdc4da9f493caaee59ec9e27df705 /discord/iterators.py | |
| parent | Remove extraneous unneeded hash calls. (diff) | |
| download | discord.py-0e0b569d53cfb6af73f3ddaa64adf0e51c07dfa8.tar.xz discord.py-0e0b569d53cfb6af73f3ddaa64adf0e51c07dfa8.zip | |
Propagate event loop in Messageable.history.
Diffstat (limited to 'discord/iterators.py')
| -rw-r--r-- | discord/iterators.py | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/discord/iterators.py b/discord/iterators.py index 3ac75593..b13573e5 100644 --- a/discord/iterators.py +++ b/discord/iterators.py @@ -92,7 +92,10 @@ class LogsFromIterator: self.reverse = reverse self._filter = None # message dict -> bool - self.messages = asyncio.Queue() + + self.state = self.messageable._state + self.logs_from = self.state.http.logs_from + self.messages = asyncio.Queue(loop=self.state.loop) if self.around: if self.limit > 101: @@ -137,8 +140,6 @@ class LogsFromIterator: # do the required set up channel = yield from self.messageable._get_channel() self.channel = channel - self.state = channel._state - self.logs_from = channel._state.http.logs_from if self.limit > 0: retrieve = self.limit if self.limit <= 100 else 100 |