Setup
A step-by-step guide to self-host the Tworst Admin Bot and connect it to your server.
Step 1: Create a Discord Application & Bot
Go to the Discord Developer Portal
Click New Application, give it a name (e.g. "TW Admin Bot")
Open the Bot tab → Reset/Copy Token → this is your
DISCORD_BOT_TOKENCopy the Application ID from the General Information tab → this is your
DISCORD_BOT_CLIENT_ID
Step 2: Invite the Bot to Your Server
In the application, open OAuth2 → URL Generator
Select scopes:
botandapplications.commandsSelect bot permissions: Manage Roles, Manage Channels, Send Messages, Embed Links, Read Message History, Mention @everyone, @here, and All Roles
Open the generated URL, pick your Discord server, and authorize
Step 3: Get Your Tworst Cloud Credentials
From panel.tworst.com, open your server's settings and note:
Tenant ID (
BOT_TENANT_ID)Server ID / slug (
BOT_SERVER_ID)Bot Secret (
BOT_SECRET)
Step 4: Download & Install
Step 5: Configure .env
Copy the example and fill in your values:
At minimum, set:
See Configuration for every available option (role sync, event/ticket channels, language, etc.).
Step 6: Register Slash Commands
This registers all / commands with Discord. Guild-scoped commands appear instantly.
Step 7: Start the Bot
You should see output similar to:
Test it by running /status in your Discord server — you should see your server's live status.
Step 8 (Optional): Channels & Role Sync
Event announcements: create a channel, then run
/event-channel set #eventsRole sync: set
BOT_ROLE_SYNC=1andBOT_GUILD_IDin.env, restart, then run/sync
Hosting Tips
Troubleshooting
Bot won't start
Confirm
.envis in the project root with all required fields filled inCheck Node.js version:
node --version(must be 20+)Make sure
npm installfinished without errors
Bot online but commands fail / "not connected"
Double-check
BOT_SECRET,BOT_TENANT_ID,BOT_SERVER_IDConfirm your server is paired and connected in the web panel
Set
BOT_DEBUG_BRIDGE=1for verbose connection logs
Slash commands don't appear
Run
npm run deploy-commandsagainGlobal commands can take up to an hour to propagate; guild-scoped are instant
Role sync not working
Ensure
BOT_ROLE_SYNC=1andBOT_GUILD_IDare set, then restartMake sure the bot has Manage Roles permission and its role is high enough in the Discord role list
Run
/syncto trigger a manual sync
Need Help?
Last updated

