Documentation for using the PresenceApp discord presence template.
Notice: You will need python installed on your system for this template. If you don't have python installed you can do so via their official download page
- Creating an application on the discord developer portal
- Uploading the required images onto the developer portal
- Getting the id of the application
- Downloading the template
- Installing the required packages
- Filling out the python template
- Running the app
To create an application we will have to go to the discord developer portal and create a new application by clicking New Aplication
!
Notice: The name of the application will be the title of your presence, but you can change this name any time!
Actually, having a visualization needs some preparation, so get your images ready! First go to the Rich Presence
tab and click on Art Assets
. After that, scroll down and click on Add Image
. Now select your images and name them.
Notice: Name the pictures with short and simple titles, because the name cant be changed later!
The next step on our journey to having a rich presence is getting the ID, which is essential for this to work. Getting the ID is quite simple: Click on General information
and locate the Application ID
section.
To make this easier, we will clone the repository using git. In your command prompt window (or python shell) write:
Notice: locate your desired install location using cd folder
or starting the command prompt in that location
git clone https://github.com/LarssJakobsons/Discord-rich-presence-python
If you don't have git installed you can download a compressed zip file of the repository via pressing the green code
button and pressing Download Zip
.
Then you can unzip the files in your operating system to the destinated folder of choice.
After it has created the folder in your desired install location, run the following command in the downloaded folder (shell or cmd)
pip install -r requirements.txt
Everything you need in this template should be installed, and you should be ready to go without any extra commands being run or files being downloaded.
We've finally got to the juice and bones of this tutorial: Filling out the template! This goes as following: After locating the presenceapp.py
file and opening it in the codebase editor of your choice fill out the according values:
client_id = your app id
start = the start of your presence (if left without end, will show as "elapsed")
end = the "remaining" time of your presence (will show as "<time> remaining").
You can input when you want this ending time to be (in seconds)
large_image = the name that you gave in the developer portal of the image you want to show up as the main image of your presence.
large_text = text that shows upon hovering above the large image.
small_image = the name that you gave in the developer portal of the image you want to show up as the small icon image of your presence.
small_text = text that shows upon hovering above the small image.
details = the text that shows below the main title of your presence.
state = the text that shows below the details value of your presence.
start = the start time of your presence (shows below the presence state)
end = the "end" of your presence (replaces start if not 'None')
buttons = the buttons that appear at the bottom of your presence. For them to have an effect upon clicking input the
label of the button in the "label" section, and the url the clicker will be sent to in the "url" section.
If you want 1 or None buttons, comment/delete them. You can have up to 2 buttons in your presence.
After filling out the info and data run the rich presence with this command or by using the run
option in your codebase editor (if it has one)
python3 presenceapp.py
If you have any questions feel free to ask me on my discord server. Feel free to experiment with this and learn something new in python!