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

Added Whatweekisit Flavour Text #163

Merged
merged 3 commits into from
Sep 26, 2023
Merged
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
29 changes: 24 additions & 5 deletions uqcsbot/whatweekisit.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
from zoneinfo import ZoneInfo
from datetime import datetime, timedelta
from math import ceil
from random import choice

from bs4 import BeautifulSoup
from discord.ext import commands
Expand Down Expand Up @@ -158,11 +159,29 @@ async def whatweekisit(self, interaction: discord.Interaction, date: Optional[st
else:
semester_name, week_name, weekday = semester_tuple

message = (
"The week we're in is:"
if date == None
else f"The week of {date} is in:"
)
if date != None:
message = f"The week of {date} is in:"
else:
message = choice(
[
"The week we're in is:",
"The current week is:",
"Currently, the week is:",
"Hey, look at the time:",
f"Can you believe that it's already {week_name}:",
"Time flies when you're having fun:",
"Maybe time's just a construct of human perception:",
"Time waits for noone:",
"This week is:",
"It is currently:",
"The week is",
"The week we're currently in is:",
f"Right now we are in:",
"Good heavens, would you look at the time:",
"What's the time, mister wolf? It's:",
]
)

message += f"\n> {weekday}, {week_name} of {semester_name}"

await interaction.edit_original_response(content=message)
Expand Down