Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

w for upsilon website #36

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions cogs/omega.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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:
Expand Down Expand Up @@ -164,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)
Expand Down