fix (moderation): Missing resolved setting.

This commit is contained in:
2023-08-19 01:37:01 +03:00
parent 8af1e73c17
commit 14e810c13f
2 changed files with 2 additions and 1 deletions

View File

@@ -109,7 +109,7 @@ class ModerationCog(LionCog):
try:
return await member.send(**kwargs)
except discord.HTTPException:
alert_channel = await self.settings.AlertChannel.get(member.guild.id)
alert_channel = (await self.settings.AlertChannel.get(member.guild.id)).value
if alert_channel:
try:
return await alert_channel.send(content=member.mention, **kwargs)

View File

@@ -87,6 +87,7 @@ class ModerationSettings(SettingGroup):
_model = CoreData.Guild
_column = CoreData.Guild.alert_channel.name
_allow_object = False
@property
def update_message(self) -> str: