#Discord custom rpc

19 messages · Page 1 of 1 (latest)

austere peak
#
from pypresence import Presence
import time

client_id = 1179602644495515719
RPC = Presence(client_id)

RPC.connect()

RPC.update(
  state = '',
  large_image = 'icon',
  buttons = [{"label":"", "url":""}]
)

while True:
  time.sleep(60)
#

I get an error, but i don't understand how i'm supposed to fix it.
btw, the url won't get posted.

Traceback (most recent call last):
  File "/Users/*****/Desktop/rpc.py", line 9, in <module>
    RPC.update(
  File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/pypresence/presence.py", line 36, in update
    return self.loop.run_until_complete(self.read_output())
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/asyncio/base_events.py", line 653, in run_until_complete
    return future.result()
           ^^^^^^^^^^^^^^^
  File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/pypresence/baseclient.py", line 88, in read_output
    raise ServerError(payload["data"]["message"])
pypresence.exceptions.ServerError: Child "activity" fails because child "buttons" fails because "buttons" at position 0 fails because child "url" fails because "url" must be a valid uri
austere peak
#

its a discord server

#

invite link

#

its valid

#

@harsh otter

#

that's why i can't fix it?

#

so i cant use discord server invite links?

#

?

#

hu

#

ik

#

i just removed everything

#

just for the posting

#

that's the url

#

but

#

ohhh

#

ty

#

kk

#

tytyty