- AI Chatbot: Real-time conversation threads via command or dedicated channel auto-replies.
- AI Image Generator: Generate custom illustrations inside Discord using the
/imaginecommand.
1. 🔑 Obtaining API Keys
To activate the AI functionalities, you must configure the Google Gemini API key.Step 1: Generate Google Gemini API Key
- Visit Google AI Studio.
- Log in with your Google account.
- Click the Get API Key button (top left).
- Click Create API Key and select a project.
- Copy the generated key.
Step 2: Configure config.js
Open config.js in the root of your project, find the APIs section, and paste your Gemini key:
2. 💬 Setting Up the AI Chatbot
Once the Gemini API key is configured, members can interact with the AI in two ways:Method A: Slash Commands
Users can execute the/ai-config command followed by their question. The bot will trigger a processing state and reply with the AI’s response formatted in a clean embed.
3. 🎨 AI Image Generation (/imagine)
The /imagine command allows members to create custom artwork by typing descriptive text prompts:
Retrieving the Image Generation API Key:
Razor uses the Rsn Labs API to handle dynamic image generation. Follow these steps to obtain your free API key:- Join the Discord Server — Join the official Rsn Labs Discord Server.
- Locate Bot Commands Channel — Head over to the #bot-commands channel.
- Register Account — Run the slash command
/registerwith your email and password: - Generate Key — Execute the slash command
/generate-keyto retrieve your private API key from the Rsn Labs bot. - Configure
config.js— Copy the API key and paste it into theimageGenAPIfield in yourconfig.js:
