From 19e2db7fd40754a27e3ff17aab02ccb67c823b19 Mon Sep 17 00:00:00 2001 From: esefxdz Date: Mon, 13 Jul 2026 00:53:08 +0300 Subject: [PATCH] fix little calendar bug --- cogs/calendar.py | 4 ++-- main.py | 5 +++++ 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/cogs/calendar.py b/cogs/calendar.py index 24d2350..99d5f99 100644 --- a/cogs/calendar.py +++ b/cogs/calendar.py @@ -53,7 +53,7 @@ class BookModal(discord.ui.Modal, title="Book an Event"): placeholder="14:30", min_length=5, max_length=5, ) - title = discord.ui.TextInput( + event_title = discord.ui.TextInput( label="Title", placeholder="Demo Review", default="Demo Review", @@ -74,7 +74,7 @@ class BookModal(discord.ui.Modal, title="Book an Event"): async def on_submit(self, interaction: discord.Interaction) -> None: date = self.date.value.strip() time_str = self.time.value.strip() - title = self.title.value.strip() + title = self.event_title.value.strip() country = self.country.value.strip() description = self.description.value.strip() diff --git a/main.py b/main.py index 6fa53f7..62bf6cb 100644 --- a/main.py +++ b/main.py @@ -49,6 +49,11 @@ async def on_ready(): asyncio.create_task(forwarder.start()) asyncio.create_task(twitter.start()) asyncio.create_task(twitter_mao.start()) + # Clear stale global slash commands + try: + await bot.tree.sync() + except Exception: + pass async def main(): async with bot: