Skip to main content

Asynchronous framework to build TeamSpeak 3 Server Query bots

Project description

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

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 for more

📦 Installation

Python 3.10 or higher is required

Installing with pip:

# Linux/macOS
python3 -m pip install tsbot

# Windows
py -3 -m pip install tsbot

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

tsbot-0.16.0.tar.gz (16.2 kB view hashes)

Uploaded Source

Built Distribution

tsbot-0.16.0-py3-none-any.whl (21.2 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page