Member Leave Message – Discord.py

  discord, discord.py, python, python-3.x

I’ve looked and all the posts I could find reference an older version of discord.py when it comes to sending member leave messages. The code below doesn’t give an error, yet also doesn’t send a message when a member leaves a server. Am I missing something? I’ve looked at the documentation and this makes sense…

async def on_member_remove(member):
    channel = client.get_channel(762921541787975686)
    await channel.send(f"{member} quit on the 1 yard line (left the server).")

Source: Python-3x Questions

LEAVE A COMMENT