I have a bunch of different moderation commands, all with the same basic arguments (target, reason, expires, no_dm). Can I coalesce these args in a FlagConverter to add them as options to slash commands, like this example, to reduce boilerplate code?
class ModActionFlags(FlagConverter):
target: Member
reason: str = None
expires: DateTimeConverter = None
no_dm: bool = False
@bot.slash_command()
async def ban(ctx: Context, flags: ModActionFlags):
await ctx.guild.ban(flags.target, reason=f"{ctx.author}: {reason}")
# etc, etc
await ctx.respond(f"{flags.target} is now b&. 👍")