Compare commits

..

11 commits
0.1 ... main

Author SHA1 Message Date
Zoey 7ec4392c31
Update README.md
god
2022-01-08 11:30:28 +01:00
Zoey f50e2840a9 Delete diablo.gif 2022-01-08 11:25:04 +01:00
Zoey eb80c3869d Merge branch 'main' of https://github.com/SuperZoops/D3RPC 2022-01-08 11:24:35 +01:00
Zoey 6af35a55bb Dropping pyinstaller
can't get the background image to compile at all, if anybody knows how to do that, feel free to make a pull
2022-01-08 11:24:30 +01:00
Zoey 63b3c1e31b
Arch btw
It's not a great idea to use pip on Arch Linux, as most packages are provided by either normal repos or AUR.
2022-01-08 10:16:28 +01:00
Zoey c556fbcc94 Update d3rpc.py
fixed a python 3.10 app icon related bug
2022-01-08 10:10:28 +01:00
Zoey 6b11f3f502
Update README.md 2021-04-28 23:47:02 +02:00
Zoey 5139287b85
Update README.md 2021-04-24 16:23:33 +02:00
Zoey 9ee35b4770
Update README.md 2021-04-24 16:22:18 +02:00
Zoey b26dc5ff59
Update README.md 2021-04-24 00:51:46 +02:00
Zoey 8731612cc6
Update README.md 2021-04-24 00:50:42 +02:00
2 changed files with 36 additions and 14 deletions

View file

@ -4,22 +4,37 @@ 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. 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. APIs are a hassle. Feel free to fork though.
Installation # Library Dependencies
you need python3 installed until I compile this into an executable **pip (Linux, Mac, Windows)**
modules >- pip install tkinter
pip install tkinter >- pip install pypresence
pip install pypresence
download **Arch Linux**
the main branch source code and extract it to some folder (It's not a great idea to mix in pip packages on Arch as nearly everything is on the AUR or normal repos already.)
running it >- pacman -S tk
open terminal in that folder, or cd into it and run python3 ./d3rpc.py >- yay -S python-pypresence
Feel free to add me on Discord or DM me here. # Running
SailorZoop#9082
>- 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
Thanks to Commando950 for helping me with the dictionary and connection check. 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,14 +1,20 @@
#
from pypresence import Presence from pypresence import Presence
from pypresence import Client from pypresence import Client
from tkinter import * from tkinter import *
import time import time
import os
time = time.time() time = time.time()
client_id = '835127760849993798' #Discord client ID client_id = '835127760849993798' #Discord client ID
RPC = Presence(client_id) RPC = Presence(client_id)
Connected = False Connected = False
#stupid bg fix
scriptpath = os.path.abspath(__file__)
scriptdir = os.path.dirname(scriptpath)
imagepath = os.path.join(scriptdir, "diablo.png")
#Classes #Classes
ClassList = [ ClassList = [
'--Select--', '--Select--',
@ -102,7 +108,7 @@ ActivityList = [
win = Tk() win = Tk()
win.geometry('200x400') win.geometry('200x400')
win.resizable(False, False) win.resizable(False, False)
win.iconbitmap('d3rpc.ico') #win.iconbitmap(default='d3rpc.ico')
win.title('D3RPC - The dumb manual Diablo 3 rich presence.') win.title('D3RPC - The dumb manual Diablo 3 rich presence.')
can = Canvas(win, bg='#21252B', height=400, width=200) #21252B dark #282C34 light can = Canvas(win, bg='#21252B', height=400, width=200) #21252B dark #282C34 light
can.place(relx=0.5, rely=0.5, anchor=CENTER) can.place(relx=0.5, rely=0.5, anchor=CENTER)
@ -119,7 +125,8 @@ chosenGenderFemale.set(PortraitListFemale[1])
chosenGenderMale = StringVar() chosenGenderMale = StringVar()
chosenGenderMale.set(PortraitListMale[1]) chosenGenderMale.set(PortraitListMale[1])
bgdiablo = PhotoImage(file='diablo.png')
bgdiablo = PhotoImage(file=imagepath)
labelDiablo = Label(win, image=bgdiablo) labelDiablo = Label(win, image=bgdiablo)
labelDiablo.place(relx=0.5, rely=0.5, anchor=CENTER) labelDiablo.place(relx=0.5, rely=0.5, anchor=CENTER)