Closed jykob closed 10 months ago
Make TSQuery objects immutable.
This makes queries stable and allows changing parameters and options easier. Example:
@bot.command("immutable", help_text="Test immutability") async def immutability(bot: TSBot, ctx: context.TSCtx, message: str) -> None: q = query("sendtextmessage") server_wide = q.params(msg=f"SERVER WIDE: {message}", targetmode=3) channel_wide = q.params(msg=f"Channel wide: {message}", targetmode=2) await asyncio.wait([bot.send(server_wide), bot.send(channel_wide)])
This is a breaking change since you need to assing/reassign TSQuery method calls to a variable.
Make TSQuery objects immutable.
This makes queries stable and allows changing parameters and options easier. Example:
This is a breaking change since you need to assing/reassign TSQuery method calls to a variable.