Closed YodaLightsabr closed 3 years ago
It's the same as ActivityOptions. Disregard, was looking at the wrong docs.
~It's the same as ActivityOptions.~ Disregard, was looking at the wrong docs.
Oops that's okay.
{
"startTimestamp": "Date.now()",
"details": "Google",
"buttons": [
{ "label": "Google1", "url": "https://google.com" },
{ "label": "Google2", "url": "https://google.com" }
]
}
that's the object I'm passing, but the buttons are not working.
- what version are you on?
- wdym "not working"?
91 does add documentation for this
Ok, so after looking at that, my buttons
property is an array of two button objects. They look like:
{ "label": "Visit Google", "url": "https://google.com" }
just like it is supposed to, but it's not working. The buttons aren't being displayed.
I am on 3.2.0 and it works for me. The arguments you pass in look right, so my guess is this:
You said you are reading from a JSON file and replacing certain fields. Are you parsing the JSON file correctly? Maybe try to console.log
the json data and use typeof
to check the data type of each field in the json. Make sure they are an array of objects, not a string
Okay I'll show you what the console.log'd data looks like
@ChingChang9 There you go ^
Have you tried fully uninstalling and reinstalling discord-rpc
? it may not have updated properly
Hm yeah it seems to be in the proper format. Check your node_modules/discord-rpc/src/client.js
. It should have buttons: args.buttons,
on line 537 if you're on 3.2.0. Otherwise, you might have not updated the package properly.
Good idea. Give me a minute.
Welp. Apparently my package.json got moved to the parent directory somehow, and when I ran npm install it said
removed 3 packages in 0.622s
so I fixed that and now it's working. Sorry for bugging the issue section about my stupid mistake.
What am I supposed to pass to the object? I have tried many different configurations, but there's no documentation about it and I keep getting errors.