A powerful Discord bot and web application that generates AI images using natural language prompts. Built with Node.js, Express, and Discord.js.
- π Website: Live Hosted
- π€ Discord Bot: Generate images directly in Discord with
.imggencommand - π Web Interface: Beautiful web dashboard for image generation
- β‘ Multiple AI Models: Support for Flux, Turbo, and Kontext models
- π¨ Real-time Generation: Watch as images are generated in real-time
- π± Responsive Design: Works perfectly on desktop and mobile devices
- πΎ Recent Images: Gallery of recently generated images
- π Discord Integration: Seamless integration with Discord embeds and buttons
- Node.js 18 or higher
- Discord Bot Token
- Discord Application ID
-
Clone the repository
git clone https://github.com/yourusername/dtempire-ai.git cd dtempire-ai -
Install dependencies
npm install
-
Configure environment variables Create a
.envfile:# Discord Bot Configuration DISCORD_BOT_TOKEN=your_discord_bot_token_here CLIENT_ID=your_bot_client_id_here # Optional: Server Specific Settings GUILD_ID=your_server_id_here OWNER_ID=your_user_id_here # Web Server Configuration PORT=25580 # API Settings IMAGE_API_URL=https://jmlite-tts-api.onrender.com/pollination MAX_PROMPT_LENGTH=500 DEFAULT_MODEL=flux NODE_ENV=production
-
Start the application
npm start
-
.imggen <prompt>- Generate an image from text prompt.imggen a beautiful sunset over mountains with cherry blossoms -
.help- Show help menu with all commands
Access the web interface at: http://your-domain.com:25580
- Enter your prompt in the text area
- Select AI model (Flux, Turbo, or Kontext)
- Adjust image dimensions
- Click "Generate Image"
- View and download generated images
dtempire-ai/
βββ server.js # Main server file (web + Discord bot)
βββ package.json # Dependencies and scripts
βββ .env # Environment variables
βββ public/ # Web interface files
βββ index.html # Main web page
βββ style.css # Stylesheets
βββ script.js # Frontend JavaScript
βββ favicon.ico # Browser tab icon
- Backend: Node.js, Express.js
- Discord Integration: Discord.js v14
- Frontend: Vanilla JavaScript, CSS3, HTML5
- API Integration: Pollinations AI Image Generation API
- Real-time Updates: WebSocket-like polling
// Message handler for .imggen command
client.on('messageCreate', async (message) => {
if (message.content.startsWith('.imggen')) {
// Process image generation
const image = await generateImage(prompt);
// Send embed with result
}
});app.post('/generate-image', async (req, res) => {
const { prompt, model, width, height } = req.body;
const result = await generateImage(prompt, model, width, height);
res.json({ success: true, data: result });
});// Frontend updates generation status
function showLoading(prompt, model) {
// Update UI to show generating state
// Poll for completion
}- Create a new server with Node.js egg
- Set startup command:
npm install && node server.js - Upload all files to
/home/container/ - Configure environment variables in Pterodactyl panel
- Start the server
-
Set up reverse proxy (nginx example):
server { listen 80; server_name your-domain.com; location / { proxy_pass http://localhost:25580; proxy_http_version 1.1; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection 'upgrade'; proxy_set_header Host $host; proxy_cache_bypass $http_upgrade; } }
-
Use process manager (PM2 example):
npm install -g pm2 pm2 start server.js --name "dtempire-ai" pm2 startup pm2 save
| Variable | Description | Required |
|---|---|---|
DISCORD_BOT_TOKEN |
Your Discord bot token | Yes |
CLIENT_ID |
Your Discord application ID | Yes |
PORT |
Web server port (default: 25580) | No |
GUILD_ID |
Specific guild ID for testing | No |
OWNER_ID |
Bot owner user ID | No |
We welcome contributions! Please feel free to submit pull requests or open issues for bugs and feature requests.
- Fork the repository
- Create a feature branch:
git checkout -b feature/amazing-feature - Commit your changes:
git commit -m 'Add amazing feature' - Push to the branch:
git push origin feature/amazing-feature - Open a pull request
This project is licensed under the MIT License - see the LICENSE file for details.
Made with β€οΈ by DTEmpire
- π Website: DTEmpire ImgGen AI
- π± Discord: Join Our Server
- π€ Add Bot: Invite to Your Server
-
Bot not responding in Discord
- Check bot permissions
- Verify message content intent is enabled
- Ensure bot is in the server
-
Image generation fails
- Check API endpoint availability
- Verify prompt length (max 500 characters)
- Check network connectivity
-
Web interface not loading
- Verify port 25580 is open
- Check server logs for errors
- Ensure all files are in correct locations
- π Check this README first
- π Open an issue on GitHub
- π¬ Join our Discord server for support
- Initial release
- Discord bot with
.imggencommand - Web interface with real-time generation
- Support for multiple AI models
- Responsive design
β Star this repository if you find it helpful!
π€ Happy generating with DTEmpire AI!


