From 99cd26bc5ca1649b9fd24c868314239e921432be Mon Sep 17 00:00:00 2001 From: Lilac-Rose Date: Fri, 24 Oct 2025 08:56:15 +0200 Subject: [PATCH] Added embed to bot.py and fixed typos --- bot.py | 4 ++-- embed/embedcolor.py | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/bot.py b/bot.py index d9e8748..a9e2631 100644 --- a/bot.py +++ b/bot.py @@ -69,8 +69,7 @@ async def on_ready(): await load_cogs("image") await load_cogs("suggestion") await load_cogs("birthday") - - + await load_cogs("embed") # Sync slash commands after loading cogs try: @@ -100,6 +99,7 @@ async def reload(ctx): await load_cogs("image") await load_cogs("suggestion") await load_cogs("birthday") + await load_cogs("embed") try: synced = await bot.tree.sync() diff --git a/embed/embedcolor.py b/embed/embedcolor.py index 323ef90..05d2340 100644 --- a/embed/embedcolor.py +++ b/embed/embedcolor.py @@ -28,7 +28,7 @@ class EmbedColor(commands.Cog): def get_user_color(self, user:discord.User) -> discord.Color: db = self.get_db() - cursor = db.curosr() + cursor = db.cursor() cursor.execute("SELECT color FROM user_embed_colors WHERE user_id = ?", (user.id,)) result = cursor.fetchone() db.close() @@ -39,7 +39,7 @@ class EmbedColor(commands.Cog): @app_commands.command(name="setcolor", description="Set your preferred embed color (hex, e.g. #ff66cc).") async def setcolor(self, interaction: discord.Interaction, hex_color: str): if not hex_color.startswith("#") or len(hex_color) != 7: - await interaction.response.send_message("Please provide a vlid hex color in the format: `#rrggbb`.", ephemeral=True) + await interaction.response.send_message("Please provide a valid hex color in the format: `#rrggbb`.", ephemeral=True) return try: int(hex_color[1:], 16) @@ -55,7 +55,7 @@ class EmbedColor(commands.Cog): ON CONFLICT(user_id) DO UPDATE SET color=excluded.color """, (interaction.user.id, hex_color[1:])) db.commit() - db.close + db.close() await interaction.response.send_message(f"Your embed color has been set to `{hex_color}`")