Compare commits

..

No commits in common. "main" and "0.1" have entirely different histories.
main ... 0.1

2 changed files with 14 additions and 36 deletions

View file

@ -4,37 +4,22 @@ Diablo 3 Discord Rich Presence
Quick and dirty way to get Discord's Rich Presence working with Diablo 3. You have to set everything up manually for now.
APIs are a hassle. Feel free to fork though.
# Library Dependencies
Installation
**pip (Linux, Mac, Windows)**
you need python3 installed until I compile this into an executable
>- pip install tkinter
>- pip install pypresence
modules
pip install tkinter
pip install pypresence
**Arch Linux**
(It's not a great idea to mix in pip packages on Arch as nearly everything is on the AUR or normal repos already.)
download
the main branch source code and extract it to some folder
>- pacman -S tk
>- yay -S python-pypresence
running it
open terminal in that folder, or cd into it and run python3 ./d3rpc.py
# Running
>- python3 d3rpc.py
# Things to add (Most likely won't ever happen)
>- always on top button
>- figure out how to pack the png background in executables
>- get actual blizzard's API working
>- connection status indicator
Feel free to add me on Discord or DM me here.
SailorZoop#9082
Thanks to Commando950 for helping me with the dictionary and connection check.
![image](https://user-images.githubusercontent.com/26927890/116476301-524aa700-a87b-11eb-9e22-88e109492bda.png)
![image](https://user-images.githubusercontent.com/26927890/116476391-73ab9300-a87b-11eb-8a05-58c26aa7670f.png)
![d3rpcscreenshot](https://user-images.githubusercontent.com/26927890/116476193-29c2ad00-a87b-11eb-99f3-6f8a860e4c30.png)

View file

@ -1,20 +1,14 @@
#
from pypresence import Presence
from pypresence import Client
from tkinter import *
import time
import os
time = time.time()
client_id = '835127760849993798' #Discord client ID
RPC = Presence(client_id)
Connected = False
#stupid bg fix
scriptpath = os.path.abspath(__file__)
scriptdir = os.path.dirname(scriptpath)
imagepath = os.path.join(scriptdir, "diablo.png")
#Classes
ClassList = [
'--Select--',
@ -108,7 +102,7 @@ ActivityList = [
win = Tk()
win.geometry('200x400')
win.resizable(False, False)
#win.iconbitmap(default='d3rpc.ico')
win.iconbitmap('d3rpc.ico')
win.title('D3RPC - The dumb manual Diablo 3 rich presence.')
can = Canvas(win, bg='#21252B', height=400, width=200) #21252B dark #282C34 light
can.place(relx=0.5, rely=0.5, anchor=CENTER)
@ -125,8 +119,7 @@ chosenGenderFemale.set(PortraitListFemale[1])
chosenGenderMale = StringVar()
chosenGenderMale.set(PortraitListMale[1])
bgdiablo = PhotoImage(file=imagepath)
bgdiablo = PhotoImage(file='diablo.png')
labelDiablo = Label(win, image=bgdiablo)
labelDiablo.place(relx=0.5, rely=0.5, anchor=CENTER)