-3
votes

I don't know why but those 2 commands don't work for me.

@client.event
async def on_member_join(member):
    ver_Channel = client.get_channel(799666119787020289)
    await ver_Channel.send(member+ " have joined the server!")


@client.event
async def on_member_remove(member):
    ver_Channel = client.get_channel(799666119787020289)
    await ver_Channel.send(member + " have been left :(")

btw please write in basic coding explanation I'm a beginner

1
Hey there 👋! Can you be more specific about what you mean by "don't work"? What do you expect to happen? What happens instead? Answering these questions will help us understand your issue. - idontknow

1 Answers

2
votes

I'm pretty sure this is an intents issue, you should enable intents.members

intents = discord.Intents.default() # Enabling everything apart from privileged intents (members & presences)
intents.members = True # Explicitly enabling `intents.members`

client = commands.Bot(..., intents=intents)

Also make sure to enable them in the developer portal

How to enable privileged gateway intents