aboutsummaryrefslogtreecommitdiff
path: root/discord/iterators.py
diff options
context:
space:
mode:
authorRapptz <[email protected]>2017-01-11 13:24:28 -0500
committerRapptz <[email protected]>2017-01-11 13:24:28 -0500
commit0e0b569d53cfb6af73f3ddaa64adf0e51c07dfa8 (patch)
treeb6892949914fdc4da9f493caaee59ec9e27df705 /discord/iterators.py
parentRemove extraneous unneeded hash calls. (diff)
downloaddiscord.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.py7
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