[V3 ModLog] Fix [p]reason when the modlog case has no moderator (#1604)

This commit is contained in:
Tobotimus 2018-05-14 09:24:17 +10:00 committed by GitHub
parent 28bbe9c646
commit 119ba7ef8b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -134,7 +134,7 @@ class ModLog:
audit_case = None audit_case = None
async for entry in guild.audit_logs(action=audit_type): async for entry in guild.audit_logs(action=audit_type):
if entry.target.id == case_before.user.id and \ if entry.target.id == case_before.user.id and \
entry.user.id == case_before.moderator.id: entry.action == audit_type:
audit_case = entry audit_case = entry
break break
if audit_case: if audit_case: