mirror of
https://github.com/Rapptz/discord.py.git
synced 2025-04-19 07:26:17 +00:00
16 lines
404 B
Python
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')
|