Implemented #7

This commit is contained in:
2025-04-25 11:37:44 +02:00
parent d9f563285c
commit fb16fa2bc8
9 changed files with 175 additions and 58 deletions

View File

@@ -1,3 +1,5 @@
from zoneinfo import ZoneInfo
from bson.errors import InvalidId
from discord import ApplicationContext, Cog, option, slash_command
from discord.utils import basic_autocomplete
@@ -47,9 +49,10 @@ class Register(Cog):
await user.event_register(pycord_event._id, cache=self.bot.cache)
# TODO Text channel must be created and updated
await ctx.respond("Ok.")
# TODO Make a nice message
await ctx.respond(
f"You are now registered for the event **{pycord_event.name}**.\n\nNew channel will be created for you and further instructions will be provided as soon as the event starts <t:{int((pycord_event.starts.replace(tzinfo=ZoneInfo('UTC'))).timestamp())}:R>. Good luck!"
)
def setup(bot: PycordBot) -> None: