Discord.py: Announce newly joined users

Created on 2 Sep 2017  路  9Comments  路  Source: Rapptz/discord.py

Is there any easy way to check for newly joined users and do a certain routine?

question

Most helpful comment

http://discordpy.readthedocs.io/en/latest/api.html#discord.on_member_join

Will give details about the member who joined.

All 9 comments

http://discordpy.readthedocs.io/en/latest/api.html#discord.on_member_join

Will give details about the member who joined.

ok that works, but what if the same bot is in multiple servers? It will grab joined people in all servers, can i sort an action for specific servers?
My bot is currently being used in 3 different servers but i want to add this join feature to only one of the servers.

Member is not the same as user.

Member contains information about the server the user belongs to.

but for example if i make my bot send me an email every time a user joins, if i do this:

@client.event
async def on_member_join(member):
string=str(member)+" joined"
mail_log_f(subject,string)
it will send me an email every time an user joins whatever of he 3 servers, but i want notifications only for 1

thanks mate 馃憤 馃槃

In future questions like this are better suited for the Discord API server.

or the discordpy server

@xernphoton the discord.py server was not suggested because it _literally did not exist yet_. Don't necrobump old issues.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Nicba1010 picture Nicba1010  路  3Comments

jzburda picture jzburda  路  3Comments

TunaHobby picture TunaHobby  路  3Comments

superloach picture superloach  路  3Comments

AraHaan picture AraHaan  路  3Comments