[ project / 10 ] · Discord Bot
TingBot.
A Discord bot with YouTube music, TTS with pitch control, games and bilingual commands — my first real experience consuming an external API.
canais
voz
$tocar million dollar baby
♪ adicionado · Million Dollar Baby - Tommy Richman
$falar olá mundo | 0.8
🔊 falando no canal de voz
$jokenpo
escolha: 🪨 📄 ✂️
interface sketch · see it on GitHub
about the project
TingBot is one of my favorite projects to talk about, partly because it's genuinely funny to use and partly because it was my first real experience consuming an external API: the Discord API through discord.py. Before this, APIs were a concept. After this, they were something I understood from the inside out.
The bot runs a full YouTube music player via yt-dlp: queue management, skip, loop, volume control and a now-playing display. On top of that it has a TTS command that converts text to speech using gTTS, with optional pitch control so you can make it sound deeper or higher. The part I liked most: TTS works simultaneously with music playback. Both audio streams go through FFmpeg, mixed and played in the voice channel at the same time.
Commands are bilingual by design: every feature has a Portuguese and an English alias ($tocar / $play, $falar / $speak, $jokenpo / $rps). The bot is containerized with Docker, which handles the FFmpeg dependency automatically so setup is just cloning the repo, adding the Discord token to .env and running docker-compose up.
project.meta
- type
- Discord Bot
- stack
- Python · Discord.py · yt-dlp · gTTS · FFmpeg · Docker
- source
- repo
what it does
Key features
Full YouTube music player
Stream any YouTube URL or search query. Queue, skip, loop, volume, now playing — the full set of controls.
TTS with pitch control
$falar <text> | <pitch> converts text to speech and plays it in the voice channel, with an optional pitch shift parameter.
Simultaneous audio
TTS plays alongside music without interrupting it. Both streams go through FFmpeg and mix in the voice channel.
Bilingual commands
Every command has a Portuguese and English alias. The bot works the same way regardless of which you use.
Games
$dado / $dice rolls a die up to a configurable max. $jokenpo / $rps runs a reaction-based rock-paper-scissors with a timeout.
Docker deployment
Docker Compose setup includes FFmpeg. No manual PATH config: clone, fill .env with the Discord token, docker-compose up.