Last active
August 7, 2018 02:44
-
-
Save davidsaccavino/efe0acf9ca3cc9dddc5d87d1d0ce24bf to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import discord, re | |
| client = discord.Client() | |
| TOKEN = 'your token here' | |
| url = 'https://us17.campaign-archive.com/?u=b0c288d012c3990e6593e76e1&id=79473da32d&e=eb0d880e49' | |
| p = re.compile(r'learn\.joma\.io|joma\'?s (?:resume|cv)') | |
| @client.event | |
| async def on_message(message): | |
| if message.author == client.user: | |
| return | |
| result = p.match(message.content) | |
| if(result): | |
| msg = 'Hello {0.author.mention}, here\'s the link to Joma\'s CV! {1}'.format(message, url) | |
| await client.send_message(message.channel, msg) | |
| @client.event | |
| async def on_ready(): | |
| print('Running') | |
| client.run(TOKEN) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment