mirror of
https://github.com/Benexl/FastAnime.git
synced 2025-12-05 20:40:09 -08:00
chore: init feature branch
This commit is contained in:
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