Merge branch 'roles' into 'master'

Send users a PM with their roles

See merge request ldooks/dragon-bot!39
This commit is contained in:
Luke Robles 2017-09-14 20:28:05 +00:00
commit 204b14cc1e
2 changed files with 13 additions and 0 deletions

View File

@ -132,6 +132,16 @@ async def on_message(message):
return return
await client.purge_from(message.channel, limit=num, check=is_me) await client.purge_from(message.channel, limit=num, check=is_me)
if message.content.startswith('!roles'):
await client.send_message(
message.channel,
"ok {}. Check your PMs".format(message.author.mention)
)
await client.send_message(
message.author,
"```{}```".format(' '.join(list(map(lambda x: x.name, message.author.roles))))
)
if message.content.startswith('!wallpaper'): if message.content.startswith('!wallpaper'):
await client.send_message( await client.send_message(
message.channel, message.channel,

View File

@ -43,6 +43,9 @@ def get_help_message(method):
'By default, will delete your last 20 messages. You can override this', 'By default, will delete your last 20 messages. You can override this',
' with your own number. \nUsage: !purge or !purge 15' ' with your own number. \nUsage: !purge or !purge 15'
], ],
'roles': [
'Dragon bot will PM you a message with all the roles you have on the server'
],
'wallpaper': [ 'wallpaper': [
'Returns the URL for a 4k wallpaper. You can enter', 'Returns the URL for a 4k wallpaper. You can enter',
'a search term as well. Supports multiple search terms as well', 'a search term as well. Supports multiple search terms as well',