chore: (description) improve embeds for warnings

Refactored embed creation and sending in moderation warnings and owner cog management for consistency and improved user feedback. Added author and title fields to embeds, centralized embed sending logic, and enhanced error reporting with exception details. Moved NotOwner error handling from bot.py to cog_management.py for owner commands.
This commit is contained in:
neoarz
2025-09-16 07:17:33 -04:00
parent 34b034bdcd
commit 7fde0b82ad
3 changed files with 48 additions and 16 deletions

4
bot.py
View File

@@ -271,10 +271,6 @@ class DiscordBot(commands.Bot):
)
await context.send(embed=embed)
elif isinstance(error, commands.NotOwner):
embed = discord.Embed(
description="You are not the owner of the bot!", color=0xE02B2B
)
await context.send(embed=embed)
if context.guild:
self.logger.warning(
f"{context.author} (ID: {context.author.id}) tried to execute an owner only command in the guild {context.guild.name} (ID: {context.guild.id}), but the user is not an owner of the bot."