#Guild PFP isn't showing up in the thumbnail area of the embed

1 messages · Page 1 of 1 (latest)

north plank
#
  • What you expected to happen: Guild PFP should be the thumbnail of the embed.

  • What actually happened (the result/error):

Ignoring exception in on_guild_join
Traceback (most recent call last):
  File "C:\Users\jinxi\AppData\Local\Programs\Python\Python310\lib\site-packages\discord\client.py", line 382, in _run_event
    await coro(*args, **kwargs)
TypeError: Events.on_guild_join() missing 1 required positional argument: 'guild'
  • The code:

(some of the stuff like the channel id and the bot name has been taken out, everything else is the exact same)

@commands.Cog.listener()
    async def on_guild_join(self, ctx, guild):
        log = self.bot.get_channel([Logging Channel ID])


        join = discord.Embed(
            title="An event has occurred!",
            description="[My Bot] has joined a guild!",
            color = 0x34393b
        )
        join.add_field(name="Guild Name:", value=f"__{guild.name}__", inline=False)
        join.add_field(name="Guild ID", value=f"__{guild.id}__", inline=False)
        join.add_field(name="Guild Members", value=f"__{guild.member_count}__", inline=False)
        join.add_field(name="Guild Owner", value=f"__{guild.owner}__", inline=False)
        join.add_field(name="Owner ID", value=f"__{guild.owner_id}__", inline=False)
        join.set_image(url=f"{ctx.guild.icon}")

        await log.send(embed=join)
lilac tendon
#

and for url, you should be using guild.icon.url