Skip to content

Easy Setup of Discord Rich Presence for MacOS/Linux Users

Notifications You must be signed in to change notification settings

MahdeenSky/DiscordEasyRichPresence

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 

Repository files navigation

DiscordEasyRichPresence

"DiscordEasyRichPresence is a script for MacOS and Linux users, for interfacing your game with a locally running Discord desktop client (Supports Buttons)"

Requirements:

Python 3.0 and above

Setup:

clone this to your local device

git clone https://github.com/MahdeenSky/DiscordEasyRichPresence

Go to the developer portal and create an application

https://discord.com/developers/applications



Add assets(image) to your application (Name of asset is image key)



Select images and clear all fields except PARTY ID and JOIN SECRET



Get your client ID and fill it in the gaps in main.py



Within main.py, change the activity code according to your best fit
activity = {
            "state": "Exploring Town of Beginnings",  # anything you like
            "details": f"Aincrad {current_floor}",  # anything you like
            "timestamps": {
                "start": start_time
            },
            "assets": {
                "small_text": "Online",  # anything you like
                "small_image": "green",  # must match the image key
                "large_text": "Swordsman - Level 10",  # anything you like
                "large_image": "default"  # must match the image key
            },
            "buttons": [ # optional, add if you want buttons
                {"label": "??? Sword Art Online ???", "url": "https://www.youtube.com/watch?v=onYSNgHbbW8&ab_channel=Gigguk"}, 
                {"label": "*----* GITHUB *----*", "url": "https://github.com/MahdeenSky"} # label = button text, url = link to redirect on click
            ]
        }

Make sure your Discord app is running and then run the main.py

python3 main.py

Example

I have included the example provided inside the Example Folder, that you can run if you fill it in by recreating the app, which involves

  1. making an app with the name "Sword Art Online"
  2. adding the "default" and "green" assets
  3. editing the visualizer section as shown above
  4. placing the client ID inside the main.py script.

Finally run python3 main.py

Roadmap

See the open issues for a list of proposed features (and known issues).

Contributing

Contributions are what make the open source community such an amazing place to be learn, inspire, and create. Any contributions you make are greatly appreciated.

  1. Fork the Project
  2. Create your Feature Branch (git checkout -b feature/AmazingFeature)
  3. Commit your Changes (git commit -m 'Add some AmazingFeature')
  4. Push to the Branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request