mirror of
https://gitee.com/sui-feng-cb/AzurLaneAutoScript1
synced 2026-03-09 18:39:04 +08:00
25 lines
444 B
Python
25 lines
444 B
Python
import time
|
|
from multiprocessing import Process
|
|
|
|
from pypresence import Presence
|
|
|
|
process: Process
|
|
|
|
|
|
def run():
|
|
APPLICATION_ID = "929437173764223057"
|
|
RPC = Presence(APPLICATION_ID)
|
|
RPC.connect()
|
|
RPC.update(state="Alas is playing Azurlane", start=time.time())
|
|
|
|
|
|
def init_discord_rpc():
|
|
global process
|
|
process = Process(target=run)
|
|
process.start()
|
|
|
|
|
|
def close_discord_rpc():
|
|
global process
|
|
process.terminate()
|