From 1c36fdf3b87716c805855672982f7275596407a1 Mon Sep 17 00:00:00 2001 From: zevaryx Date: Wed, 4 May 2022 23:03:15 -0600 Subject: [PATCH] Fix missing guild field --- jarvis/client.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/jarvis/client.py b/jarvis/client.py index a4693f4..e1fea03 100644 --- a/jarvis/client.py +++ b/jarvis/client.py @@ -298,7 +298,8 @@ class Jarvis(Client): async def process_verify(self, before: Member, after: Member) -> Embed: """Process user verification.""" - auditlog = await after.guild.fetch_audit_log(user_id=before.id, action_type=AuditLogEventType.MEMBER_ROLE_UPDATE) + guild = await self.fetch_guild(after._guild_id) + auditlog = await guild.fetch_audit_log(user_id=before.id, action_type=AuditLogEventType.MEMBER_ROLE_UPDATE) audit_event = get(auditlog.events, reason="Verification passed") if audit_event: admin_mention = "[N/A]" @@ -320,7 +321,8 @@ class Jarvis(Client): if before.roles == after.roles: return - auditlog = await after.guild.fetch_audit_log(user_id=before.id, action_type=AuditLogEventType.MEMBER_ROLE_UPDATE) + guild = await self.fetch_guild(after._guild_id) + auditlog = await guild.fetch_audit_log(user_id=before.id, action_type=AuditLogEventType.MEMBER_ROLE_UPDATE) new_roles = {} removed_roles = {}