feat: slash commands in DMs
This commit is contained in:
parent
100b5591f6
commit
72ca227274
2 changed files with 2 additions and 1 deletions
|
|
@ -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):
|
||||
|
|
|
|||
|
|
@ -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))
|
||||
|
|
|
|||
Loading…
Reference in a new issue