Created
August 28, 2018 03:44
-
-
Save davidsaccavino/5510d9cd3030aa8a2ba777dd5e0b6b4d to your computer and use it in GitHub Desktop.
This file contains 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' | |
url = 'https://us17.campaign-archive.com/?u=b0c288d012c3990e6593e76e1&id=79473da32d&e=eb0d880e49' | |
resumeRegex = re.compile(r'learn\.joma\.io|joma\'?s (?:resume|cv)', re.IGNORECASE) | |
@client.event | |
async def on_message(message): | |
if message.author == client.user: | |
return | |
resumeResult = resumeRegex.match(message.content) | |
if(resumeResult): | |
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