on_member_join not working #5934
-
@bot.event
async def on_member_join(ctx):
user = ctx.author
if not user.bot:
server = ctx.guild
now = datetime.now()
dt_string = now.strftime("on %d/%m/%Y at %H:%M")
embed = discord.Embed(
title=f"",
description=f"{user.mention} **Joined The Server**",
colour=user.colour,
)
embed.set_author(name=f"{user}", icon_url=f"{user.avatar_url}")
embed.set_thumbnail(url=user.avatar_url)
embed.add_field(name="User id:", value=f"{user.id}")
embed.set_footer(text=f"{dt_string}")
await ctx.send(embed=embed)
else:
await ctx.send("A Fricking bot joined the server") why is this thing not working on member join never works for me |
Beta Was this translation helpful? Give feedback.
Answered by
AbstractUmbra
Oct 15, 2020
Replies: 2 comments 12 replies
-
Assuming you have updated to discord.py 1.5.0, you will be missing the intents required for this event to trigger. You will need the guilds and members |
Beta Was this translation helpful? Give feedback.
6 replies
Answer selected
-
Sometimes the on_member_join event won't fire! |
Beta Was this translation helpful? Give feedback.
6 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Assuming you have updated to discord.py 1.5.0, you will be missing the intents required for this event to trigger.
You will need the guilds and members
Intents
at a minimum.