mirror of
https://github.com/jcreek/discord.py-welcome-bot.git
synced 2026-07-13 19:03:43 +00:00
Added error catching when unable to message a member.
This commit is contained in:
@@ -27,8 +27,11 @@ here!
|
||||
@client.event
|
||||
async def on_member_join(member):
|
||||
print("Recognised that a member called " + member.name + " joined")
|
||||
try:
|
||||
await client.send_message(member, newUserMessage)
|
||||
print("Sent message to " + member.name)
|
||||
except:
|
||||
print("Couldn't message " + member.name)
|
||||
|
||||
# give member the steam role here
|
||||
## to do this the bot must have 'Manage Roles' permission on server, and role to add must be lower than bot's top role
|
||||
|
||||
Reference in New Issue
Block a user