I am trying to make a discord bot with the Discord.py library. The commands with the @client.command() decorator work fine for me, but none of the event ones that I tried work.
@client.event
async def on_member_join(member):
channel = client.get_channel(ChannelId) #I did define channel Id in my code
await channel.send("someone has joined")
@client.event
async def on_member_remove(member):
print("Someone has left")
I would expect this to output to the terminal or in the channel id I put in, but nothing appears, not even an error message.
*I used client. for all functions. *I am doing this on mac.
Im not quite sure why its working, I do not get any error messages, and I cant seem to find anyone else with this problem.
Thanks in advance