Skip to content

Some Scripts in Python to display a Rich Presence in Disocord

License

Notifications You must be signed in to change notification settings

JWLMT88/discord-rpc

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Python Discord Rich Presence Scripts

This repository contains a collection of Python scripts that allow you to display a Rich Presence on Discord. These scripts make use of the Discord RPC (Rich Presence Client) SDK, which is a powerful tool for integrating Discord into your applications.

Requirements

To use these scripts, you'll need to have Python 3.6 or higher installed on your system. Additionally, you'll need to install the following Python packages:

  • pypresence: This is the Python wrapper for the Discord RPC SDK. You can install it using pip:
pip install pypresence

Usage

To use these scripts, simply clone this repository to your local machine:

git clone https://github.com/your_username/python-discord-rich-presence.git

Then, open the folder containing the script you want to use and run it using Python:

python script_name.py

Available Scripts

  • abelton.py : For more info open Ableton Directory

  • game_time.py : This script displays the amount of time you've spent playing a particular game on Discord. To use this script, you'll need to specify the game's name and the time you started playing.

  • spotify.py : This script displays the song you're currently listening to on Spotify as your Discord Rich Presence. You'll need to have the Spotify desktop app installed on your system for this script to work.

Contributing

If you have an idea for a new script or would like to improve an existing one, feel free to submit a pull request! We're always looking for new ways to enhance the Discord experience.

Tutorial

Import necessary libraries:

  • pypresence: for updating Discord status
  • random: for generating random numbers (unused in this script)
  • ctypes: for accessing Windows API functions
  • time: for getting the current time and waiting
  • os: for running system commands and clearing the console
Set up variables:
  • application_id: the ID of the Discord application used to update status
  • title, program, and project: strings used to store window titles and project names
  • btns: a list of buttons displayed on the Discord status
  • Connect to Discord API using the Presence class from pypresence, and set the start time to the current time.

And that's it! This script continually checks if the programm is running and updates the Discord status with the project name if it is.

License

This repository is licensed under the MIT license. See the LICENSE file for more information.

About

Some Scripts in Python to display a Rich Presence in Disocord

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages