diff options
Diffstat (limited to 'discord/iterators.py')
| -rw-r--r-- | discord/iterators.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/discord/iterators.py b/discord/iterators.py index fbf1a72c..2ea51436 100644 --- a/discord/iterators.py +++ b/discord/iterators.py @@ -72,6 +72,7 @@ class LogsFromIterator: def __init__(self, client, channel, limit, before=None, after=None, around=None, reverse=False): self.client = client + self.connection = client.connection self.channel = channel self.limit = limit self.before = before @@ -125,7 +126,9 @@ class LogsFromIterator: if self._filter: data = filter(self._filter, data) for element in data: - yield from self.messages.put(Message(channel=self.channel, **element)) + yield from self.messages.put( + self.connection._create_message( + channel=self.channel, **element)) @asyncio.coroutine def _retrieve_messages(self, retrieve): |