A Discord bot that generates and posts propaganda-style images on a schedule, with music playback capabilities and CS2 game monitoring features.
- Python 3.11 or higher
- FFmpeg (for audio processing) # make sure you have it in your "path"
All Python dependencies are listed in requirements.txt. Install them using:
pip install -r requirements.txtConfigure the bot's behavior with this file. Example configuration:
{
"propaganda_scheduler": {
"time": {
"hour": 12,
"minute": 15
},
"timezone": "Asia/Jerusalem",
"poster_output_channel_id": 123456789012345678,
"voice_channel_id": 123456789012345678,
"youtube_playlist_url": "https://www.youtube.com/playlist?list=YOUR_PLAYLIST_ID",
"steam_ids": ["76561198244212404"],
"cs2_alert_video_url": "https://www.youtube.com/watch?v=YOUR_ALERT_VIDEO_ID"
},
"text_prompt": "A vintage military recruitment poster featuring [your description]",
"poster_caption": "A True Malborian Culture Piece:",
"max_retries": 3
}Store your API tokens in this file. Example configuration:
{
"discord_token": "your_discord_bot_token_here",
"wavespeed_tokens": ["token1", "token2", "token3"],
"steam_api_key": "your_steam_api_key_here"
}To obtain your Steam API key:
- Go to https://steamcommunity.com/dev/apikey
- Sign in with your Steam account
- Enter a domain name (can be anything for personal use)
- Accept the Steam Web API Terms of Use
- Click "Register" to generate your API key
- Copy the generated key and paste it in your
tokens_config.jsonfile
To find your Steam64 ID:
- Open your Steam profile in a web browser
- Right-click anywhere on the page and select "View Page Source"
- Press Ctrl+F and search for "steamid"
- Look for a 17-digit number that starts with "7656"
- This is your Steam64 ID (e.g., 76561198244212404)
- Add this ID to the "steam_ids" array in your
propaganda_config.jsonfile
Alternatively, you can find your Steam64 ID using these methods:
- If you know your custom URL: Visit https://steamid.xyz/ and enter your Steam custom URL
- If your profile is public: Use https://steamid.xyz/ and enter your profile URL
- Scheduled daily propaganda poster generation
- Custom text prompts and captions
- AI-powered image generation
- YouTube playlist support
- Voice channel integration
- Background music during events
- Steam profile monitoring
- Custom alert videos when users start playing CS2
- Automatic voice channel notifications
/generate: Generate a propaganda poster immediately/set_channel: Set the current channel for propaganda posts/set_time: Set daily posting schedule/set_timezone: Configure the timezone/show_config: Display current configuration/play: Play music from a YouTube URL/leave: Disconnect from voice channel/set_voice_channel: Set the default voice channel
The bot includes a web interface running on port 5000 that allows you to:
- Monitor bot status
- Start/stop the bot
- View basic configuration
The bot includes comprehensive error handling for:
- API rate limits
- Authentication issues
- Content policy violations
- Network timeouts
- Invalid configurations
- Keep your Discord, Steam and WaveSpeed tokens secure
- Ensure proper permissions for the bot in your Discord server
- The bot requires both text and voice channel permissions for full functionality
- Steam monitoring requires valid Steam API key and Steam IDs
- Image generation depends on WaveSpeed API availability