Modern Bot Infrastructure
A robust, secure, and scalable architecture designed to keep your Discord bot online, your deployments automated, and your AI chat responsive.
SECURITY FIRST
Secrets are stored in secure environment variables; no tokens are ever exposed to the frontend.
REAL-TIME SYNC
Gateway heartbeats and deployment status updates are pushed to the dashboard in real-time.
SCALABLE DESIGN
Modular architecture allows for easy expansion of AI models and new Discord bot features.
Bot health monitoring
Follow these steps to connect your bot to the dashboard and enable real-time status tracking.
Bot runtime environment
Prepare your VPS and secure your bot credentials.
Heartbeat schema setup
Define the database schema for status tracking.
Gateway ping integration
Implement the recurring heartbeat ping.
Timeout & offline logic
Handle connection drops and status updates.
# Initialize project directory
mkdir bot-runtime && cd bot-runtime
npm init -y
# Install gateway dependencies
npm install discord.js dotenv
# Create secure config
cat << 'EOF' > .env
DISCORD_TOKEN="your_secret_token"
HEARTBEAT_URL="https://api.botdash.com/v1/heartbeat"
EOFSecure tokens
Keep your bot token in environment variables, never in your code.
Gateway pings
Regular heartbeats ensure the dashboard reflects real-time status.
Auto-offline
Dashboard flags bot as offline if no heartbeat arrives in 30s.
Latency tracking
Monitor your bot's ping to Discord gateway directly in the UI.