GithubHelp home page GithubHelp logo

mahdeensky / discordeasyrichpresence Goto Github PK

View Code? Open in Web Editor NEW
6.0 2.0 0.0 127 KB

Easy Setup of Discord Rich Presence for MacOS/Linux Users

Python 100.00%
buttons discord discord-api discord-rich-presence discord-rich-presence-with-buttons discord-rpc linux macos presence presences

discordeasyrichpresence's Introduction

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

discordeasyrichpresence's People

Contributors

mahdeensky avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

discordeasyrichpresence's Issues

Buttons

The Discord presence for buttonseems to be malfunctioning. Although the buttonicon appears, clicking on it doesn't lead to any redirection to a link as expected.
Here is a preview and the code :

image_2024-03-14_192729438

image

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.