Skip to main content

Asynchronous Python framework to build TeamSpeak 3 Server Query bots

Project description

TSBot   PyPI - Version

Asynchronous Python framework to build TeamSpeak 3 Server Query bots

✅ Features

  • Modern Python async and await syntax
  • Secure connection through SSH
  • Ease of use query building
  • Built-in and configurable ratelimiter if no access to query_ip_allowlist.txt

✏️ Examples

from __future__ import annotations

import asyncio

from tsbot import TSBot, TSCtx, query


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


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


@bot.on("cliententerview")
async def poke_on_enter(bot: TSBot, ctx: TSCtx):
    poke_query = query("clientpoke").params(clid=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-1.5.1.tar.gz (30.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

tsbot-1.5.1-py3-none-any.whl (34.1 kB view details)

Uploaded Python 3

File details

Details for the file tsbot-1.5.1.tar.gz.

File metadata

  • Download URL: tsbot-1.5.1.tar.gz
  • Upload date:
  • Size: 30.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/5.1.1 CPython/3.12.7

File hashes

Hashes for tsbot-1.5.1.tar.gz
Algorithm Hash digest
SHA256 c975900350f15e877921eb187d555b11a3e85c2ce7f3c432c2e11c0aa8151e76
MD5 68bb27cf479d316f566713e6f7a88a18
BLAKE2b-256 22f131578ceb2063d3b6f8c4dd4156538b9d9e1c41c3baf60a2f330638cf0443

See more details on using hashes here.

Provenance

The following attestation bundles were made for tsbot-1.5.1.tar.gz:

Publisher: publish.yaml on jykob/TSBot

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file tsbot-1.5.1-py3-none-any.whl.

File metadata

  • Download URL: tsbot-1.5.1-py3-none-any.whl
  • Upload date:
  • Size: 34.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/5.1.1 CPython/3.12.7

File hashes

Hashes for tsbot-1.5.1-py3-none-any.whl
Algorithm Hash digest
SHA256 121c5c113edd5c70135480180a8453dc9a9de505e2986fed3495992df3aeaaf8
MD5 054c7ed0bf5785ce2d3df5716e582b4a
BLAKE2b-256 4d4655a1f2e03d4f4c8364c2ae0dc89c2d92ebcb8a8427c9cba9ce4ba3334176

See more details on using hashes here.

Provenance

The following attestation bundles were made for tsbot-1.5.1-py3-none-any.whl:

Publisher: publish.yaml on jykob/TSBot

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

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