-
Notifications
You must be signed in to change notification settings - Fork 33
/
Copy pathexample.py
27 lines (25 loc) · 979 Bytes
/
example.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
import rpc
import time
from time import mktime
print("Demo for python-discord-rpc Adobe illustrator")
client_id = '467570845993271307' # Your application's client ID as a string. (This isn't a real client ID)
rpc_obj = rpc.DiscordIpcClient.for_platform(client_id) # Send the client ID to the rpc module
print("RPC connection successful.")
time.sleep(5)
start_time = mktime(time.localtime())
while True:
activity = {
"state": "Adobe", # anything you like
"details": "Editing", # anything you like
"timestamps": {
"start": start_time
},
"assets": {
"small_text": "Adobe", # anything you like
"small_image": "adobe", # must match the image key
"large_text": "Illustrator", # anything you like
"large_image": "illustrator" # must match the image key
}
}
rpc_obj.set_activity(activity)
time.sleep(900)