A powerful Discord bot with AI image generation, text-to-speech, and AI chat capabilities.
- Add Bot to Server: dsc.gg/dtempire
- Live Web Demo: imggen.ankitgupta.com.np
- Web Panel: panel.ankitgupta.com.np
- Support Server: dsc.gg/dtempire-server
/home/container/
├── 📂 public/ # Web interface files
│ ├── index.html # Main web page
│ ├── style.css # Stylesheet
│ ├── script.js # Frontend JavaScript
│ ├── favicon.ico # Favicon
│ └── *.png # Icon files
├── 📜 index.js # Main Discord bot (Image Generation)
├── 📜 tts-bot.js # TTS & AI Chat bot
├── 📜 server.js # Express web server
├── 📜 start-all.js # Startup script
├── 📜 config.json # Configuration
├── 📜 package.json # Dependencies
└── 📜 example.env # Environment template
- Generate images from text prompts using multiple AI models
- Supported models:
flux,seeddream,turbo,kontext - Web dashboard for image generation
- Recent images gallery
- Customizable image dimensions
- Convert text to speech in multiple languages
- AI-enhanced TTS with better pronunciation
- Voice channel integration
- Auto-TTS reply channels
- Randomized voice variations
- Intelligent chat responses
- Context-aware conversations
- Auto-AI reply channels
- Multiple language support
- Beautiful, responsive web dashboard
- Generate images without Discord
- View image generation history
- Copy prompts and download images
- Bot status monitoring
| Command | Description | Example |
|---|---|---|
.imggen <prompt> |
Generate AI image | .imggen sunset over mountains |
.imggen <prompt> --model <model> |
Generate with specific model | .imggen dragon --model turbo |
.help-ai |
Show AI image help | .help-ai |
| Command | Description | Example |
|---|---|---|
.tts <text> |
Text to speech | .tts hello world |
.tts --ai <text> |
AI-enhanced TTS | .tts --ai welcome everyone |
.ttsvoice <text> |
Play in voice channel | .ttsvoice join our server |
.tts --lang <code> <text> |
Specific language | .tts --lang ne नमस्ते |
| Command | Description | Example |
|---|---|---|
.ai <prompt> |
Chat with AI | .ai tell me a joke |
.aitts <prompt> |
AI + TTS response | .aitts explain quantum physics |
| Command | Description | Example |
|---|---|---|
.help |
Show all commands | .help |
.help-tts |
TTS commands help | .help-tts |
.ping |
Check bot latency | .ping |
.language |
Language settings | .language |
| Command | Description | Example |
|---|---|---|
.setchannel-ai #channel |
Set AI auto-reply channel | .setchannel-ai #ai-chat |
.setchannel-tts #channel |
Set TTS auto-reply channel | .setchannel-tts #voice-chat |
.checkchannels |
View configurations | .checkchannels |
- Node.js 18 or higher
- Discord Bot Token
- Git
- Clone and setup
git clone https://github.com/hyperdargo/Discord-AI
cd Discord-AI
npm install- Configure environment
cp example.env .envEdit .env file:
# Discord Bot Tokens
DISCORD_BOT_TOKEN=your_main_bot_token
DISCORD_BOT_TOKEN_2=your_tts_bot_token
CLIENT_ID=your_bot_client_id
# Server Settings
GUILD_ID=your_main_server_id
OWNER_ID=your_user_id
# Web Server
PORT=25580
# API Settings
IMAGE_API_URL=https://imggen-api.ankitgupta.com.np/api/pollination
MAX_PROMPT_LENGTH=500
DEFAULT_MODEL=flux
NODE_ENV=production- Configure config.json
{
"api_url": "https://imggen-api.ankitgupta.com.np/api/pollination",
"port": 25580,
"discord_invite": "http://dsc.gg/dtempire",
"support_server": "http://dsc.gg/dtempire-server",
"max_prompt_length": 500
}- Start the application
# Start all services
node start-all.js
# Or start individually
node server.js # Web server
node index.js # Image generation bot
node tts-bot.js # TTS & AI bot{
"api_url": "https://imggen-api.ankitgupta.com.np/api/pollination",
"port": 25580,
"discord_invite": "http://dsc.gg/dtempire",
"support_server": "http://dsc.gg/dtempire-server",
"max_prompt_length": 500,
"default_model": "flux",
"available_models": [
{"id": "flux", "name": "Flux (Recommended)", "description": "Best quality images"},
{"id": "seeddream", "name": "SeedDream", "description": "New experimental model"},
{"id": "turbo", "name": "Turbo", "description": "Fast generation"},
{"id": "kontext", "name": "Kontext", "description": "Premium quality"}
],
"languages": [
{"code": "en", "name": "English", "native": "English"},
{"code": "ne", "name": "Nepali", "native": "नेपाली"},
{"code": "hi", "name": "Hindi", "native": "हिन्दी"},
{"code": "ja", "name": "Japanese", "native": "日本語"}
]
}{
"dependencies": {
"discord.js": "^14.14.1",
"express": "^4.18.2",
"axios": "^1.6.2",
"@discordjs/voice": "^0.16.0",
"dotenv": "^16.3.1"
},
"scripts": {
"start": "node start-all.js",
"web": "node server.js",
"bot": "node index.js",
"tts": "node tts-bot.js"
}
}The web interface (/public/) provides:
-
Image Generation Panel
- Text prompt input
- Model selection dropdown
- Image size options
- Generate button
-
Gallery Section
- Recently generated images
- Copy prompt button
- Download image button
- Model information
-
Bot Status Panel
- Discord bot status
- Server count
- Uptime information
- Quick invite link
-
Responsive Design
- Mobile-friendly layout
- Dark/light theme
- Smooth animations
- Loading indicators
-
Create AI Auto-Reply Channel
.setchannel-ai #ai-chat- Any message in this channel gets AI response
- No commands needed
-
Create TTS Auto-Reply Channel
.setchannel-tts #tts-chat- Any message gets converted to voice file
- Language based on user/server settings
-
Check Current Setup
.checkchannels
User Language Setting:
.language set # Opens language selection menuServer Language Setting (Admin):
.language server # Set default language for serverAvailable Languages:
en- English 🇺🇸ne- Nepali 🇳🇵hi- Hindi 🇮🇳ja- Japanese 🇯🇵
| File | Purpose | Key Features |
|---|---|---|
index.js |
Main Discord bot | Image generation, web server, gallery |
tts-bot.js |
TTS & AI bot | Text-to-speech, AI chat, voice channels |
server.js |
Web server | Express server, API endpoints |
start-all.js |
Startup script | Launches all services |
public/index.html |
Web interface | Image generation UI, gallery |
public/script.js |
Frontend logic | API calls, image display |
public/style.css |
Styling | Responsive design, animations |
config.json |
Configuration | API settings, models, languages |
Contributions are welcome! Please follow these steps:
- Fork the repository
- Create a feature branch (
git checkout -b feature/AmazingFeature) - Commit your changes (
git commit -m 'Add AmazingFeature') - Push to the branch (
git push origin feature/AmazingFeature) - Open a Pull Request
- Discord Support Server: dsc.gg/dtempire-server
- Bot Invite Link: dsc.gg/dtempire
- Live Demo: imggen.ankitgupta.com.np
- Issue Reporting: GitHub Issues
This project is licensed under the MIT License. See the LICENSE file for details.
- Pollinations.ai for the image generation API
- Discord.js community for the excellent library
- All contributors and users of DTEmpire Bot
- Add the bot to your server
- Use
.helpto see all commands - Try
.imggen sunsetfor your first AI image - Join our support server for help
- Visit imggen.ankitgupta.com.np
- Enter your prompt and select a model
- Click "Generate" to create images
- Download or copy prompts from the gallery
- Clone the repository
- Set up
.envfile with your tokens - Run
npm installandnpm start - Customize
config.jsonfor your needs
Made with ❤️ by Ankit Gupta | DTEmpire