From b524317a9b698a5127cc13a1fbee7ffdfc18fe64 Mon Sep 17 00:00:00 2001 From: deadaf Date: Mon, 2 Sep 2024 12:20:09 +0530 Subject: [PATCH] fix: emoji issue --- src/cogs/events/logs.py | 60 ++++++++++++++++++++--------------------- src/core/embeds.py | 6 ++--- 2 files changed, 32 insertions(+), 34 deletions(-) diff --git a/src/cogs/events/logs.py b/src/cogs/events/logs.py index 6f2bcd53..16664bb5 100644 --- a/src/cogs/events/logs.py +++ b/src/cogs/events/logs.py @@ -13,33 +13,33 @@ class LogEvents(Cog): def __init__(self, bot: Quotient) -> None: self.bot = bot - self.guild_log = discord.Webhook.from_url(self.bot.config.GUILD_LOGS, session=self.bot.session) - - @Cog.listener() - async def on_guild_join(self, guild: discord.Guild): - if not guild: - return # we get these during the boot up - - await self.guild_log.send( - "```diff\n" - f"+ [Joined] {guild.name} ({guild.id})\n" - f"+ Owner: {guild.owner} ({guild.owner_id})\n" - f"+ Members: {guild.member_count}\n" - f"+ Created at: {guild.created_at.strftime('%d/%m/%Y, %H:%M') if guild.created_at else 'Unknown'}\n" - "```" - ) - - @Cog.listener() - async def on_guild_remove(self, guild: discord.Guild): - if not guild: - return - - await self.guild_log.send( - "```diff\n" - f"- [Left] {guild.name} ({guild.id})\n" - f"- Owner: {guild.owner} ({guild.owner_id})\n" - f"- Members: {guild.member_count}\n" - f"- Created at: {guild.created_at.strftime('%d/%m/%Y, %H:%M')}\n" - f"- Joined at: {guild.me.joined_at.strftime('%d/%m/%Y, %H:%M') if guild.me.joined_at else 'Unknown'}\n" - "```" - ) + # self.guild_log = discord.Webhook.from_url(self.bot.config.GUILD_LOGS, session=self.bot.session) + + # @Cog.listener() + # async def on_guild_join(self, guild: discord.Guild): + # if not guild: + # return # we get these during the boot up + + # await self.guild_log.send( + # "```diff\n" + # f"+ [Joined] {guild.name} ({guild.id})\n" + # f"+ Owner: {guild.owner} ({guild.owner_id})\n" + # f"+ Members: {guild.member_count}\n" + # f"+ Created at: {guild.created_at.strftime('%d/%m/%Y, %H:%M') if guild.created_at else 'Unknown'}\n" + # "```" + # ) + + # @Cog.listener() + # async def on_guild_remove(self, guild: discord.Guild): + # if not guild: + # return + + # await self.guild_log.send( + # "```diff\n" + # f"- [Left] {guild.name} ({guild.id})\n" + # f"- Owner: {guild.owner} ({guild.owner_id})\n" + # f"- Members: {guild.member_count}\n" + # f"- Created at: {guild.created_at.strftime('%d/%m/%Y, %H:%M')}\n" + # f"- Joined at: {guild.me.joined_at.strftime('%d/%m/%Y, %H:%M') if guild.me.joined_at else 'Unknown'}\n" + # "```" + # ) diff --git a/src/core/embeds.py b/src/core/embeds.py index bc1f15c2..32f66205 100644 --- a/src/core/embeds.py +++ b/src/core/embeds.py @@ -52,7 +52,7 @@ def __init__(self, ctx: Context): discord.SelectOption( label="Edit Embed Color", description="Change the color of the embed", - emoji="", + emoji="<:plant:1253293916724264981>", value="color", ), ], @@ -238,9 +238,7 @@ async def rendor(self, **kwargs: T.Any): def help_embed(self): return ( discord.Embed(color=self.bot.color, title="Title", description="Description") - .set_thumbnail( - url="https://cdn.discordapp.com/attachments/853174868551532564/860464565338898472/embed_thumbnail.png" - ) + .set_thumbnail(url="https://cdn.discordapp.com/attachments/853174868551532564/860464565338898472/embed_thumbnail.png") .set_image(url="https://cdn.discordapp.com/attachments/853174868551532564/860462053063393280/embed_image.png") .set_footer( text="Footer Message",