Yoink ships a standalone Discord bot binary that connects to your existing Yoink server. Once running, guild members can useDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/coah80/yoink/llms.txt
Use this file to discover all available pages before exploring further.
/yoink, /convert, and /compress slash commands without ever leaving Discord. Files under 25 MB are attached directly to the reply; larger files get a temporary download link that expires in five minutes. The bot also bundles moderation, leveling, welcome messages, and reaction role systems — all backed by a local SQLite database.
How it works
The bot is a separate Go binary (yoink-bot) that communicates with your Yoink API over HTTP using a shared secret. When a user runs a slash command, the bot:
- Defers the interaction so Discord shows a “thinking…” indicator.
- Calls the Yoink API to start an async job.
- Polls the job status and updates the Discord embed with live progress.
- On completion, either attaches the file directly (≤ 25 MB) or posts a download link.
Setup
Create a Discord application
Go to discord.com/developers/applications and create a new application. Under Bot, click Add Bot.Copy the Bot Token and the Application ID (found on the General Information page) — you will need both.
Enable privileged intents
Still on the Bot settings page, scroll to Privileged Gateway Intents and enable:
- Server Members Intent
- Message Content Intent
Set environment variables
Create a
.env file or export variables in your shell:BOT_SECRET must match the BOT_SECRET environment variable set on your Yoink server. Requests without the correct secret are rejected by the API.Build the bot binary
From the root of the Yoink repository:This produces
./yoink-bot in the project root.Invite the bot to your server
Go to OAuth2 → URL Generator in the developer portal. Select the
bot and applications.commands scopes, then grant at minimum:- Read Messages / View Channels
- Send Messages
- Attach Files
- Embed Links
- Manage Roles (for reaction roles and auto-role)
- Kick Members / Ban Members (for moderation commands)
- Moderate Members (for timeout command)
Environment variables reference
| Variable | Required | Default | Description |
|---|---|---|---|
DISCORD_TOKEN | ✅ | — | Discord bot token |
DISCORD_APP_ID | ✅ | — | Discord application ID |
YOINK_API_URL | — | http://localhost:3003 | Internal URL of your Yoink server |
YOINK_PUBLIC_URL | — | Same as YOINK_API_URL | Public-facing URL used in download links |
BOT_SECRET | ✅ | — | Shared secret matching the server’s BOT_SECRET |
Slash commands
/yoink
Downloads media from any URL supported by Yoink and delivers it in the channel.
| Option | Description |
|---|---|
url | The media URL to download (required) |
format | Output format: mp4 (default), mp3, gif, compressed |
resume_from | For playlists, start downloading from this video number (min: 1) |
File ≤ 25 MB
The file is downloaded to the bot and attached directly to the Discord message — no links needed.
File > 25 MB
The bot posts a temporary download link using your
YOINK_PUBLIC_URL. The link expires in 5 minutes.Auto-compress
If the downloaded file exceeds 25 MB, the bot automatically triggers compression targeting 24 MB before responding. If compression also fails, it falls back to a download link.
Playlists
Playlist downloads are zipped on the server. The bot posts a ZIP download link (expires in 5 minutes) along with the video count and any failures.
/convert
Converts an attached Discord file to a different format.
| Option | Description |
|---|---|
file | A file attached to the slash command (required) |
format | Target format: mp4, webm, mkv, mov, mp3, m4a, opus, wav, flac (required) |
/yoink.
/compress
Compresses a video to fit within a target file size.
| Option | Description |
|---|---|
file | A video file attached to the slash command (required) |
target_mb | Target size in megabytes (1–500, default: 25) |
preset | fast, balanced (default), or quality |
Additional bot features
Beyond media commands,yoink-bot includes a full-featured guild management suite:
Moderation
Moderation
Commands:
/ban, /kick, /timeout, /warn, /history, /modlog, /note, /purge, /lock, /unlockAll moderation actions are logged to a configurable mod-log channel. Run /setup to configure it interactively.Leveling system
Leveling system
Members earn XP by sending messages. Commands:
/level, /leaderboard, /setlevel, /xpsettingsLevel roles (Newcomer → Regular → Active → Veteran → Legend) can be created automatically by the /setup wizard.Welcome messages
Welcome messages
Sends a customizable welcome message when a new member joins. Configure the channel and message text via
/welcome or the /setup wizard.Reaction roles
Reaction roles
Assign roles to members automatically when they react to a specific message. Managed with
/reactionrole.Interactive setup wizard
Interactive setup wizard
Run
/setup (admin only) for a guided, step-by-step configuration flow covering mod log channel, welcome channel, auto-role, and level roles — with options to select existing channels/roles or have the bot create them for you.Discord gateway intents
The bot requests the following privileged and non-privileged intents:| Intent | Purpose |
|---|---|
Guilds | Core guild and channel information |
GuildMessages | Receive messages for XP tracking |
MessageContent | Read message text for XP and moderation |
GuildMembers | Welcome messages and auto-role on member join |
GuildMessageReactions | Reaction role add/remove events |