From af0ba17885774cc64070e0668be6d0c874adecf4 Mon Sep 17 00:00:00 2001 From: Rapptz Date: Thu, 30 Mar 2017 03:27:44 -0400 Subject: [PATCH] Proper termination of HistoryIterator.flatten. --- discord/iterators.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/discord/iterators.py b/discord/iterators.py index 32489c90f..c8a3bdc0c 100644 --- a/discord/iterators.py +++ b/discord/iterators.py @@ -301,7 +301,7 @@ class HistoryIterator(_AsyncIterator): self.channel = channel while self._get_retrieve(): data = yield from self._retrieve_messages(self.retrieve) - if self.limit is None and len(data) < 100: + if len(data) < 100: self.limit = 0 # terminate the infinite loop if self.reverse: