Metadata-Version: 2.1
Name: tsbot
Version: 0.13.1
Summary: Asynchronous framework to build TeamSpeak 3 Server Query bots
Home-page: https://github.com/0x4aK/TSBot
Author: 0x4aK
License: MIT
Classifier: Development Status :: 4 - Beta
Classifier: Framework :: AsyncIO
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Programming Language :: Python :: 3.10
Requires-Python: >=3.10
Description-Content-Type: text/markdown
Provides-Extra: tests
License-File: LICENSE

# TSBot

Asynchronous framework to build **TeamSpeak 3 Server Query** bots

## ✅ Features

- Uses modern Python `async` and `await` syntax
- Secure connection through SSH
- Ease of use query building
- Built-in and configurable ratelimiter if no access to `whitelist.txt`
- Query caching

## ✏️ Examples

```python
from __future__ import annotations

import asyncio

from tsbot import TSBot, events, query


bot = TSBot(
    username="USERNAME",
    password="PASSWORD",
    address="ADDRESS",
)


@bot.command("hello")
async def hello_world(bot: TSBot, ctx: dict[str, str]):
    await bot.respond(ctx, f"Hello {ctx['invokername']}!")


@bot.on("cliententerview")
async def poke_on_enter(bot: TSBot, event: events.TSEvent):
    poke_query = query("clientpoke").params(clid=event.ctx["clid"], msg="Welcome to the server!")
    await bot.send(poke_query)


asyncio.run(bot.run())
```

**Check out [📁examples](https://github.com/0x4aK/TSBot/blob/master/examples) for more**

## 📦 Installation

**Python 3.10 or higher is required**

Installing with pip:

```shell
# Linux/macOS
python3 -m pip install tsbot

# Windows
py -3 -m pip install tsbot
```
