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 teampy@myteamspeak.com
to your contacts
Methode 1: docker run
Methode 2: docker-compose
Methode 3: Manuell Installation
create the local directorys for mounting into the container (logs is optional, but recommended)
mkdir -p /opt/teampy/configs
mkdir -p /opt/teampy/logs
mkdir -p /opt/teampy/plugins
run the container
docker run -d --name teampy --restart on-failure -v /opt/teampy/configs:/opt/teampy/configs -v /opt/teampy/plugins:/opt/teampy/plugins -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 https://chat.ts3index.com/)
...
matrix_username = aefaefaefaefaefa354354354354===
matrix_password = JkFpIopKKKtdf55uimne69
...
now you can start the container
docker start teampy
create the local directorys for mounting into the container (logs is optional, but recommended)
mkdir -p /opt/teampy/configs
mkdir -p /opt/teampy/logs
mkdir -p /opt/teampy/plugins
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
- /opt/teampy/plugins:/opt/teampy/plugins
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 https://chat.ts3index.com/)
...
matrix_username = aefaefaefaefaefa354354354354===
matrix_password = JkFpIopKKKtdf55uimne69
...
now you can start the container
docker start teampy
- Linux or Windows (works on both)
- Python 3.5 =<
- module requests required:
pip install requests
-
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 themain.py
is located at
vi /etc/systemd/system/teampy.service
... [Service] ExecStart=/usr/bin/python3 /dir/to/main.py ...
-
Open
config.py
-
Required:
- Enter matrix username and password (get these with the https://chat.ts3index.com/)
-
Optional:
- enter giphy api (can be optained freely from developers giphy)
-
-
start main.py with systemd service
systemctl enable --now teampy.service
- Current
- commands:
!gif
or!gif <string>
, without search string will send a random gif!stats
display gathered stats!eth
display price of ethereum!btc
display price of bitcoin!help
display help message!whoami
display help message!whois <identifier>
display help message!roll
roll a dice!poll <question>
post a poll where user can vote with emojis more info here
- can react to bad words in messages with a gif (default disabled)
- admin commands:
!admin help
, display admin help!admin version
, display version of bot, and checks for new version!admin health
, checks health of bot, if there is a problem it hopefully will display it!admin stop
, stops the bot!admin restart
, restarts the bot!admin leave-room
, tells the bot to leave the current room (even privat chats)!admin stats
, display gathered stats!admin reload
, reload current config!admin autojoin
, toggle auto join for rooms and direct chats on invite to on or off
- commands:
(everything is planned to be configureable)
OS Features
Features | Status | Finished |
---|---|---|
adding a setup.sh for easier setup on linux | planned | ⬜️ |
adding systemd service | done | ✅ |
adding a .exe for windows for easier execution | planned | ⬜️ |
adding a container image | done | ✅ |
General Features
Features | Status | Finished |
---|---|---|
adding a default giphy api key | done | ✅ |
adding administration features (start/stop/restart bot via command, with admin whitelist) |
done | ✅ |
gather stats how much interaction the bot has | partly finished | ✅ |
support external plugins/scripts | finished | ✅ |
merge new configs | WIP/finished | ✅ |
adding a check for new version of the teamspeak client | in Work/partly finished | ⬜️ |
adding the current connected teamspeak server to status | planned | ⬜️ |
welcome message for new joined user in rooms | planned | ⬜️ |
self health check and (optional auto notify admins) | partly finished | ⬜️ |
adding a possibility for administrator to interact with OS or execute certain commands | planned | ⬜️ |
change name over command (as soons teamspeak supports name changes) |
currently not Possible | ⬜️ |
Matrix Chat wargamer@myteamspeak.com
or just open an isssue
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).