What Youβll Build
A bot that works on Discord, Telegram, and Slack simultaneously with a single codebase.Prerequisites
BoostGPT Account
Sign up at app.boostgpt.co
Node.js
Version 14.0.0 or higher
Step 1: Install Dependencies
Step 2: Get Your Tokens
BoostGPT
- Go to app.boostgpt.co
- Create a project and copy the Project ID
- Generate an API Key from API Keys
- Create a bot and copy the Bot ID
Discord
- Go to Discord Developer Portal
- Create a new application
- Go to Bot β Create bot
- Enable MESSAGE CONTENT INTENT
- Copy the bot token
Telegram
- Open Telegram and search for @BotFather
- Send
/newbotand follow instructions - Copy the token provided
Slack
- Go to api.slack.com/apps
- Create a new app
- Enable Socket Mode
- Add bot scopes:
chat:write,channels:history,im:history - Copy the Bot Token and App Token
Step 3: Configure Environment
Create.env:
.env
Step 4: Create Your Bot
Createbot.js:
bot.js
Step 5: Run Your Bot
Your bot is now live on 3 platforms with one codebase!
Step 6: Test It
- Discord
- Telegram
- Slack
- Mention your bot in a channel:
@YourBot hello - Or DM it directly
- Try
/pingor/status
Understanding the Code
Message Object
Every message has this structure:Context Object
The context provides channel information:Message Handler Return Values
Advanced: Custom Logic Per Channel
Adding More Channels
Want to add WhatsApp or Crisp?- WhatsApp
- Crisp
Common Patterns
Broadcasting Messages
Send a message to all channels:Sending Direct Messages
Dynamic Adapter Management
Troubleshooting
Discord bot not responding
Discord bot not responding
Make sure MESSAGE CONTENT INTENT is enabled in Discord Developer Portal β Bot settings.
Telegram bot shows 'Bot was blocked by the user'
Telegram bot shows 'Bot was blocked by the user'
Start a chat with your bot first by searching for it in Telegram and clicking Start.
Slack bot not receiving messages
Slack bot not receiving messages
Verify Socket Mode is enabled and youβre using the correct App Token (starts with
xapp-).Next Steps
API Reference
Explore all Router methods
Custom Adapters
Build your own channel adapter
Deployment
Deploy to production
Examples
See real-world use cases