A Discord bot powered by Google's Gemini AI that provides support for Synpress-related questions. The bot analyzes the Synpress codebase and can answer questions about its functionality, usage, and implementation details.
- Responds to mentions in the designated support channel
- Uses Gemini AI to provide accurate responses about Synpress
- Handles long responses by splitting them into multiple messages
- Prevents overlapping requests with a processing lock
- TypeScript implementation for better type safety
- Node.js 18 or higher
- pnpm package manager
- Discord Bot Token
- Google Cloud API Key with Gemini AI access
-
Copy the
.env.example
file to.env
:cp .env.example .env
-
Fill in your environment variables in the
.env
file:DISCORD_BOT_TOKEN
: Your Discord bot token from the Discord Developer PortalCLOUD_API_KEY
: Your Google Cloud API key with Gemini AI access
-
Install dependencies:
pnpm install
-
Build the project:
pnpm build
-
Start the bot in development mode:
pnpm dev
Or in production mode:
pnpm start
-
Create a channel named
support-bot
in your Discord server -
Mention the bot (@BotName) in the support-bot channel with your Synpress-related question
pnpm build
- Builds the TypeScript codepnpm start
- Starts the bot in production modepnpm dev
- Starts the bot in development mode with hot reloadpnpm lint
- Runs the linterpnpm format
- Formats the code
- The bot only responds in the channel named
support-bot
- It requires the
synpress-source.txt
file in the root directory containing the Synpress codebase - Responses are limited to 1900 characters and will be split into multiple messages if needed
- The bot processes one request at a time to maintain response quality