mirror of
https://github.com/Dasemu/DiscordBot.git
synced 2026-11-26 15:26:11 +00:00
948 B
948 B
DiscordBot
Overview
Single-file Discord music bot (bot.py) using discord.py slash commands, yt-dlp for YouTube extraction and ffmpeg for streaming.
Commands
- Dev:
python bot.py(needs.envwithDISCORD_TOKEN) - Install:
pip install -r requirements.txt(inside.venv) - Lint/test: none configured yet
Architecture
Per-guild GuildPlayer (queue + current track) held by MusicBot. /play resolves title/URL in a thread and queues it; play_next pipes yt-dlp -o - into ffmpeg (googlevideo returns 403 to ffmpeg's own HTTP client) and chains playback via the after callback.
Gotchas
- yt-dlp breaks often when YouTube changes; fix with
pip install -U yt-dlp. - Set
DISCORD_GUILD_IDfor instant slash-command sync during development. daveyis pinned<0.2: with 0.2.0 the bot joins voice and "plays" but nobody hears it (DAVE session never ready). Checkvc._connection.can_encryptwhen audio is silent.