Browse Source

Add new_member.py example to showcase messaging new members.

pull/42/merge
Rapptz 9 years ago
parent
commit
d440e52a00
  1. 18
      examples/new_member.py

18
examples/new_member.py

@ -0,0 +1,18 @@
import discord
client = discord.Client()
client.login('email', 'password')
@client.event
def on_member_join(member):
server = member.server
client.send_message(server, 'Welcome {0} to {1.name}!'.format(member.mention(), server))
@client.event
def on_ready():
print('Logged in as')
print(client.user.name)
print(client.user.id)
print('------')
client.run()
Loading…
Cancel
Save