Discord Commands Registration - Admin Panel
Overview
You can now register Discord slash commands directly from the Admin Panel, without needing terminal access.
How to Register Commands
Step 1: Go to Admin Panel
Navigate to
https://aethex.dev/adminClick on the "Discord" tab
Step 2: Click "Register Commands"
You'll see a new card titled "Discord Commands" at the top with a blue button that says "Register Commands".
Click this button.
Step 3: Enter Admin Token
A popup will appear asking for your admin registration token.
This token is:
Set in your Vercel environment variables as
DISCORD_ADMIN_REGISTER_TOKENA random secure string (e.g.,
sk-admin-aethex-discord-2024)
Example popup:
Step 4: Wait for Confirmation
The button will show "Registering..." with a spinning loader.
Once complete, you'll see one of:
✅ Success:
⚠️ Partial Success (Error 50240):
❌ Error:
What Gets Registered
The button registers these 5 Discord slash commands:
/verify- Link your Discord account to AeThex/set-realm- Choose your primary arm (Labs, GameForge, Corp, Foundation, Dev-Link)/profile- View your linked AeThex profile/unlink- Disconnect your Discord account/verify-role- Check your assigned Discord roles
Plus Discord's auto-generated "Entry Point" command (for Discord Activities).
Troubleshooting
"Unauthorized" Error
Issue: Getting this error when registering.
Solution:
Check your
DISCORD_ADMIN_REGISTER_TOKENenvironment variable in VercelMake sure you entered the token exactly as it's set (case-sensitive)
Verify token doesn't have extra spaces
"Failed to register commands" Error
Issue: Generic error when clicking the button.
Check:
Is your bot deployed on PebbleHost?
Are your
DISCORD_BOT_TOKENandDISCORD_CLIENT_IDenv vars set on Vercel (backend)?Open browser console (F12) → Network tab → Check the POST request to
/api/discord/admin-register-commands
"Entry Point command already exists" (Not an Error)
This is expected! When you enable Discord Activities:
Discord auto-creates an "Entry Point" command
Our script recognizes this and doesn't try to overwrite it
Your bot's 5 commands live alongside it peacefully
Environment Variables Required
On Vercel (Backend):
On PebbleHost (Bot):
Alternative Methods
If the admin button doesn't work, you can also register commands using:
curl (if you have PebbleHost console access)
Postman
Create POST request to
https://aethex.dev/api/discord/admin-register-commandsAdd header:
Authorization: Bearer YOUR_DISCORD_ADMIN_REGISTER_TOKENClick Send
Summary
✅ Click "Register Commands" in Admin → Discord tab ✅ Enter your admin token ✅ Wait for success confirmation ✅ Commands are now live in Discord
Done! 🎉
Last updated
