You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
18 lines
483 B
18 lines
483 B
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
|
|
if guild.system_channel is not None:
|
|
to_send = 'Welcome {0.mention} to {1.name}!'.format(member, guild)
|
|
await guild.system_channel.send(to_send)
|
|
|
|
|
|
client = MyClient()
|
|
client.run('token')
|
|
|