Open Vioshim opened 6 months ago
This allows FlagConverters to be used after the first text expression, for example
class HandleText(FlagConverter, prefix="--", delimiter=" "): text: str = commands.flag(positional=True) flip: bool = False @bot.bridge_command() async def welcome(ctx: bridge.BridgeContext, *, flags: HandleText): text = flags.text[::-1] if flags.flip else flags.text await ctx.respond(text) # ?welcome Hello world # ?welcome Hello world --flip True # ?welcome --text Hello world # ?welcome --text Hello world --flip True
type: ignore
@Vioshim please work on dorus comment and resolve conflcts
Summary
This allows FlagConverters to be used after the first text expression, for example
Information
Checklist
type: ignore
comments were used, a comment is also left explaining why.