aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRapptz <[email protected]>2017-05-07 11:53:17 -0400
committerRapptz <[email protected]>2017-05-07 12:09:27 -0400
commiteb58ddffd84c20546130aa40db774688570490a4 (patch)
treea4bc88eab8ae733cf61a7eaa2282d4ab1496249e
parentAdd support for audit log reasons. (diff)
downloaddiscord.py-eb58ddffd84c20546130aa40db774688570490a4.tar.xz
discord.py-eb58ddffd84c20546130aa40db774688570490a4.zip
Skip None action types when iterating.
-rw-r--r--discord/iterators.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/discord/iterators.py b/discord/iterators.py
index 86e21931..d190433c 100644
--- a/discord/iterators.py
+++ b/discord/iterators.py
@@ -477,4 +477,8 @@ class AuditLogIterator(_AsyncIterator):
self._users[u.id] = u
for element in data:
+ # TODO: remove this if statement later
+ if element['action_type'] is None:
+ continue
+
yield from self.entries.put(AuditLogEntry(data=element, users=self._users, guild=self.guild))