Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/Melendo/BotMeriendo/llms.txt

Use this file to discover all available pages before exploring further.

BotMeriendo is a self-hosted Discord bot built in Python that brings music playback, playlist management, and general utilities to your server. Designed to be modular and easy to operate, it streams audio directly from YouTube, manages a live queue, and keeps itself well-behaved by disconnecting automatically when it is no longer needed. Whether you want to run it on a spare Raspberry Pi at home or on any Linux server, BotMeriendo ships as a Docker image so you can go from zero to playing music with a single command.

Key Features

YouTube Streaming

Search for songs by name or paste a direct YouTube URL — BotMeriendo resolves and streams audio on demand using yt-dlp.

Playlist & Queue Management

Add multiple tracks and manage the playback queue dynamically with commands like !queue, !skip, and !stop.

Interactive UI Controls

Rich Discord embeds and visual feedback give users at-a-glance status for what is playing and what is up next.

Auto-Disconnect

The bot automatically leaves the voice channel after 1 minute of inactivity when it is left alone, keeping your server tidy.

Configurable Prefix

The command trigger character defaults to ! and can be changed to anything you like via a single environment variable.

Docker Deployment

A production-ready Dockerfile and docker-compose.yml are included, making deployment and updates reproducible on any host.

Structured Logging

Logs are written to both bot.log and stdout simultaneously, making debugging straightforward in any environment.

Graceful Error Handling

Users receive visual feedback inside Discord whenever something goes wrong, and the bot shuts down cleanly on SIGTERM/SIGINT.

Project Structure

The repository is laid out so that every concern lives in its own module. The src/ directory holds all bot logic, keeping configuration, cogs, and utilities clearly separated from deployment files at the project root.
Project layout
botMeriendo/
├── src/
│   ├── cogs/          # Bot modules (loaded as extensions)
│   │   ├── events.py  # Event handling (join, errors, voice)
│   │   ├── general.py # Basic commands
│   │   └── music.py   # Music playback logic
│   ├── utils/         # Shared utilities
│   │   ├── logger.py  # Log configuration
│   │   └── state.py   # Shared state (queues)
│   ├── config.py      # Configuration and validation
│   └── main.py        # Entry point
├── Dockerfile         # Docker image definition
├── docker-compose.yml # Container orchestration
└── requirements.txt   # Python dependencies

Technology Stack

BotMeriendo is built on a lean set of well-maintained libraries:
ComponentVersion / Notes
Python3.11 or newer
discord.py[voice]Discord API wrapper with voice support
yt-dlp>= 2024.12.0 — YouTube audio extraction
FFmpegSystem-level audio encoding/transcoding
PyNaClEncryption library required for voice
python-dotenvLoads .env file into environment variables
DockerContainerises the bot and all system dependencies
The default command prefix is !. You can change it to any character or string by setting the TRGGKEY environment variable in your .env file before starting the bot.

Build docs developers (and LLMs) love