mirror of
https://github.com/neoarz/Syntrel.git
synced 2025-12-25 11:40:12 +01:00
refactor: owner checks and embed handling in owner cogs
Removed OWNER_ID from .env and bot.py, switching to @commands.is_owner() for owner checks. Unified embed sending logic in owner cogs, improved error messages, and updated invite command to use ephemeral responses and enhanced embed formatting.
This commit is contained in:
@@ -16,7 +16,7 @@ class CogManagement(commands.Cog, name="cog_management"):
|
||||
else:
|
||||
await interaction.response.send_message(embed=embed, ephemeral=ephemeral)
|
||||
else:
|
||||
await self.send_embed(context, embed)
|
||||
await context.send(embed=embed)
|
||||
|
||||
@commands.hybrid_command(
|
||||
name="load",
|
||||
@@ -109,7 +109,7 @@ class CogManagement(commands.Cog, name="cog_management"):
|
||||
async def cog_command_error(self, context: Context, error) -> None:
|
||||
if isinstance(error, commands.NotOwner):
|
||||
embed = discord.Embed(
|
||||
title="Error",
|
||||
title="Permission Denied",
|
||||
description="You are not the owner of the bot!",
|
||||
color=0xE02B2B
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user