次のコマンドとサブコマンドがあるとします。
@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)
親コマンドで名前または ID をオブジェクトに変換し、そのオブジェクトをサブコマンドに渡します。これを行う方法はありますか?みたいなctx.invoked_subcommand.pass(channel_object)
?