From 0b1c49880dca0739d1f8bf7953f666d81488ec2d Mon Sep 17 00:00:00 2001 From: Jake Date: Sun, 9 Oct 2016 22:43:47 -0700 Subject: [PATCH] andrei needs a linter --- disco/types/channel.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/disco/types/channel.py b/disco/types/channel.py index 9ec585d..726af4a 100644 --- a/disco/types/channel.py +++ b/disco/types/channel.py @@ -150,7 +150,7 @@ class Channel(Model, Permissible): Creates a new :class:`MessageIterator` for the channel with the given keyword arguments """ - return MessageIterator(self.client, self.id, **kwargs) + return MessageIterator(self.client, self, **kwargs) @cached_property def guild(self): @@ -313,7 +313,7 @@ class MessageIterator(object): Fills the internal buffer up with :class:`disco.types.message.Message` objects from the API """ self._buffer = self.client.api.channels_messages_list( - self.channel, + self.channel.id, before=self.before, after=self.after, limit=self.chunk_size) @@ -326,9 +326,10 @@ class MessageIterator(object): if self.direction == self.Direction.UP: self.before = self._buffer[-1].id + else: self._buffer.reverse() - self.after == self._buffer[-1].id + self.after = self._buffer[-1].id def next(self): return self.__next__()