From 72ca2272740b6ec0e55e299d7d0c879ed6d882eb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Luk=C3=A1=C5=A1=20Nedb=C3=A1lek?= Date: Sun, 14 Sep 2025 16:09:33 +0200 Subject: [PATCH] feat: slash commands in DMs --- bin/kruhobot | 1 + kruhobot/cogs/utils.py | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/bin/kruhobot b/bin/kruhobot index 7e4455e..0b313f8 100644 --- a/bin/kruhobot +++ b/bin/kruhobot @@ -20,6 +20,7 @@ with open(os.path.join(KRUHOBOT_FOLDER, 'config.json'), 'r', encoding='utf-8') a bot = commands.Bot() bot.load_extension('kruhobot.cogs.auth') bot.load_extension('kruhobot.cogs.utils') +bot.tree.sync() @bot.listen('on_interaction') async def statistics(interaction): diff --git a/kruhobot/cogs/utils.py b/kruhobot/cogs/utils.py index 6b52731..1c027aa 100644 --- a/kruhobot/cogs/utils.py +++ b/kruhobot/cogs/utils.py @@ -15,5 +15,5 @@ class Basic(commands.Cog): await ctx.respond('My ping is {:.0f}ms'.format(self.bot.latency*1000), ephemeral=True) -def setup(bot): +def setup(bot: commands.Bot): bot.add_cog(Basic(bot))