Improve warning DM formatting
This commit is contained in:
parent
22d22e4452
commit
cd6278ce52
@ -1480,9 +1480,7 @@ CRITICAL: Do NOT output anything other than the required JSON response.
|
||||
else:
|
||||
model_path = model_id_to_use
|
||||
|
||||
thinking_config = types.ThinkingConfig(
|
||||
thinking_budget=0
|
||||
)
|
||||
thinking_config = types.ThinkingConfig(thinking_budget=0)
|
||||
|
||||
generation_config = types.GenerateContentConfig(
|
||||
temperature=0.2,
|
||||
@ -1985,10 +1983,24 @@ CRITICAL: Do NOT output anything other than the required JSON response.
|
||||
)
|
||||
try:
|
||||
dm_channel = await message.author.create_dm()
|
||||
await dm_channel.send(
|
||||
f"Your recent message in **{message.guild.name}** was removed for violating Rule **{rule_violated}**. "
|
||||
f"Reason: _{reasoning}_. Please review the server rules. This is a formal warning."
|
||||
warn_embed = discord.Embed(
|
||||
title="⚠️ Moderation Warning",
|
||||
description=(
|
||||
f"Your recent message in **{message.guild.name}** was removed for violating **Rule {rule_violated}**."
|
||||
),
|
||||
color=discord.Color.orange(),
|
||||
)
|
||||
if message.content:
|
||||
warn_embed.add_field(
|
||||
name="Message Content",
|
||||
value=message.content[:1024],
|
||||
inline=False,
|
||||
)
|
||||
warn_embed.add_field(name="Reason", value=reasoning, inline=False)
|
||||
warn_embed.set_footer(
|
||||
text="Please review the server rules. This is a formal warning."
|
||||
)
|
||||
await dm_channel.send(embed=warn_embed)
|
||||
action_taken_message += " User notified via DM with warning."
|
||||
except discord.Forbidden:
|
||||
print(
|
||||
|
Loading…
x
Reference in New Issue
Block a user