diff --git a/techsupport_bot/botlogging/events.py b/techsupport_bot/botlogging/events.py index ea33e3a0..105da6bb 100644 --- a/techsupport_bot/botlogging/events.py +++ b/techsupport_bot/botlogging/events.py @@ -536,7 +536,7 @@ async def on_guild_role_create(self, role: discord.Role): f"New role with name {role.name} added to guild with ID {role.guild.id}" ), level=LogLevel.INFO, - context=LogContext(guild=role.before), + context=LogContext(guild=role.guild), channel=log_channel, embed=embed, ) @@ -554,7 +554,7 @@ async def on_guild_role_delete(self, role: discord.Role): f"Role with name {role.name} deleted from guild with ID {role.guild.id}" ), level=LogLevel.INFO, - context=LogContext(guild=role.before), + context=LogContext(guild=role.guild), channel=log_channel, embed=embed, ) @@ -579,7 +579,7 @@ async def on_guild_role_update(self, before: discord.Role, after: discord.Role): f" {before.guild.id}" ), level=LogLevel.INFO, - context=LogContext(guild=before.before), + context=LogContext(guild=before.guild), channel=log_channel, embed=embed, )