A multi-platform integration bot that bridges Telegram, Steam, TeamSpeak 3, and AI-powered chat using Grok. Monitor your gaming presence, interact with friends, and get AI assistance - all through Telegram.
- 🤖 Telegram Bot Interface - Control everything through Telegram commands
- 🎮 Steam Integration - Track gaming activity, friends status, and more
- 🎤 TeamSpeak 3 Integration - Monitor voice server status and user activity
- 🧠 Grok AI Chat - AI-powered conversational assistant with context awareness
- 📊 Real-time Polling - Automatic status updates and notifications
- 💾 Persistent Storage - SQLite database with Prisma ORM
- Node.js 18.x or higher
- npm or yarn package manager
- A Telegram bot token from @BotFather
- Steam API key from Steam Web API
- TeamSpeak 3 server with query access
- Grok AI API key from x.ai
-
Clone the repository
git clone https://github.com/yourusername/gamer-bridge.git cd gamer-bridge -
Install dependencies
npm install
-
Configure environment variables
cp .env.example .env
Edit
.envand fill in your credentials (see Configuration section below) -
Initialize the database
npm run db:push
-
Build the project
npm run build
-
Start the bot
npm start
All configuration is done through environment variables in the .env file. Copy .env.example to .env and configure the following:
BOT_TOKEN- Your Telegram bot token from BotFather
STEAM_API_KEY- Your Steam Web API keySTEAM_REFRESH_TOKEN- Steam account refresh token (recommended)STEAM_PASSWORD- Alternative to refresh token (less secure)
TS3_HOST- TeamSpeak server hostname/IPTS3_QUERY_PORT- ServerQuery port (default: 10011)TS3_SERVER_PORT- Virtual server port (default: 9987)TS3_USERNAME- ServerQuery usernameTS3_PASSWORD- ServerQuery password
GROK_API_KEY- Your Grok API keyGROK_MODEL- AI model to use (default: grok-3-mini)GROK_BASE_URL- API endpoint (default: https://api.x.ai/v1)GROK_MAX_TOKENS- Maximum response tokens (default: 200)GROK_TEMPERATURE- Response creativity (default: 0.95)GROK_MESSAGE_HISTORY_LIMIT- Chat history messages to keep (default: 25)GROK_DEFAULT_COOLDOWN_MINUTES- Cooldown between AI requests (default: 7)
DATABASE_URL- Database connection string (default: file:./dev.db)UPDATE_RATE_SECONDS- Polling interval for status updates (default: 30)LOG_LEVEL- Logging level: debug, info, warn, error (default: warn)
npm run build- Compile TypeScript to JavaScriptnpm start- Run the compiled bot (requires build first)npm run dev- Build and run in one commandnpm run db:push- Push Prisma schema changes to databasenpm run db:edit- Open Prisma Studio to view/edit databasenpm run generate-token- Generate Steam refresh token
Once the bot is running, interact with it through Telegram:
- Start a chat with your bot on Telegram
- Send
/startto initialize - Use
/statusto check current gaming activity - Chat naturally for AI-powered responses via Grok
A docker-compose.yml is included for containerized deployment:
docker-compose up -dgamer-bridge/
├── src/
│ ├── handlers/ # Telegram command handlers
│ ├── services/ # External service integrations (Steam, TS3, Grok)
│ ├── utils/ # Utility functions and helpers
│ ├── context.ts # Bot context type definitions
│ ├── db.ts # Database client initialization
│ ├── index.ts # Main application entry point
│ └── polling.ts # Status polling and monitoring
├── prisma/
│ └── schema.prisma # Database schema
├── scripts/
│ └── generateSteamToken.ts # Steam token generation utility
└── dist/ # Compiled JavaScript output
For development with auto-reload:
npm run devTo view and edit the database:
npm run db:editContributions are welcome! Please feel free to submit a Pull Request.
For issues and questions, please open an issue on GitHub.