mirror of
https://github.com/nexy7574/LCC-bot.git
synced 2024-09-20 02:26:32 +01:00
ooo
This commit is contained in:
parent
9531ea78ab
commit
c3042a9172
1 changed files with 6 additions and 1 deletions
|
@ -1,3 +1,4 @@
|
||||||
|
import random
|
||||||
import sys
|
import sys
|
||||||
from typing import Optional, Union, Dict
|
from typing import Optional, Union, Dict
|
||||||
|
|
||||||
|
@ -8,7 +9,7 @@ from pathlib import Path
|
||||||
|
|
||||||
import config
|
import config
|
||||||
from utils import console, TimeTableDaySwitcherView
|
from utils import console, TimeTableDaySwitcherView
|
||||||
from datetime import time, datetime, timedelta
|
from datetime import time, datetime, timedelta, timezone
|
||||||
|
|
||||||
|
|
||||||
def schedule_times():
|
def schedule_times():
|
||||||
|
@ -225,6 +226,10 @@ class TimeTableCog(commands.Cog):
|
||||||
date = datetime.now()
|
date = datetime.now()
|
||||||
await ctx.defer()
|
await ctx.defer()
|
||||||
await self.update_timetable_message(ctx, date, no_prefix=True)
|
await self.update_timetable_message(ctx, date, no_prefix=True)
|
||||||
|
if random.randint(1, 10) == 1:
|
||||||
|
end_date = datetime(2023, 13, 7, 0, 0, 0, 0, tzinfo=timezone.utc)
|
||||||
|
days_left = (end_date - datetime.now()).days
|
||||||
|
await ctx.respond("There are only {:,} days before the end of this academic year.".format(days_left))
|
||||||
|
|
||||||
@commands.slash_command(name="timetable")
|
@commands.slash_command(name="timetable")
|
||||||
async def _timetable(self, ctx: discord.ApplicationContext, date: str = None):
|
async def _timetable(self, ctx: discord.ApplicationContext, date: str = None):
|
||||||
|
|
Loading…
Reference in a new issue