Teamspeak Matrix Bot - teampy

Unbenannt_6 (1)

a simple Matrix Chat Bot

GitHub Project | Documentation | Docker Hub




DESCRIPTION

teampy - a Python-based chat bot specially created for the Matrix Chat of teamspeak. Although its current capabilities are limited to a set of fundamental commands, it will receive more functionality from time to time. (command overview). The mindset behind the bot is centered around configurability, which is why the configuration file can sometimes feel overwhelming.
You can test the bot yourself, just add [email protected] to your contacts

SETUP

Methode 1: docker run
Methode 2: docker-compose
Methode 3: Manuell Installation


Methode 1: docker run

create local directorys for mounting into the container (logs is optional, but recommended)
Note: I have used the same names for the persistence directorys, as those in the container. However, feel free to choose your own directory names.

mkdir -p /opt/teampy/configs
mkdir -p /opt/teampy/logs

run the container with the created directorys

docker run -d --name teampy --restart on-failure -v /opt/teampy/configs:/opt/teampy/configs -v /opt/teampy/logs:/opt/teampy/logs wargamersenpai/teampy:latest

now edit the config in the mounted directory

vi /opt/teampy/configs/config.py

enter the matrix username and password (you can get these with TS5 Extractor)

...sh
matrix_username = aefaefaefaefaefa354354354354===
matrix_password = JkFpIopKKKtdf55uimne69
...

now you can start the container

docker start teampy




Methode 2: docker-compose

create the local directorys for mounting into the container (logs is optional, but recommended)
Note: I have used the same names for the persistence directorys, as those in the container. However, feel free to choose your own directory names.

mkdir -p /opt/teampy/configs
mkdir -p /opt/teampy/logs

create a docker-compose.yml with following content

version: '3'
services:
  teampy:
    image: wargamersenpai/teampy:latest
    container_name: teampy
    restart: on-failure
    volumes:
      - /opt/teampy/configs:/opt/teampy/configs
      - /opt/teampy/logs:/opt/teampy/logs

now you can run docker-compose (in the same directory where the yml file is located)

docker-compose up -d

after that, edit the config in the mounted directory

vi /opt/teampy/configs/config.py

enter the matrix username and password (you can get these with TS5 Extractor)

...
matrix_username = aefaefaefaefaefa354354354354===
matrix_password = JkFpIopKKKtdf55uimne69
...

now you can start the container

docker start teampy




Methode 3: Manuell Installation

Requirments

  • Linux or Windows (works on both)
  • Python 3.5 =<
  • module requests required:
    pip install requests 
    

Installation

  • Download latest Release from Release Page

    • Place folder to your desired location
    • move teampy.service into /etc/systemd/system
    mv ./teampy.service /etc/systemd/system 
    
    • edit the teampy.service and adjust the directory where the main.py is located at
    vi /etc/systemd/system/teampy.service
    
    ...
    [Service]
    ExecStart=/usr/bin/python3 /dir/to/main.py
    ...  
    
  • Open config.py and enter matrix username and password (get these with the TS5 Extractor)

  • start main.py with systemd service

systemctl enable --now teampy.service




Unbenannt_4
Feedback, Ideas, constructive criticism can be posted here or in the GitHub Issues.




Disclaimer

It is recommended to use a second account or create a new account for the bot,
because using this bot can result in breaking your account (it shouldnt but can happen).

10 Likes

Update v1.0.5


:wrench: optimizations

  • improved stability/fixed crashes
  • Bugs fixed

:sparkles: features

4 Likes