So I am making a sub command group named set. Then the commands that are in that group are, profile, introduction, birthday etc. These commands should be slash commands (interaction commands) But I cannot figure out how to do this.
I've tried this from watching some youtube videos but the videos were explaining how to do this when it is written in the main file and when it is a ctx command.
@app_commands.group(name='set')
async def set(self, interaction:discord.Interaction):
if interaction.invoked_subcommand is None:
await interaction.response.send_message('Please specify a subcommand. Available subcommands: helpchat, helpvoice, helpnotif, helpchannel')
@set.command(name="introduction", description="Set your introduction so that other people can know who you are!")
async def introduction(self, interaction: discord.Interaction):
await interaction.response.send_modal(IntroModal())
Reference: