a self-hostable single-guild discord bot for playing music and announcing vc channel joins/leaves
Find a file
2025-03-12 01:05:21 -05:00
cache Add ytlogin command for OAuth against YouTube 2024-10-23 04:35:02 +00:00
cogs Change to using cookies bc OAuth is getting patched out 2024-11-13 23:36:42 +00:00
config Add ytlogin command for OAuth against YouTube 2024-10-23 04:35:02 +00:00
contrib Add systemd service with webhook notify on start/stop 2025-03-12 01:05:21 -05:00
logs Add: logs/.gitkeep 2024-10-21 22:30:55 +00:00
sounds Delete sounds/.gitkeep 2024-10-21 22:42:46 +00:00
.env.example add docker support 2022-12-12 06:59:44 -06:00
.gitignore Add ytlogin command for OAuth against YouTube 2024-10-23 04:35:02 +00:00
.style.yapf first commit 2022-06-23 00:09:34 -05:00
app.py Modern packaging 2022-12-12 06:59:21 -06:00
docker-compose.yml Add ytlogin command for OAuth against YouTube 2024-10-23 04:35:02 +00:00
Dockerfile Fix: flag needs value 2024-10-22 13:25:11 +00:00
icon2.png first commit 2022-06-23 00:09:34 -05:00
pdm.lock support more dice notation 2023-01-17 10:47:18 -06:00
pyproject.toml Update pyproject.toml 2024-10-22 13:21:52 +00:00
README.md Add systemd service with webhook notify on start/stop 2025-03-12 01:05:21 -05:00
requirements.txt Update requirements.txt 2024-10-22 13:22:10 +00:00

umi

a self-hostable single-guild discord bot for playing music and announcing vc channel joins/leaves

Pre-requisites

Install dependencies:

  • FFI: libffi
  • NaCl: libnacl or libsodium
  • FFmpeg: ffmpeg
  • yt-dlp: yt-dlp
  • opus: opus

Copy .env.example to .env:

  • DISCORD_BOT_TOKEN is obtained from the Discord Developer Dashboard

    • Click or create an application
    • Get your token from the "Bot" section in the sidebar menu
  • DISCORD_GUILD_ID is obtained from within the Discord app

    • Settings > Advanced > Developer Mode: enabled
    • Right click the guild and select "Copy ID"
  • DISCORD_STATUS_WEBHOOK_URL (optional) is used to monitor when the bot fails

    • Channel Settings > Integrations > New Webhook (don't forget to save changes)
    • Copy Webhook URL
  • DISCORD_BOT_ADMIN_ROLE_ID for reloading cogs

  • DISCORD_BOT_ADMIN_USER_ID for reloading cogs

  • DISCORD_VCJOIN_CHANNEL for the VCJoin cog

Setup

with systemd

mkdir -p /srv/discord
cd /srv/discord

sudo useradd --system -s /srv/discord discord
sudo chown -R discord:discord /srv/discord

sudo -Hu discord git clone https://git.trwnh.com/a/umi.git

python -m venv .venv
.venv/bin/pip install -r umi/requirements.txt

sudo cp umi/umi@.service /etc/systemd/system/umi@.service
sudo systemctl daemon-reload
sudo systemctl start umi@umi

...with Docker Compose

mkdir -p /srv/discord
cd /srv/discord

sudo useradd --system -s /srv/discord discord
sudo chown -R discord:discord /srv/discord

sudo -Hu discord git clone https://git.trwnh.com/a/umi.git

cd umi
sudo docker compose build
sudo docker compose up -d

Log into YouTube