What's Changed
Task args
You can now pass args to tasks.
Arguments are positional only and type safe.
python
async def background_task(bot: TSBot, arg1: str, arg2: int) -> None:
print(arg1, arg2)
Some background task
bot.register_task(background_task, "test arg", 1)
Better typing support
Command handler overloads
Command handlers are just a little bit more type safe. For example, if you define a raw command handler and have more than 1 additional argument, your editor should yell at you.
Typed events and ctx overloads
Your editor should give smart suggestions about the `event_type` and their context types.
![Code_01oTqvaV7h](https://github.com/user-attachments/assets/9654cf04-d7f4-44c1-868f-967fb901b07d)
**Full Changelog**: https://github.com/jykob/TSBot/compare/1.4.1...1.5.0