Files
discord
docs
examples
background_task.py
basic_bot.py
deleted.py
edits.py
guessing_game.py
new_member.py
playlist.py
reply.py
.gitignore
LICENSE
MANIFEST.in
README.md
requirements.txt
setup.py
enhanced-discord.py/examples/new_member.py
2017-01-03 20:58:11 -05:00

16 lines
404 B
Python

import discord
class MyClient(discord.Client):
async def on_ready(self):
print('Logged in as')
print(self.user.name)
print(self.user.id)
print('------')
async def on_member_join(self, member):
guild = member.guild
await guild.default_channel.send('Welcome {0.mention} to {1.name}!'.format(member, guild))
client = MyClient()
client.run('token')