Self-hosting Rawrbot lets you run your own instance with your own bot token, giving you full control over the bot and its configuration. You’ll need Python 3.12 or newer, a Discord bot application created through the Discord Developer Portal, and optionally Spotify API credentials if you want to use the Spotify-related commands.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/Flyingbacen/Discord-rawrbot/llms.txt
Use this file to discover all available pages before exploring further.
Prerequisites
Before you start, make sure you have the following:- Python 3.12 or newer —
cogs/moderation.pyuses nested f-string syntax (such asf"{"" if ... else "s"}") that was introduced in Python 3.12. Earlier versions will fail to parse the file at import time. - A Discord account with access to the Discord Developer Portal, where you will create a bot application and obtain a token.
- Git — for cloning the repository from GitHub.
yt-dlpandffprobe— only required if you intend to use the/uploadcommand. These are not listed inrequirements.txtand must be installed separately on your system. Note that the/uploadcommand hardcodes the ffprobe path asc:/windows/ffprobe.exe, making it Windows-specific in its current form.
Installation
Install Python dependencies
Install the required Python packages using pip:This installs three packages as declared in
requirements.txt:aiohttp— async HTTP client used for web requestsdiscord.py— the Discord API wrapper the bot is built ontranslate— used by the/translatecommand
Create config.json
Copy
config_EXAMPLE.json to config.json in the project root and fill in your values:config.json
token— your Discord bot token from the Developer Portal (see the next section).spotify.spotifyClientID/spotifyClientSecret— credentials from the Spotify Developer Dashboard. Required for/searchspotifyand/convertsonglink.webhook— a Discord webhook URL used for internal logging. You can create one in any server channel via Channel Settings → Integrations → Webhooks.
Bot Application Setup
If you do not yet have a Discord bot application, follow these steps in the Developer Portal:Create a new application
Go to https://discord.com/developers/applications and click New Application. Give it a name (e.g. “Rawrbot”) and confirm.
Generate a bot token
Navigate to the Bot tab in the left sidebar. Click Reset Token, confirm the action, and copy the token that appears. Paste it into the
"token" field in your config.json. Keep this token secret — anyone with it can control your bot.Enable the Message Content Intent
Still on the Bot tab, scroll down to Privileged Gateway Intents and enable Message Content Intent. The bot’s
main.py sets intents.message_content = True, so Discord must have this enabled on the application side as well.Keeping the Bot Running
Runningpython main.py directly in a terminal works for development, but the bot process will stop when you close the terminal. For longer-running deployments, consider one of these approaches:
screenortmux(Linux/macOS) — launch the bot inside a persistent terminal session that survives disconnects:pm2— a Node.js-based process manager that works with Python processes and auto-restarts on crash:- VPS or cloud VM — running the bot on a remote machine (e.g. a DigitalOcean Droplet or AWS EC2 instance) keeps it online independently of your local machine.
Syncing Slash Commands
After the bot starts for the first time, its slash commands may not appear in Discord immediately. The/sync command calls tree.sync() to push all registered application commands to Discord’s API. This command is owner-only — it checks interaction.user.id against the allowedUsers list in cogs/general.py.
To find your Discord user ID, enable Developer Mode in Discord’s settings (Advanced → Developer Mode), then right-click your username anywhere in Discord and select Copy User ID.