aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRapptz <[email protected]>2017-05-31 05:01:19 -0400
committerRapptz <[email protected]>2017-05-31 05:01:19 -0400
commitb13d437bb95a769616285b288d20533895b60c57 (patch)
tree7f3bb05b3b013f33f18a43b3fb973e7e067eb62a
parentDocument Message.embeds and Message.attachments changes. (diff)
downloaddiscord.py-b13d437bb95a769616285b288d20533895b60c57.tar.xz
discord.py-b13d437bb95a769616285b288d20533895b60c57.zip
Don't assume the inviter is always there.
-rw-r--r--discord/audit_logs.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/discord/audit_logs.py b/discord/audit_logs.py
index 3e5fe45e..dfdf6fb0 100644
--- a/discord/audit_logs.py
+++ b/discord/audit_logs.py
@@ -326,7 +326,10 @@ class AuditLogEntry:
}
obj = Invite(state=self._state, data=fake_payload)
- obj.inviter = changeset.inviter
+ try:
+ obj.inviter = changeset.inviter
+ except AttributeError:
+ pass
return obj
def _convert_target_emoji(self, target_id):