-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Dodano discord rich presence, możliwość ustawienia sobie customowego …
…statusu, poprawiono zapisywanie danych.
- Loading branch information
1 parent
2742855
commit eb6b8a9
Showing
3 changed files
with
111 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
import time | ||
|
||
import pypresence.exceptions | ||
from pypresence import Presence | ||
|
||
discord_data = ["Menu główne", "Ładowanie..."] | ||
start_time = None | ||
|
||
|
||
try: | ||
client_ID = '1206583480771936318' | ||
RPC = Presence(client_ID) | ||
RPC.connect() | ||
start_time = time.time() | ||
except: # ojojoj niebezpiecznie | ||
pass | ||
|
||
|
||
def update_rpc(first_line, second_line): | ||
global discord_data | ||
discord_data = [first_line, second_line] | ||
|
||
|
||
def start_rpc(): | ||
while True: | ||
RPC.update(state=discord_data[1], details=discord_data[0], large_image='icon_1', large_text="Doccli - oglądaj anime bezpośrednio ze swojego terminalu!", buttons=[{"label": "GitHub", "url": "https://github.com/TowarzyszFatCat/doccli"}, {"label": "Discord Projektu", "url": "https://discord.gg/FgfSM7bSEK"}], start=start_time) | ||
time.sleep(5) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters