- Open Discord
- Click + → Create Server
- Name it
Done.
-
Click New Application
-
Name it (e.g., AlertsBot)
-
Click Create
Now:
- Go to Bot (left sidebar)
- Click Add Bot
- Click Reset Token
- Copy the token somewhere safe
That token is your BOT_TOKEN.
-
Go to OAuth2 → URL Generator
-
Select:
- ✅
bot(under Scopes)
- ✅
-
Under Bot Permissions select:
- ✅ Send Messages
- ✅ View Channels
-
Copy the generated URL
-
Open it in browser
-
Choose your server
-
Click Authorize
Your bot is now inside your server.
- Discord → User Settings
- Advanced → Enable Developer Mode
- Right-click the channel where alerts should go
- Click Copy Channel ID
You now have:
BOT_TOKEN=your_token_here
CHANNEL_ID=123456789012345678
curl -X POST "https://discord.com/api/v10/channels/CHANNEL_ID/messages" \
-H "Authorization: Bot BOT_TOKEN" \
-H "Content-Type: application/json" \
-d '{"content":"🚨 Alert triggered!"}'Replace:
CHANNEL_IDBOT_TOKEN
If correct, message appears instantly.
BOT_TOKEN="YOUR_TOKEN"
CHANNEL_ID="123456789012345678"
curl -X POST "https://discord.com/api/v10/channels/$CHANNEL_ID/messages" \
-H "Authorization: Bot $BOT_TOKEN" \
-H "Content-Type: application/json" \
-d '{"content":"Server CPU usage high"}'You do NOT need:
- WebSocket
- Gateway connection
- Intents
- Any library
Just REST API.
→ Wrong token
→ Bot not invited or no permission in that channel
→ Wrong channel ID