Tsbot

Latest version: v1.5.1

Safety actively analyzes 688587 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 1 of 2

1.5.1

What's Changed
- Fix `run` event being ignored on run cbe83ce3bd4778e1b8e9a6e092f81ead16dd649b


**Full Changelog**: https://github.com/jykob/TSBot/compare/1.5.0...1.5.1

1.5.0

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

1.4.1

What's Changed
Tasks exceptions
Before exceptions raised inside tasks would pass silently.

> Errors should never pass silently.
-- <cite>The Zen of Python</cite>

Tasks that exit with an exception will log the exception when TSBot cleans up the task
PR: 56

Better default ports
Raw connection type would require you to set port manually.
If you don't configure the port, TSBot will infer the port from the protocol.
PR: 57

**Full Changelog**: https://github.com/jykob/TSBot/compare/1.4.0...1.4.1

1.4.0

Features
Raw connections
With the new connection system (50) came simple way to implement different connection types.
The PR hinted a possibility of raw connections. Now raw connections have been implemented.

You can configure TSBot to use raw connections when defining `TSBot` instance:
python
bot = TSBot(
username="USERNAME",
password="PASSWORD",
address="ADDRESS",
port=10011, Important! The default port is 10022, the port for SSH.
protocol="raw"
)


Full PR 55

**Full Changelog**: https://github.com/jykob/TSBot/compare/1.3.2...1.4.0

1.3.2

What's Changed
* Improve logging 52
* Graceful closing 53

**Full Changelog**: https://github.com/jykob/TSBot/compare/1.3.1...1.3.2

1.3.1

Page 1 of 2

Links

Releases

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.