modified: bot.py
This commit is contained in:
11
bot.py
11
bot.py
@@ -5396,7 +5396,7 @@ async def mute(ctx, user: discord.User, duration: str, reason: str = "No reason
|
||||
message_info += f"**Channel:** <#{main_msg['channel_id']}>\n"
|
||||
message_info += f"**Author:** {main_msg['author_name']}\n"
|
||||
|
||||
if main_msg['content']:
|
||||
if main_msg.get('content'):
|
||||
content_preview = main_msg['content'][:200] + "..." if len(main_msg['content']) > 200 else main_msg['content']
|
||||
message_info += f"**Content:** {content_preview}"
|
||||
|
||||
@@ -5427,16 +5427,19 @@ async def mute(ctx, user: discord.User, duration: str, reason: str = "No reason
|
||||
elif message_id:
|
||||
embed.add_field(name="📄 Referenced Message", value=f"Message ID: `{message_id}` (Message not found or inaccessible)", inline=False)
|
||||
|
||||
embed.set_footer(text=f"User ID: {user.id} | Process ID: {str(process_uuid)[:8]}")
|
||||
# Add Mute Record ID field
|
||||
embed.add_field(name="🆔 Mute Record ID", value=f"`{mute_id}`", inline=True)
|
||||
|
||||
embed.set_footer(text=f"User ID: {user.id} | Process ID: {str(process_uuid)[:8]} | Use /viewmute {mute_id} for details")
|
||||
embed.set_thumbnail(url=user.display_avatar.url)
|
||||
|
||||
await send_response(embed=embed)
|
||||
|
||||
# Log the mute action
|
||||
log_additional_info = {
|
||||
"Duration": duration,
|
||||
"Mute Count": str(user_data['mutes']),
|
||||
"Process ID": str(process_uuid)[:8]
|
||||
"Process ID": str(process_uuid)[:8],
|
||||
"Mute Record ID": str(mute_id)
|
||||
}
|
||||
|
||||
if message_data:
|
||||
|
||||
Reference in New Issue
Block a user