V
V
Vladislav Mukhin2021-05-16 11:48:45
Python
Vladislav Mukhin, 2021-05-16 11:48:45

How to Create an Invite in Discord RPC Python Like Spotify?

How to create an invite in Discord RPC Python Like Spotify or different games?
But with the help of Python code))
Roughly speaking, like this:
60a0dc37d2553925221374.png

Answer the question

In order to leave comments, you need to log in

1 answer(s)
M
Maxim Nevzorov, 2021-05-16
@SladkayaDoza

https://pypi.org/project/pypresence/
To create an invitation, in theory, you need partyId and joinSecret:

from pypresence import Presence
p = Presence(APP_ID)
p.connect()
p.update(state="Black\N{BLACK STAR}Rock Shooter", large_image="brs", party_id="generic_party", join="some_random_hash")
# Return:
{'cmd': 'SET_ACTIVITY',
 'data': {'state': 'Black★Rock Shooter',
  'assets': {'large_image': ASSET_ID},
  'party': {'id': 'generic_party'},
  'secrets': {'join': 'some_random_hash'},
  'name': 'B★RS Project',
  'application_id': APP_ID,
  'flags': 3,
  'type': 0},
 'evt': None,
 'nonce': CUR_TIME}

8ZghdAV.png

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question