Say I have the following command and subcommands:
@commands.group()
async def channel(self, ctx, channel_name_or_id):
# convert channel_name_or_id to channel object
@channel.command()
async def get_mention(ctx, channel_object):
await ctx.send(channel_object.mention)
@channel.command()
async def get_id(ctx, channel_object):
await ctx.send(channel_object.id)
I want the parent command to convert the name or id to an object, and then pass that object to the subcommands. Is there a way to do this? Something like ctx.invoked_subcommand.pass(channel_object)
?