Answer the question
In order to leave comments, you need to log in
How to tell if a user is banned or logged out?
There is a function in disord.py:
async def on_member_remove(self, member):
...
Answer the question
In order to leave comments, you need to log in
Check if the user is on the banned list.
if ban_entry := discord.utils.get(await member.guild.bans(), user__id=member.id):
print(member, "banned, reason: ", ban_entry.reason)
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question