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:
|
else:
|
||||||
model_path = model_id_to_use
|
model_path = model_id_to_use
|
||||||
|
|
||||||
thinking_config = types.ThinkingConfig(
|
thinking_config = types.ThinkingConfig(thinking_budget=0)
|
||||||
thinking_budget=0
|
|
||||||
)
|
|
||||||
|
|
||||||
generation_config = types.GenerateContentConfig(
|
generation_config = types.GenerateContentConfig(
|
||||||
temperature=0.2,
|
temperature=0.2,
|
||||||
@ -1985,10 +1983,24 @@ CRITICAL: Do NOT output anything other than the required JSON response.
|
|||||||
)
|
)
|
||||||
try:
|
try:
|
||||||
dm_channel = await message.author.create_dm()
|
dm_channel = await message.author.create_dm()
|
||||||
await dm_channel.send(
|
warn_embed = discord.Embed(
|
||||||
f"Your recent message in **{message.guild.name}** was removed for violating Rule **{rule_violated}**. "
|
title="⚠️ Moderation Warning",
|
||||||
f"Reason: _{reasoning}_. Please review the server rules. This is a formal 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."
|
action_taken_message += " User notified via DM with warning."
|
||||||
except discord.Forbidden:
|
except discord.Forbidden:
|
||||||
print(
|
print(
|
||||||
|
Loading…
x
Reference in New Issue
Block a user