This repository provides tthelper.sh, a command-line helper script designed to run TTMediaBot inside Docker without requiring users to build Docker images manually.
The script automatically pulls the prebuilt TTMediaBot image from Docker Hub, creates isolated bot instances, and manages containers in a clean and convenient way.
TTMediaBot is an audio playback bot developed for TeamTalk, a VoIP and conferencing system commonly used for voice chat, streaming, and accessible communication.
Key features of TTMediaBot include:
- Playing audio from YouTube, local files, streaming URLs, and other services.
- Controlling playback using TeamTalk chat commands.
- Supporting playlists, seeking, volume control, and fading.
- Extensible Python-based architecture.
TTMediaBot is created and maintained by gumerov-amir, and the original repository can be found here: https://github.com/gumerov-amir/TTMediaBot
The script in this repository does not modify the original TTMediaBot project, it simply provides an automated and user-friendly Docker-based runtime environment.
- No manual image build required: Automatically pulls the prebuilt image.
- Easy Setup: Installs Docker (Debian/Ubuntu) if missing.
- Multi-Bot Support: Run multiple bots with separate configurations and cookies.
- Resource Control: Limit CPU and Memory usage per bot.
- Cleaner Audio Logs: Runs the container with the same quiet audio startup strategy used in the maintained local helper.
- Simple Commands: Intuitive commands to create, run, and manage bots.
-
Clone the repository:
git clone https://github.com/MuhammadGagah/ttmediabot-docker-helper.git cd ttmediabot-docker-helper -
Make the script executable:
chmod +x tthelper.sh
Use the new command to create a config folder.
sudo ./tthelper.sh new- You will be asked for bot details (nickname, server, ports, etc.).
- Paste your cookies when prompted.
- Safe Creation: The folder and config files are only created after you finish entering all information.
Use the run command to start a bot using an existing configuration folder.
sudo ./tthelper.sh run <folder_name>- Example:
sudo ./tthelper.sh run my_bot - Function:
- Finds the folder (e.g.,
my_bot) in the current directory. - Creates and starts a Docker container with the same name.
- Mounts the folder so the bot uses your
config.jsonandcookies.txt. - Applies the helper's managed runtime command so PulseAudio and mpv audio backend logs stay quiet in normal operation.
- Finds the folder (e.g.,
-
Stop a bot:
sudo ./tthelper.sh stop <container_name>
Stops and removes the container. Your config and data folder remain safe.
-
View logs:
sudo ./tthelper.sh logs <container_name>
Press
Ctrl+Cto exit. -
List all bot folders:
sudo ./tthelper.sh ls
-
List running containers:
sudo ./tthelper.sh ps
Update cookies.txt easily without manually editing files.
-
Update one bot:
sudo ./tthelper.sh cks <folder_name>
Paste new cookies and press
Ctrl+D. -
Update ALL bots:
sudo ./tthelper.sh cks-all
Updates cookies for every bot folder associated with the image.
-
Update Bot Dependencies:
sudo ./tthelper.sh update
Updates
piprequirements in all running bots and restarts them. -
Limit Resources (CPU/RAM):
sudo ./tthelper.sh limit <folder_name>
Sets limits (e.g.,
0.5CPU,512mRAM). Applied automatically on the nextrun. -
Update Docker Image:
sudo ./tthelper.sh pull
Downloads the latest version of
mgagah21/ttmediabot.
Contributions are welcome! Please open an issue or pull request on GitHub.
This project is licensed under the MIT License.