mirror of
https://github.com/neoarz/Syntrel.git
synced 2025-12-25 03:40:11 +01:00
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:
4
bot.py
4
bot.py
@@ -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."
|
||||
|
||||
Reference in New Issue
Block a user