from interactions import slash_command, SlashContext, Extension from community_qa_bot.settings import DISCORD_HELP_TEXT class CommandsExampleSkin(Extension): @slash_command("help", description="how to use TiDB-AI-Assistant") async def command(self, ctx: SlashContext, **kwargs): await ctx.respond(DISCORD_HELP_TEXT, ephemeral=True) @command.error async def command_error(self, e, *args, **kwargs): print(f"Command hit error with {args=}, {kwargs=}") def setup(bot): CommandsExampleSkin(bot)