Skip to content

Commit

Permalink
Update new member example to not be broken.
Browse files Browse the repository at this point in the history
Took forever but better late than never.
  • Loading branch information
Rapptz committed Aug 23, 2018
1 parent 9d8e791 commit 00ee754
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion examples/new_member.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,10 @@ async def on_ready(self):

async def on_member_join(self, member):
guild = member.guild
await guild.default_channel.send('Welcome {0.mention} to {1.name}!'.format(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')

0 comments on commit 00ee754

Please sign in to comment.