[Mod] Fixed loud RuntimeError on modlog cases (#2331)

This commit is contained in:
Kowlin
2018-12-16 00:26:48 +01:00
committed by Toby Harradine
parent 351749dff6
commit 38b15ded87
2 changed files with 10 additions and 8 deletions

View File

@@ -1570,8 +1570,9 @@ class Mod(commands.Cog):
"""
An event for modlog case creation
"""
mod_channel = await modlog.get_modlog_channel(case.guild)
if mod_channel is None:
try:
mod_channel = await modlog.get_modlog_channel(case.guild)
except RuntimeError:
return
use_embeds = await case.bot.embed_requested(mod_channel, case.guild.me)
case_content = await case.message_content(use_embeds)