37 lines
1.0 KiB
Python
37 lines
1.0 KiB
Python
|
import psutil
|
||
|
from pypresence import Presence
|
||
|
import time
|
||
|
|
||
|
|
||
|
def main() -> None:
|
||
|
client_id = '1149335280072020078'
|
||
|
RPC = Presence(client_id, pipe=0)
|
||
|
RPC.connect()
|
||
|
|
||
|
start_time = psutil.boot_time()
|
||
|
while True:
|
||
|
# waiting = time.time() - start_time
|
||
|
# minutes = waiting // 60
|
||
|
# hours = minutes // 60
|
||
|
# minutes = minutes % 60
|
||
|
# waiting_days = int(time.time() - start_time) // 60 // 60 // 24
|
||
|
waiting_days = int(time.time() - start_time) // 60 // 60 // 24
|
||
|
# state=f"{int(hours):02}:{int(minutes):02}:{int(waiting % 60):02}",
|
||
|
RPC.update(
|
||
|
# details=details_list[i1],
|
||
|
state=f"{waiting_days} days,",
|
||
|
large_image="superpuper",
|
||
|
large_text="This is a picture, isn't it?",
|
||
|
buttons=[{
|
||
|
"label": "This is not rickroll",
|
||
|
"url": "https://goo.su/eriA6eD"
|
||
|
}],
|
||
|
start=start_time
|
||
|
)
|
||
|
RPC.update
|
||
|
time.sleep(10)
|
||
|
|
||
|
|
||
|
if __name__ == '__main__':
|
||
|
main()
|