import asyncio
import math
from datetime import datetime, timedelta
import re
import discord
import pymysql
from discord.ext import commands


class ParseForIssues(commands.Cog):
    def __init__(self, client):
        self.client = client


    @commands.Cog.listener()
    async def on_message(self, message):
        if message.author.id == 533427166193385494:
            return
        content = message.content.lower()
        matches = re.findall("ttg-[0-9]+",content)
        for match in matches:
            await message.channel.send("https://youtrack.themissingcrowbar.com:8942/issue/"+match)




def setup(client):
    client.add_cog(ParseForIssues(client))
