#archive-rpc-help
21942 messages · Page 2 of 22
then yeah the user has the freedom to go over 24 hours
but we are talking about countdown here
the game sets the countdown
meanwhile the elapse is the users session
in a match etc
I wish your game didnt have to be whitelisted or i would have made it work with csgo
goodluck trying to attach RPC to CSGO exe 😃
idk how you would make it work with CSGO unless you make like a external launcher
and hook it up with CSGO using pointers
in c++
Fetch my steam profile every minute lul
yeah but that would just get elapse time
nothing else
and if it goes on diong that
you can do that easily
steam literally has a API for getting profiles
and its live
¯_(ツ)_/¯
but it won't give you the information you would require really
like map name
scores
etc
hmm thinks about making Facebook Criminal Case to Electron with RPC 
tbh I bet that wouldn't even work

wut
what did you steal now? 😄
me and some friends planning on making a IO game
and
like the main part im doing really
is making it all based on discord
so imma remove that enter your name here
and replace it with a oauth 2 discord login
so I can get the users profile pic and Name
use it as their user in game
and gonna hook it up with RPC
Nice
to make the spectate and join feature allowed
where join would allow the user to join the same session
and spectate would
I'm just waiting RPC to kinda open up outside f'ing game studios 😄
spectate
to hook it up with Streaming stuff
like OBS etc 😃 would make it more interesting to see active stream ad on RP style
discords streamkit uses rpc
Am I right by saying that most people don't have an authorized game and won't be able to have invite or spectate?
Invite and spectate features need to be reviewed by discord
Ofc
on my side the example rpc (by devsnek) is no longer working { Error: connect ENOENT \\?\pipe\discord-ipc-0 at Object.exports._errnoException (util.js:1050:11) at exports._exceptionWithHostPort (util.js:1073:20) at PipeConnectWrap.afterConnect [as oncomplete] (net.js:1097:14) code: 'ENOENT', errno: 'ENOENT', syscall: 'connect', address: '\\\\?\\pipe\\discord-ipc-0' } any idea why ? (it worked 5 hours ago)
internet

how can i set rich presence for my bot? xD
u dont
the richpresence endpoint isn't enabled for bots
gg, that's it
you can't use it with bots
oh...
and how can i use it for me?
then

user account != bot account
ik
but how
🤦
shit, misread your message
apply for rpc on discord, then read client docs 
you need to have gamebridge dont you?
yeah
No
I don't have it
And I'm booping sadness
you don't need gamebridge at all to use rich presence @ancient anchor
o?
do you need to apply for anything
no
No
Although
if you are going to make it for a game
@hoary sundial https://image.viction.co.uk/qPhKN mean
i assume they will enforce that rule later on
there is no rules nor regulations
right now concerning RPC
that has been publicly released

so therefore you are free to use it
I would if electron installed
REEEEEEEEEEEEEEEE
oh and forgot to say
@ancient anchor RPC is free to use but some of the features you need to apply for really
although Rich Presence is free to use
Ah
So just displaying random shit would be allowed for me to use
Mhm
Oh
ok ill wait 30 mins for electron
For more information about RPC refer to
ty
https://image.viction.co.uk/UeH1m does it take a while to actually set?
Should I be able to see it on an alt
How does discord-rpc work without a user ID or login token?
its working with a client id
Isn't that the client ID of the rich presence application?
you have to make an app, not a bot user
and use that ID
I'm asking how it alters data on my own account without having my account even being referenced.
tbf I wonder aswell
Actually, it doesn't yet.
I can't get it to work.
I cant either
😢
@carmine mica hey could you just confirm that your example is still working there might have been an update or something but your example isn't working

I am really confused.
Does this thing have any documentation?
yea because its not a d.js thing
its an extra thing
ik
from Gus
I just wanted to set a custom rich presence and show it off to my friends. 😢
me too but it wont work
wow
complaining like that won't help you at all
lmao
im kidding
Got anything that will help?
patience

¯_(ツ)_/¯
I'll go work on something else for now, I guess. 👋
(Tag me if a solution presents itself (or just don't).)
how does one rpc
thats why i ask
Look at the title names
@smoky scroll
Sam don't supposed you know why it wont work for Yukine and I
Rich presence != RPC
and you need to add it
as a game
in settings
@ancient anchor
Uh okay 2secs
Oh!
Wow!
omg it actually does work
That's such an obvious and easy solution!

Does that mean that you need to have the script running on your computer and you can't set a custom rich presence from an external server?
How do I change where it says RPC?
that's the point of RPC
That would be the app name @ancient anchor
It would be nice if I could do it from an external server.
that's why you set your own app name
Oh i c
@solid pasture this is made for SDK
for games
So it woulden't be really a thing at all
if you set it via a selfbot tho you can
but you are risking a ban
and I don't condone doing that at all
Where do I set the app name? in the settings
No, I'm not. It's legal. It's allowed. It's not discouraged.
Because that doesnt seem to work
Discord developers
Selfbot aren't allowed
its in the api TOS
Where on this planet did you get that information?
from the admins them selfs
and the docs?
It literally says that
Abusing self-bots aren't allowed! Self-bots are totally allowed.
They aren't
please don't spread false information
If they wanted them not to be allowed, they could just disable them.
They can't
..
No, they couldn't. Never mind. Ignore that.
That's how
xD
You do realize
for you to login using
Discord itself
is using the API right?
Please use one or two messages per sentence.
Well please don't spread false information
that could cause another fellow user to get banned
Anyway, I already read the entire TOS, and it says literally nothing about self-bots or custom rich presences, and we have a screenshot in #archive-offtopic of an email from a developer saying that custom rich presences are okay.
@meager thorn Where can I set the app name? Is that what its set as in settings?
OOOOOOOO
My bad
@solid pasture as I stated
Rich presence != selfbot
you can set rich presence using a selfbot tho
but I don't condone it
I never stated that the usage of rich presence isnt allowed
I've only ever heard that using self-bots to read other people's messages is disallowed.
Selfbot in general
isn't allowed
no matter what it does
this is why RPC exists
Unlike the normal OAuth2 flow, bot accounts have full access to all API routes without using bearer tokens, and can connect to the Real Time Gateway. Automating normal user accounts (generally called "self-bots") outside of the OAuth2/bot API is forbidden, and can result in an account termination if found.
source
It says that automating user accounts outside of the bot API is forbidden.
Also...
Does the content of that screenshot say that you'll be banned for it?
Literally does
It seems it's not a very official stance, because different staff members have different opinions on the matter.
Every developer says that
you aren't even in Discord API
you don't see literally most of the time what they say
.-.
"Every developer says that"
Look at that date

Why would that matter?
you do realize TOS change right
?
...but, today, I read it, and there's nothing there!
Either way, I'll just stop using my convenient self-bot for whatever strange and mysterious reason for the fact that there apparently are at least two moderators out there who would ban for it.
By the way, @meager thorn, what's up with this?
Because most things you do in selfbots
aren't using oauth2 nor bot api
How do I set watching with RPC
that's a selfbot
dont recommend you doing that
Can I atleast set somethign after playing
What are they using then?
so its not just bare after it
?
idk what you mean
How it literally just says
"Playing"
Nothing after it
for me it just says
No mine
oh
thats because its rich presence
Lucario is using a selfbot
Oh
How did he tie them together tho
You don't
selfbot != RPC
and if you want to risk a ban
go google it
So he just launched a selfbot along side?
cuz I ain't personally telling you
she*
no
she is using selfbot to set richpresence
im so confused rn lol
Sure I'll go with it
Just stick with RPC
unless you want to risk getting a account termination
if so
then look at how selfbots work
¯_(ツ)_/¯
tbf my account is of no value
Yeah I know how selfbots work, but I thought rich presence wasn't in d.js
its not
you have to do it yourself
o
look at how discord wants the payload to be send
and
yeah
thats how
Wait. What is most used to run a self-bot?
the discord api itself
this client has a way of connecting
and such
Isn't that...the OAuth2/bot API?
not all
setPresence in
the thingy
clients
isnt the oauth2/bot api
What about complete sentences?
What about you deal with it
?
I cannot understand what you're saying.
If you are gonna complain then google yourself
Go look at the source of how setPresence works
@solid pasture another way of understanding this
Did you realize there is a setEmail and a setPassword method
why would a bot need them?
does oauth2/bot api mention them?
Uh...
Why is the Discord.js library endorsing discouraged practice?
¯_(ツ)_/¯

It's not just discord.js
its literally all the libs
That's strange, if it really is not allowed.
Also, setPassword sounds like a horrible idea for a library feature, discouraged or not. 👀
he has it there so if you are building your own discord client
and its a feature really that he can add
👌
I can understand your part tho
they should of worded it in a better way
the way they said it was kinda not understandable
so
¯_(ツ)_/¯
@solid pasture but you have to provide your previous password 
You use an authentication token to log into a self-bot, not a password.
That's how
discord logins tho
when you login to discord
it returns back a token and thats how you login
it just has your email & password linked to your token
^
@tall wasp example works fine
i love how we're talking about rpc
hey guys
Putting your raw password into any script in general is just not a good idea.
selfbots aren't allowed in any context
stop talking about it here
this channel is for rpc
byeeeee
👍
such a useful gus
gus what happened to google bot (respond in general, i only sent this here cause i didnt wanna ping you and i know this is the only channel you look at)
i get pinged in any channel
if you say my name
oh im sorry
didnt even answer the original question
oof
Yo! I got it working! \o/
That was definitely worth 7 hours of my time. 
Why am I the only person who can see this?
Maybe discord app hasn't sent it out
So restart discord
And then the app
I've tried that several times now.
It actually was working earlier, so I'm really confused.
See what?
...my rich presence.
Your presence showed earlier for me, now it actually doesn't
Yeah, I know.
I don't know what I changed to break it.
Looking at the network log, it does actually seem to be sending the data to Discord.
OH!
WOW!
I figured it out!
It was so obvious! 
I had partyMax set lower than partySize.
rpc.login(clientID) means i have to put in my user id?
Or token.
your app client id
I have a little question: Is it allowed now for public User Accounts to set Rich Presences?
Yes.
I'm getting an error when i try to run the example. https://my.mixtape.moe/yevqlb.png
Does anyone know how to fix that?
update node maybe
I do right now
@grim quest as long as the content of the RP isnt breaking ToS or Community Guidelines its ok
Maybe it's because Node Version 3
Lol
you have node 6.11
but ok
Oh
npm --v says 3
nvm
I'm updating it rn
thats npm
Oh ok
Still getting an error, but it says that electron isn't installed correctly. I'm going to reinstall those packages.
It takes a while if bad internet
Run it with --verbose to see download progress
Make an application
Not with a user, just make an app and take the client id
wait does it actually not work if you have a bot account on the app?
Doesn't work with an application.
It doesn't return an error, but the rich presence isn't there.
My Application has got a bot user
Idk @crisp yacht but it doesn't show it when I have a user
I said don't have a user lol
Oh, i retry with an application that doesn't have a user.
Gus
Unknown Error? 
(that pings him)
Why does it return a DeprecationWarning when trying to connect to a bot without a user?
Should i post an issue on Github?
@scarlet aspen Read the github
?
Read the github issue you made
Works now.
Question:
I tried this:
const startTimestamp = new Date();
rpc.setActivity({
details: `Test`,
state: `Test`,
startTimestamp,
partyId: 'test',
partySize: 1,
partyMax: 1,
instance: true,
});
Why does it say
(node:412) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 4): Error: child "activity" fails because [child "timestamps" fails because [child "start" fails because ["start" must be a number]]]
now?
Date.now()
Then it won't count
You need an end
Or for a timer
Well, I got the thing from GitHub:
rpc.setActivity({
details: `booped ${boops} times`,
state: 'in slither party',
startTimestamp,
largeImageKey: 'snek_large',
largeImageText: 'tea is delicious',
smallImageKey: 'snek_small',
smallImageText: 'i am my own pillows',
partyId: 'snek_party',
partySize: 1,
partyMax: 1,
matchSecret: hash('match'),
joinSecret: hash('join'),
spectateSecret: hash('spectate'),
instance: true,
});
Lemme check docs
Are you using your own app?
App ID
I made an App and used the ID
It's just the startTimestamp. Nothing else.
Well then you can't do parties
You can't do parties and joining and stuff without and authed game
Is git required for rpc?
no
@grim quest maybe you should read
startTimestamp
that's perfectly valid, as long as it's defined
which it seems like it is
idk if he defined it
Yeah
because it says time isnt a number
Go to hastebin paste your code
and let me see whats wrong
and you have the latest version of the discord-rpc right?
@grim quest
k ig
The only problem is using your own game
As you don't have parties allowed
It would work fine
in the advanced rich presence when they mean by
allow join and allow spectate
is for public use
for everyone
thats why the whitelist exists
so lets say if I have specate and join mode on
and I publicly released it
others wont have that button
You need to be authed
only the owner and whitelisted people would
No
I have literally tried it
Lool
and not just me
even SNEK did
He has an authed app
welp still
I tried it myself
want me to put my rich presence on with the join and spectate mode on?
As I stated
You can
this is for public use for everyone
this is why the whitelist exists
So what is that for
Oh
Want me to rephrase it again?
I still don't get it
k I got an idea wait
lets say I'm overwatch
right?
If you try to join a non-public game what happens
And you aren't whitelisted
nononon
Does it allow it?
thats not how it works ok so
IF the user
has the game first
the JOIN and SPECTATE button will be able to be used
and then after that
for me as a user too
to have that JOIN and SPECTATOR button
I need to be whitelisted
UNLESS
he went to authorized apps
and allowed the join and spectate button
Oh
lemme open my rich presence real quick with the join and spectate button
wrong version wait
For those to work you'd need a listener on the user's side to open the game and spectate
Am I right?
k
look at my game now
I have the join and spectate button right?
@woven fiber
Yh, disabled
I thought that was just cus of party size
disabled cuz u dont have the game
Soz
its alright fam
Yh
Does the game developer need to program something in on the other end to open the app tho and make it detected
yeah
Where's the docs for that?
Look at his example
rpc.subscribe('ACTIVITY_JOIN', (req) => {
console.log('should join', req);
});
rpc.subscribe('ACTIVITY_SPECTATE', (req) => {
console.log('should spectate', req);
});
rpc.subscribe('ACTIVITY_JOIN_REQUEST', (req) => {
console.log('join request', req);
});
But that is on the other end
this is on everyones end
who ever has this game
needs to have these
he isnt forced to
So they need a background process?
thats IF they want to actually use it
no
you see take it as if it was steam
you know how in steam I can right click a friend
and join game?
Ys
take it as that but its built-in the game
discord is telling the game
yo
some peep wants to join
wanna accept or deny?
if accept then it will let the player join the game
or depends on how the developer sets it up
So they need a background listener to open up the game?
to open up that game
Yes
discord konws the game exe
k so
Ah
lemme give u a example of this actually wait
And it calls it with some params after the acception
it says game not detected
right?
Yes
yeah because discord doesn't have the game in its game sections
So does it open up the exe and call it with some params such as spectate or play and the party id
yes
Noice
So it's in the added games bit, with the exe
its all inside the exe
I know
I mean to check if the game is detected it has to be in added games
With the name of the exe file
if its a non-verified game then yes
If verified?
it would automatically detect it
and if launched it would say
Playing blahblahblah
So you wouldn't need to open up the game
I wasn't talking about that
take this for example
Soz
destiny 2 is a verified game
Yes
if i launch it
it knows automatically
then im playing it
and I didn't even add it
discord added it itself
I'm not talking 'bout that
What I mean is that it just has a list of games you play and the exe, sorry for the confusion
I GTG
Thx so much
np
ye
Discord knows where to execute the game exactly
342 verbose stack Error: No git binary found in $PATH
343 verbose cwd C:\Users\Clashi\Desktop\Clashi SB\drpc
344 verbose Windows_NT 10.0.15063
345 verbose argv "C:\Program Files\nodejs\node.exe" "C:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js" "install"
346 verbose node v9.2.0
347 verbose npm v5.5.1
348 error code ENOGIT
349 error No git binary found in $PATH
350 error Failed using git.
350 error Please check if you have git installed and in your PATH.
351 verbose exit [ 1, true ]
What is this?
hm
350 error Please check if you have git installed and in your PATH.
download git?
nice selfbot
Thanks.
Well, how to check the discord-rpc version again?
what command are you running, 420
npm install
are custom rich presences bannable from discord?
no ^
So, my discord-rpc version is discord-rpc@3.0.0-beta.2 @meager thorn
the package.json prolly contains some git dependency...
so yea, you do need git, sorry
ye thats the latest
good.
@vernal sinew they aren't
as long as you dont use a selfbot to apply them
i use just the rpc folder
without token etc
then its not bannable
cool
@grim quest minda try replacing startTimestamp with
wait lemme check something before I tell u to do it
ok
Is it possible to modify the elapsed time? Like new Date() - 600000
why not just Date.now()/1000
?
Doesn't work.
Look at my rp.
elapsed time stucks at 00:00
did you do the /1000 part
no
well thats why
Date().now returns time in miliseconds
discord wants seconds
Now it works, but it's not modified.
well I kinda explained why
Oh wait.
Yes.
I understand.
Ok ok.
What did you done @scarlet aspen? Because mine isn't working
?
new Date()
Terax
Is working fine
put your code in hastebin
and send it to me
Oh it works.
Yes.
16 Hours ok
do me a fav tho
before you set it
parseInt
or Math.round( )
dont leave it like new Date().now() /1000
@scarlet aspen
What is the channel where I can post questions about straight discord.js?
@granite fractal #archive-updating-to-v13
ok
I am getting this error from the sole existence of .destroy() in my code:
(node:5364) ExperimentalWarning: The http2 module is an experimental API.
(node:5364) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): false
(node:5364) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.```
Any ideas?
hmm
i never tested destroy
¯_(ツ)_/¯
So it may or may not work, like, at all?
¯_(ツ)_/¯
rejections with false aren't too common
i'll look into it
// based on the object from
// https://github.com/discordapp/discord-rpc/blob/master/examples/send-presence
console.log('Ready, setting rich presence');
client.setActivity({
state: 'Using Main Menu.',
details: 'Available to join',
startTimestamp: Math.round((new Date()).getTime() / 1000),
endTimestamp: Math.round((new Date()).getTime() / 1000)+10,
largeImageKey: 'menus',
smallImageKey: 'icon',
partyId: 'party1234',
partySize: 1,
partyMax: 6,
matchSecret: 'xyzzy',
joinSecret: 'join',
spectateSecret: 'look',
instance: false,
});
client.subscribe('ACTIVITY_JOIN', ({ secret }) => {
console.log('Game Join Request', secret);
});
client.subscribe('ACTIVITY_SPECTATE', ({ secret }) => {
console.log('Game Spectate Request', secret);
});
});
// Log in to RPC with only client id; allows only rich presence.
// If you want to use other features you should see below for an example
// of authorization with scopes, which will still let you use rich presence
// if you are using the `ipc` transport.
client.login('');
client.destroy()```
I tried it in the ready loop as well, knowing me it's an issue my end.
uh
client.login and client.destroy are async
Hmmm. I primarily based this around your example code which has it unasnyced. RIP me for being dumb.
So, I have to put them in async funtions like on ready or what?
uh
wut
no
I've only used Async in python so I am kinda new to this.
i can't test anyway
the dev build of discord has a bug with rpc
and i don't feel like downloading stable
You use canary or whatever or is there an exclusive dev version?
If anyone has any idea it would be appreciated :)
How I can set the large image on richpresence?
I've tried with the link but nothing
You have to upload an asset to your application
@carmine mica I have the Canary version which has the RPC server on, what do you need tested? :3
I think he wants .destroy() tested
ah
It should in theory cut the connection and remove Rich Presence
Any luck?
How I can set image on rich presence? I’ve tried to upload it as assets on discord dev dashboard but nothing
oh
@worthy ginkgo upload the image in the application as large or small then use its name as the key
in RPC
@spark rain whats your problem exactly?
alrighty then sam
I made the application, what now?
uploaded an image, etc.
add it as a game
where?
Settings
oh shit idon't have that
im on canary
Pretty sure you do if you have the client
i need help
canary has that smh
I'm using canary
e.e
ill refresh client
one sec
@oblique gorge whats the problem sir
i was kidding
:>
i have no friends
im ur friend from now on
solution solved
and lately i've been feeling like i don't belong
!
ya know?
o
u need emotional support
I saved the application, uploaded a cover image + one asset (that is just random photos), and it doesnt show up in the Games
ADD IT
MANUALLY
..oh
That's why I said add ._.
it doesnt show here
lol
Did you build it as a electron app?
..oh
the fuck
doesn't have to be electron
alright
but the process must have a gui
yeah
I personally used pkg cuz
why not
¯_(ツ)_/¯
can I just run a .js process
instead of like.. an electron app
im just unsure what goes into it lol
basically
you need that js
to be a executable file
¯_(ツ)_/¯
the fuck is that url
which one
they still own it
it redirects
its just they bought electronjs.org when it got really big
"when it got really big"
like really really big
its been big for years
sam go away
pretty rude
how dare you
✊
gus has a huuuuuge penis

off-topic
i'd apprecate it if you didn't shitpost here
thx
made an electron app called memes
??
im assuming theres some code I have to put in there
but uhh.. thats why im here
C:
oook ill just use gus' code
nvm
Okay so I want to test RPC thing on another account. I have it on canary, and I'm using your example code and it works fine, but it runs on stable. I only want it to run on canary?
remove the game from ur stable
?
It won't just re-add itself?
idk tbh
idk fam this isnt working lul
i used gus' example
so basically
rpc connects to a unix socket
which is in something analogous to /tmp/discord-rpc-n
n increments
so the first client will be discord-rpc-0
second will be discord-rpc-1
my library only connects to the 0th one
because there's not much else to do
am I required to have a small asset?
all fields are optional
okay so i need to like have stable closed or something?
close the one you don't want to use
restart the one you do want to use
oh restart thats why
in that order
that i said
okay thanks ill try it
in your console you can see
k
you should see like
[RPCServer] listenting on /tmp/asdhaksjfsfagasf/discord-rpc-0
the most obnoxious part about doing rpc w/ electron (on osx) is that you have to package your app every single fucking time
no you don't
^
how do you set the title then?
did you build it?
well
you don't need to set the title
to test
it will just show up as Electron
discord doesnt detect the game though
yeah
so add it manually
???
reeeee
ok
app.setAsDefaultProtocolClient(`discord-${ClientId}`, path.join(__dirname, 'launch.sh')); also is this needed? unsure what this does
discord checks if a protocol discord-client_id:// is registered
for spectate and join and ask to join
so I don't need that unless im using that?
thats how it delects if you have the game installed
so ya
don't need that line unless you're using spectate/join/atj
alright
got it working, thanks 😉
Error: child "activity" fails because [child "timestamps" fails because [child "start" fails because ["start" must be a number]]]
if you cant tell, i have no idea what im doing
nor any idea of what this means
guspls
you have to send the timestamp as a number
what did you set it to
startTimestamp
i used your code
which code
thonk
ok guys
i fixed my client
@gritty spindle can't repro
???? wtf
can i just put a random number in there
you don't need it
o
works lul
thanks (:
just one more quick question: is the watching/listening thing considered against the ToS and cannot do it via rpc?
you'd have to do it via selfbot?
Self-bots are not allowed, but why can't you do it with discord-rpc?
Why do they exist as values if applications cannot trigger them?
because it will be implemented 

how to make user accept inv?
they get an email
check out my rp tho
Oh! By the way, @smoky scroll, I was wrong about self-bots being allowed for rich presences yesterday. The email said that rich presences without an associated game was allowed, not that using self-bots to do it was allowed. The Discord devs have explicitly and strictly stated that self-bots are not allowed. You were right and should therefore probably not be setting your presence like that. Sorry! 😬
Yeah I'm aware
Lazy to switch to rpc been busy
👍
what's rpc
See: channel description.
Do we have any docs for RPC and if so can someone shove me in the right direction plox
Read the Readme.md.
what if the readme.md reads the Read
What should the matchSecret/joinSecret/spectateSecret be a hash of, does it need salting and is there a recommended hashing type
I don't get why it would need salting
It doesn't does it, you wouldn't send any sensitive data over would you?
@woven fiber the way you encrypt it is up to you
the discord devs strongly recommend that you do
Discord js doesn't have rpc docs do they
they do
Thx
^
What should the secret be a hash of
Oh
So if you have a match id system with some data in it like map, they want it hashed so it is always the same length? Or is it for security
Cus their example used base64 (which is two way hash)
So, I have tried to gather what I can, is there any exclusive conditions to destroy? I want to run it as a console script as preferably I want it to run in the background.
because it hooks in even when the application isn't selected manually by discord
Like, now it is booted.
And it tried to destroy and nothing occured so now I have to refresh my entire discord to throw it out
hmmm. Might be BetterDiscord, considering thats whats throwing tons of errors in console
Nope
@smoky scroll Hi i wanted to know how did you do the custom rich presence thing pls idk how to do it
tf
Didn't ask you to go here to ask me again
Look at topic
And figure
Lucario is what I said about the hashing right
It isn't security is it
Do they just want the same ammount of letters every time
hmm. I got the new library (Copy and pasted latest commits from Github) and now it ends when the process ends (Or thats canary) but destroy still kills it...
As in:
(node:9532) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.```
@smoky scroll code
i bet ur doing DiscordRPC = something
wut i am not good at coding
show your code
you need to require the module
i have the module
then require it
read pls
npm install discord-rpc
smh
const { Client } = require('discord-rpc'); Like this
I think
ok i will try
but where do i put it
before you use it
i am noob
just put it before CONST RPC
ok
Where it is on mine
and change new DiscordRPC.Client to new Client
Assuming you used lavenders code
you need to change some stuff to make it work
my code is probably wrong somewhere tbh
Change { Client } to just DiscordRPC
and details isnt spelt right
u put detals
and is that an electron app
Since otherwise you wont be able to add as a game
With mine, it literally just works
Could I buy a VPS from anyone?
no
Or VPN?
no
I didn't have to add it and it's not an electron app
@smoky scroll Have you even searched on chrome, they are free
smh
xd
a said change it to
not add
can you show me your code pls
no
new Client
My code just does this
Useful links for learning JavaScript and Node:
CodeCademy online course: https://www.codecademy.com/learn/javascript
Eloquent Javascript, free book: http://eloquentjavascript.net/
Some Node:
https://nodeschool.io/
https://www.codeschool.com/courses/real-time-web-with-node-js
discord.js getting started guides:
https://discordjs.guide/#/
https://yorkaargh.gitbooks.io/discord-js-bot-guide/content/
https://www.youtube.com/channel/UCEBwAP6zmJ5-buW-Cc2FB6Q/videos
https://www.youtube.com/channel/UCLun-hgcYUgNvCCj4sIa-jA/videos
Javascript reference/docs: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference
discord.js documentation: https://discord.js.org/#!/docs/
I recommend you take a look at some of those
oh wait mine just dumped it on without me realising sneaky discord bugger
Just... go learn js
im not gonna say again
but idkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk
How dont you get that
change new DiscordRPC.Client to new Client
Just use the example code.
I literally typed that with out ``
yeah
If you are struggling and really only want to make a few memes or make your profile pretty use the examples
omg
👏
ok i see you changed your code to const DiscordRPC = require('discord-rpc')
so use
new DiscordRPC.Client
that quitting when i start it
so
it s confirmed
i am noob
what
gonna ask a french friend
smh okay
Why dont you just use the example lol
@smoky scroll ```javascript
const { Client } = require('discord-rpc');
// Rich Presence only works with IPC, and so it won't work in browser
const client = new Client({ transport: 'ipc' });
client.on('ready', () => {
// based on the object from
// https://github.com/discordapp/discord-rpc/blob/master/examples/send-presence
console.log('Ready, setting rich presence');
client.setActivity({
state: 'West of House',
details: 'Frustration Level: 0',
startTimestamp: Date.now(),
endTimestamp: Date.now() + (10 * 60e3),
largeImageKey: 'canary-large',
smallImageKey: 'ptb-small',
partyId: 'party1234',
partySize: 1,
partyMax: 6,
matchSecret: 'xyzzy',
joinSecret: 'join',
spectateSecret: 'look',
instance: false,
});
client.subscribe('ACTIVITY_JOIN', ({ secret }) => {
console.log('Game Join Request', secret);
});
client.subscribe('ACTIVITY_SPECTATE', ({ secret }) => {
console.log('Game Spectate Request', secret);
});
});
// Log in to RPC with only client id; allows only rich presence.
// If you want to use other features you should see below for an example
// of authorization with scopes, which will still let you use rich presence
// if you are using the ipc transport.
client.login('18712471923871230');```
Just use that
does that actually work?
yup
let s find out
of course you need to tinker
like with the client ID etc
But yeah, it works
yeah gonna see
Does anyone know if verified apps prioritise themselves over Rich Presence?
Uh that has nothing to do with the example..?
dont launch with debug
run normally
Hey dudes - im looking to get the skivvy on whats allowed for embedding discord chat on webapp?
nothing at all to do with rpc
Cool cool, thank you @smoky scroll
Is RPC rate limited?
yus
you can only set activity once per 15 seconds
So I can't change the status in realtime. So how would I prevent a status checking too fast?
how often do you need to set it
Not often, I just need a quick idea on how to prevent my script reading it too fast and trying to update too fast, chances are I can work it out.
wut