misc(aurora): send evidenceformat to dms if send_evidenceformat is called outside of an Interaction context, as epheremal messages would be disabled in this case

This commit is contained in:
Seaswimmer 2024-07-06 18:58:04 -04:00
parent 461fbf83ee
commit 9d0f2e3887
Signed by: cswimr
GPG key ID: 3813315477F26F82

View file

@ -145,11 +145,12 @@ async def send_evidenceformat(ctx: commands.Context, moderation_id: int) -> None
or await config.guild(guild=ctx.guild).auto_evidenceformat()
or False
)
if send_evidence_bool is False:
return
if send_evidence_bool is True:
moderation = await Moderation.find_by_id(ctx.bot, moderation_id, ctx.guild.id)
content = await evidenceformat_factory(moderation=moderation)
if not ctx.interaction:
await ctx.author.send(content=content)
else:
await ctx.send(content=content, ephemeral=True)