Add exams command

This commit is contained in:
nexy7574 2023-05-29 13:09:59 +01:00
parent e3b441e91d
commit 37e6bb578e

View file

@ -246,6 +246,19 @@ class TimeTableCog(commands.Cog):
view = TimeTableDaySwitcherView(ctx.user, self, date)
view.update_buttons()
await ctx.respond(text, view=view)
@commands.slash_command(name="exams")
async def _exams(self, ctx: discord.ApplicationContext):
"""Shows when exams are."""
paper_1 = datetime(2023, 6, 14, 13, 0, 0, 0, 0, timezone.utc)
paper_2 = datetime(2023, 6, 21, 13, 0, 0, 0, 0, timezone.utc)
paper_1_url = "https://classroom.google.com/c/NTQ5MzE5ODg0ODQ2/m/NTUzNjI5NjAyMDQ2/details"
paper_2_url = "https://classroom.google.com/c/NTQ5MzE5ODg0ODQ2/m/NjA1Nzk3ODQ4OTg0/details"
await ctx.respond(
f"Paper A: [{discord.utils.format_dt(paper_1, 'R')}]({paper_1_url})\n"
f"Paper B: [{discord.utils.format_dt(paper_2, 'R')}]({paper_2_url})"
)
await ctx.message.edit(suppress=True)
def setup(bot):