mirror of
https://github.com/Benexl/FastAnime.git
synced 2026-01-06 17:53:40 -08:00
Compare commits
1 Commits
contributi
...
feature/di
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
0598be0025 |
3
viu_media/libs/discord/__init__.py
Normal file
3
viu_media/libs/discord/__init__.py
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
from .api import connect
|
||||||
|
|
||||||
|
__all__ = ["connect"]
|
||||||
13
viu_media/libs/discord/api.py
Normal file
13
viu_media/libs/discord/api.py
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
import time
|
||||||
|
|
||||||
|
from pypresence import Presence
|
||||||
|
|
||||||
|
|
||||||
|
def connect(show, episode, switch):
|
||||||
|
presence = Presence(client_id="1292070065583165512")
|
||||||
|
presence.connect()
|
||||||
|
if not switch.is_set():
|
||||||
|
presence.update(details=show, state="Watching episode " + episode)
|
||||||
|
time.sleep(10)
|
||||||
|
else:
|
||||||
|
presence.close()
|
||||||
Reference in New Issue
Block a user