From 943290619be276fb3ddf8c3bc00e88ccc9f29b03 Mon Sep 17 00:00:00 2001 From: lolocomotive <49951010+lolocomotive@users.noreply.github.com> Date: Fri, 20 May 2022 19:29:24 +0200 Subject: [PATCH 1/2] w for upsilon website --- cogs/omega.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/cogs/omega.py b/cogs/omega.py index 1abb7b2..c5df86d 100644 --- a/cogs/omega.py +++ b/cogs/omega.py @@ -18,7 +18,7 @@ async def get_github_issues(message: discord.Message) -> AsyncGenerator[dict, No If a request error occurs, it sends a message and stops. """ - matches = re.findall("(?=((^| )#[0-9]+(e|u|l)?($| )))", message.content) + matches = re.findall("(?=((^| )#[0-9]+(e|u|l|w)?($| )))", message.content) async with aiohttp.ClientSession() as session: for i in matches: @@ -30,6 +30,8 @@ async def get_github_issues(message: discord.Message) -> AsyncGenerator[dict, No repo = "numworks/epsilon" elif "u" in i[0]: repo = "UpsilonNumworks/Upsilon" + elif "w" in i[0]: + repo = "UpsilonNumworks/Upsilon-Website" elif "l" in i[0]: repo = "Lambda-Numworks/Lambda" else: From 6d537c338b87c166d77807e83d05c3276208f567 Mon Sep 17 00:00:00 2001 From: lolocomotive <49951010+lolocomotive@users.noreply.github.com> Date: Fri, 20 May 2022 19:35:56 +0200 Subject: [PATCH 2/2] Modified 2nd Regex --- cogs/omega.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cogs/omega.py b/cogs/omega.py index c5df86d..98e889e 100644 --- a/cogs/omega.py +++ b/cogs/omega.py @@ -166,7 +166,7 @@ async def on_message(self, message): await message.channel.send(embed=color_embed) # Check if the message has an issue identifier in it - if re.search("(^| )#[0-9]+(e|u|l)?($| )", message.content): + if re.search("(^| )#[0-9]+(e|u|l|w)?($| )", message.content): async for i in get_github_issues(message): # Create an embed with the data from the issue embed = await make_embed(i)