A fully automated Discord Rich Presence system that displays custom lyrics and animations, automatically starting when Discord launches and stopping when Discord closes.
- Auto-Start/Stop: Automatically runs when Discord opens and stops when Discord closes
- Lyrics Display: Shows song lyrics in a flowing 2-line format
- Silent Operation: Runs completely in the background with no popup windows
- Smart Timing: 10-second delay for Discord to fully load before starting RPC
- Error Recovery: Automatically restarts if the RPC crashes
- Multi-Discord Support: Works with Discord Stable, Canary, PTB, and Development versions
custom-activity/
├── example.py # Example RPC script with lyrics
├── rpc.py # Main RPC script with lyrics
├── discord_monitor.py # Discord process monitor
├── start_discord_monitor.bat # Windows launcher (silent)
└── README.md # This file
- Python 3.6+ installed and added to PATH
- Discord Developer Application created at https://discord.com/developers/applications
- Get Client ID and add to
rpc.py
The required packages (psutil and pypresence) will be auto-installed when you first run the monitor.
Or install manually:
pip install psutil pypresenceFor automatic startup with Windows:
- Press
Win + R, typeshell:startup, press Enter - Copy
start_discord_monitor.batto the Startup folder - Restart your computer
For manual testing:
- Double-click
start_discord_monitor.bat
Details: "Lần Cuối - Ngọt" (Fixed song title)
State: "Nhìn quanh lần cuối" (Current lyric line)
Large Text: "Rừng thay lá ngậm ngùi" (Next lyric line - visible on hover)
Timer: Shows how long RPC has been running
- 2-line pairs for better readability
- 4-second intervals between lyric changes
- Long sentences split (6+ words) for optimal display
- Continuous loop through all lyrics
- Monitor starts when Windows boots
- Waits for Discord to launch
- 10-second delay for Discord to fully load
- Starts RPC with lyrics animation
- Auto-stops when Discord closes
- Auto-restarts if Discord reopens
Edit the lyrics_pairs array in rpc.py:
lyrics_pairs = [
["Your first line", "Your second line"],
["Another line", "Next line"],
# Add more pairs...
]time.sleep(4) # Change to 3, 5, 6 etc. for different speedsdetails="Your Song - Artist", # Change song title
buttons=[
{"label": "🎵 Your Song", "url": "your-youtube-link"}
]large_image="your-image-url", # Main image
small_image="your-small-image", # Corner overlayThe monitor watches for these processes:
Discord.exe(Stable)DiscordCanary.exe(Canary)DiscordPTB.exe(Public Test Build)DiscordDevelopment.exe(Development)
-
Check Discord Developer Console:
- Go to https://discord.com/developers/applications
- Verify your Client ID matches the one in
rpc.py
-
Test RPC manually:
cd "e:\codingStorage\Projects\custom-activity" python rpc.py
-
Test monitor manually:
python discord_monitor.py
-
Check file locations:
- All files must be in the same folder
- Batch file must have correct path to your folder
- Monitor checks every 3 seconds (minimal CPU usage)
- RPC updates every 4 seconds (Discord's limit is 15 seconds)
- Main Discord RPC script
- Contains lyrics and display logic
- Handles graceful shutdown
- 10-second startup delay
- Monitors Discord processes
- Starts/stops RPC automatically
- Error recovery and restart logic
- Silent background operation
- Windows launcher script
- Completely silent execution
- Auto-installs dependencies
- Error checking
- Python Version: 3.6+ required
- Discord API: Uses pypresence library
- Process Monitoring: Uses psutil library
- Platform: Windows-optimized (batch files)
- Startup Method: Windows Startup folder
-
Credit: qwertyquerty
-
Author: nkdkhtl
-
Email: khucphuongnam2005@gmail.com Enjoy your automated Discord custom activity! 🎉