Skip to content

Commit

Permalink
fix: emoji issue
Browse files Browse the repository at this point in the history
  • Loading branch information
deadaf committed Sep 2, 2024
1 parent 5efa224 commit b524317
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 34 deletions.
60 changes: 30 additions & 30 deletions src/cogs/events/logs.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"
# "```"
# )
6 changes: 2 additions & 4 deletions src/core/embeds.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ def __init__(self, ctx: Context):
discord.SelectOption(
label="Edit Embed Color",
description="Change the color of the embed",
emoji="<a:messenger:807912019130974242>",
emoji="<:plant:1253293916724264981>",
value="color",
),
],
Expand Down Expand Up @@ -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",
Expand Down

0 comments on commit b524317

Please sign in to comment.