#archive-rpc-help

21942 messages · Page 3 of 22

carmine mica

cool

just don't set it more than once per 15 seconds

woven fiber

Snek is the hashing supposed 2 be 2 way and not for security, just so they always get it in the same format

spark rain

Will it just error and continue or will it error and crash or wut Snek

carmine mica

silently fail

i've asked them to make it error

but it probably won't happen

spark rain

So I can just keep on looping it and it really won't make a difference.

woven fiber

Snek, what is the point of the hashing. Is it just so they always get the same ammount of chars in a good format

carmine mica

who said anything about hashing

woven fiber

Me ages ago

What is the point of the hashing, this is obviously base64

Is it

raw holly

Spectate and join is for whitelisting only anyway

woven fiber

I know

raw holly

So it won't be useful for 90% of the people here

woven fiber

Ofc

But my question is what is the point of the hash, and should it be the hash of the match id

carmine mica

it should be whatever is relevent to you

woven fiber

Why do they want is hashed tho

spark rain

So by checking the file every run in a forever loop to dump to RPC I won't be missing anything

solid pasture

I was wondering the same thing.

woven fiber

Miroware

About Lavender or me

craggy boughBOT
solid pasture

There's no "c" and "Miro", and I was referring to what you said.

woven fiber

Oops

I was thinking of another guy on discord while typing it sorry

carmine mica

@spark rain fixed that this.socket.close error

spark rain

huh, I found that by using the new commits (Up to the one you just did) closing the window worked.

woven fiber

SNEK do you know why they want it to be hashed

spark rain

Can someone tell me how I would make newlines in RPC statuses?

I tried \n to no avail

ancient anchor

the same u would in any string??

o

spark rain

I got this

details: 'Map: ' + items[2] + '\n Server IP: ' + items[0] + ':' + items[4],

making this ugly mess

Like, unless I am missing something beginner here.

@ancient anchor

solid pasture

You're not supposed to use line breaks in those messages, just as you're not supposed to use line breaks in your game playing status.

spark rain

Ah ok.

So there is 0 way of doing it.

solid pasture

Yes.

spark rain

So I guess I will dump the map in the tool tip for the large image

solid pasture

shug

ancient anchor

@solid pasture [ ุ ] copy chars inside the [ ]

there is 2 chars

solid pasture

Huh?

ancient anchor

its an invis character

smoky scroll

Is a RPC always on, or do u need like a console to run it?

carmine mica

if the client is open

its running

smoky scroll

client? discord client?

ancient anchor

rpc client

solid pasture

It's an app that you have to keep open to keep your rich presence.

carmine mica

discord client

solid pasture

...both.

You need both the app and Discord open on the same device for it to work.

stray flicker

@spark rain tf2 yay

meager thorn

@spark rain What you can do is that you put the images of the map as the largeImage and map name as the largeImageText

¯_(ツ)_/¯

uncut sapphire

I'd like to thank Snek for the amazong thing he has done with rpc

Good person you

ancient anchor

WaitWhat

uncut sapphire

Yes

uncut sapphire

So is it normal for RP to take forever to notice I closed the app?

meager thorn

Shoulden't really

prob something in discords end

uncut sapphire

Maybe. Also great timing thinking I should look here

But man it just sits and sits when I close it

spark rain

@meager thorn yeah that was how I was gonna approach it

proud loom

Excuse me, I have a doubt, does the RPC server emits messages reactions events?

I'm not able to find anything in the discord official docs but a subscription to the MESSAGE_UPDATE event, which doesn't returns the reactions data

carmine mica

there is no event for that

proud loom

oh, thanks Gus xD

carmine mica

mhm

proud loom

I was looking for it, I was about to do some tests to check

if the message update event might contain some "non-documented" data

astral gull

Hi

ancient anchor

not rpc related

nor lib related

astral gull

oh

ancient anchor

?tcd

pure onyxBOT

🔗 The Coding Den: Have a general node.js question? Need some Javascript help? Or even programming in another language? The Coding Den is exactly the place you need to be.
http://discord.gg/code

astral gull

Thanks...

ancient anchor

No problem...

scarlet aspen

is rpc a lib? Thonk

ancient anchor

thats why i said seperate things

smh

scarlet aspen

omg your domains

ancient anchor

omg!

:^)

carmine mica

?

ancient anchor

@scarlet aspen seems to like my domains so why not

sorry lol

carmine mica

can you guys stop shitposting

in this channel

thanks

ancient anchor

oh kay

scarlet aspen

does rpc really mean remote procedure calls?

ancient anchor

no he lied

yes, it does

scarlet aspen

i thought that means rich presence client

ancient anchor

¯_(ツ)_/¯

carmine mica

it means remote prodecure call

snow wedge

Dang

Cant use rpc

Is there a way to use rich presence without owning a game?

wanton spoke

bro i answered you in general

strange spade

So will there be any way to like set the specific rpc gateway, so I can make it run on the 2nd instance of discord not first?
kinda want to show VS code info on my main and test on dev

carmine mica

i was considering that

but decided not to

no good way to define it

strange spade

aww okay

steady sparrow

What does instance do?

proud loom
steady sparrow

Ah, right

smoky scroll

is there docs for discord-rpc ?

carmine mica

ya

smoky scroll

like what methods and objects I have access to

besides the exaple

carmine mica
blissful pumice

how to initalise client with discord-rpc and commando since both of them initalise client with require

carmine mica

you can't use commando with rpc

blissful pumice

ugh

smoky scroll

thx gus

carmine mica

do you know what rpc is

smoky scroll

yeah

carmine mica

i'm thinking no

blissful pumice

yea

carmine mica

no not you

mqke

blissful pumice

yea ik

carmine mica

what made you think commando would work with rpc

thonk

scarlet aspen

Rich Presence Client Remote Procedure Calls

blissful pumice

rich presence

oh

forget me then

smoky scroll

so it can use either IPC or WS huh

carmine mica

ya

but you won't be able to use websocket

smoky scroll

any reason why?

carmine mica

you need to register origins

and only whitelisted people can do that

smoky scroll

ah

oh I can use OAuth to authorise the app aswell

neat

carmine mica

you'll need to be whitelisted to use anything except rich presence

smoky scroll

damn

carmine mica
blissful pumice

so rpc is rich presence right?

carmine mica

no

blissful pumice

ok

scarlet aspen

Read Channel Topic.

carmine mica

rpc is remote procedure calls

rich presence is a part of discord's rpc

blissful pumice

yea when look up i saw it xD

is it ok if i run 2 bot, one for normal discord bots and another for rpc?

proud loom

RPC is a call to an application functionality, in this case made through a local websocket in the PC a Discord client is running, it's mostly used to receive and transmit events between the client and the application

there's no use-case of the RPC in a bot

craggy boughBOT
smoky scroll

I wonder

@carmine mica does discord-rpc allow connecting to other RPC clients on the network

low cape

no it's local

smoky scroll

also

idk if it's already in but what about if I have multiple RPC servers

like multiple discord clients

carmine mica

gg4u I guess

smoky scroll

kek

also gus one more thing

it seems that when calling destroy the presence does not reset

not until you kill the entire task

raw holly

yea

can you somehow reset the presence completely?

or is that just not a thing

pastel sphinx

just remove the game maybe ?

in discord

raw holly

uh

thats not really an option here

lofty lodge

the maxer dude made a disposable client in thier extension to reset the presence lul

raw holly

well im not saying this isnt the way to go

im just asking out of curiosity if its even possible

lofty lodge

If you mean is it possible in the realm of discord-rpc? possible? (havent looked into it myself)

But how else would other games etc reset the presence on quitting the game

raw holly

quitting isnt the issue

im talking about purposefully resetting it

to nothing

while being connected

craggy boughBOT
carmine mica

@smoky scroll @raw holly that's intended behavior on discord's part

I can't control it

smoky scroll

wait what

it's meant to not reset the presence on disconnect?

carmine mica

correct

smoky scroll

huh

carmine mica

¯_(ツ)_/¯

smoky scroll

so only killing the task resets it

carmine mica

Chris said they would probably add a clear presence thing

maybe sending null will clean it

not sure

smoky scroll

tried sending {}

carmine mica

nah

smoky scroll

it clears only the rich part

carmine mica

onya

that makes sense

what more do you want

smoky scroll

a full clear

carmine mica

discord always does "playing xyz" by if the process is focused

that has nothing to do with rp

smoky scroll

ah

raw holly

kk

thx

carmine mica

check if sending null and undefined work

I think it would throw an error

I can't look at my code rn tho

smoky scroll

turn it up

carmine mica

ya that's what I expected

smoky scroll

thonk

carmine mica

simple fix

four characters

craggy boughBOT
proud loom

Gus, I was wondering about what the guy asked earlier (how to reset the rich presence), what does happen if certain application is disconnected from the RPC server (likely an unhandled application error). Perhaps when a client is disconnected from the RPC server the rich presence resets, this shouldn't be this way, but could work as a workaround (I'm just guessing, I have no idea if this could actually work)

craggy boughBOT
smoky scroll

can my account get deleted if I set rich presence even though it's not a game?

carmine mica

no

thats allowed

smoky scroll

thx

onyx walrus

Hi, is there any way to connect with websocket without gamebridge?

carmine mica

nope

carmine mica

@unborn edge this

unborn edge

hi

what

carmine mica

rpc

read channel topic

unborn edge

ok

smoky scroll

Why is using scope=identify%20rpc%20rpc.api resulting in error=invalid_scope? I made the app, so I should be on the whitelist?

inland tinsel
  • instead of %20 maybe
carmine mica

no

@smoky scroll you need to be on the whitelist

to use rpc.api and rpc

all you can do is use rich presence

smoky scroll

What scopes are needed for Rich Presence?

carmine mica

none

just do client.login('client id')

don't send a secret

there's an example

smoky scroll

ok thanks

So is there a way to use this v whitelist to allow setting Rich Presence with OAuth2?

For invited people.

carmine mica

you don't need to oauth

smoky scroll

Why is this not working?

const DiscordRPC = require("discord-rpc");

const CLIENT_ID = "---";
const CLIENT_SECRET = "Nope";

DiscordRPC.register(CLIENT_ID);

const rpc = new DiscordRPC.Client({transport: "ipc"});
const startTimestamp = new Date();

async function setActivity() {
  if (!rpc) return;

  rpc.setActivity({
    details: `Testing`,
    state: 'ABC123',
    startTimestamp,
    largeImageKey: 'galactic_icon_large',
    largeImageText: 'Thinking...',
    smallImageKey: 'galactic_icon_small',
    smallImageText: 'Will this work?',
    instance: false
  });
}

rpc.on('ready', () => {
  setActivity();
  setInterval(() => {
    setActivity();
  }, 15000);
});

rpc.login(CLIENT_ID).catch(console.error);
ancient anchor

client.register

Not the entire module

smoky scroll
const rpc = new DiscordRPC.Client({transport: "ipc"});
rpc.register(CLIENT_ID);
carmine mica

its on the root

you're just not updated

i don't think those changes are on npm yet

smoky scroll

I'm making a web game, would I need to put Rich Presence code on the client or server?

quick wagon

can you do rich presence with web games Thonkang

smoky scroll

Browserify can convert node modules to Javascript, but I have no idea if the protocol will still work.

All RPC does is send something to a port on localhost, right?

Would the C++ SDK work with Emscripten?

it may work from the browser

carmine mica

nope

@smoky scroll it would not work

smoky scroll

I mean discord-rpc

carmine mica

it uses ipc

you can't do ipc through the browser

smoky scroll

the C++ one will definetly not work

carmine mica

none of it will work

you would have to get whitelisted by discord and use ws

smoky scroll

thonk

I wonder if they accept applications from solo devs

So is there currently no way to use Rich Presence from a web game?

carmine mica

not unless you're whitelisted

smoky scroll

Would the Tester invites work?

no

that's a different thing

Is there an OAuth2 thing to set Rich Presence?

carmine mica

as i keep saying

no

smoky scroll

rip

looks like I will have to allow players to share party links via bot commands

carmine mica

there's an invite thing

looks like this

@smoky scroll

you get a panel like this

smoky scroll

ok

Doesn't that need Rich Presence though?

carmine mica

yes

waitWhat

smoky scroll

what

smoky scroll

waitwhat

vale tundra

Is there a way to use instead of Playing?

ike instead of playing we could do watching

carmine mica

nope

blissful pumice

do i have to install electron to run the rich presence example in doc?

carmine mica

just clone the repo

and do npm i

then npm run example

blissful pumice

ty @carmine mica

btw is it even possible to put rich presence to a bot? @blissful pumice

@carmine mica

carmine mica

no

blissful pumice

it would be great but ty anyways

ancient anchor

Tell discord that

covert siren

Is it undocumented?

ancient anchor

?docs client.setActivity rpc

Cry

Okay it isn't even documented?? Gus fix

covert siren

I am not talking about discord-rpc lib

ancient anchor

Because it's a method on the client, which sends the payload

For example message.channel.send isn't on discord developers, because it's a method in the lib which sends the payload to d api

covert siren

I looked at the source code of discord-rpc and saw it was sending {cmd: SET_ACTIVITY} as far as I understood... Just wanted to understand how it worked under the hood 😄

ancient anchor

Ah okay

carmine mica

@AbsoluteZero#0296 discord's docs can be out of date, don't sweat it

covert siren

I see. Thanks for the info

craggy boughBOT
craggy boughBOT
gritty spindle

do you need to be on canary to use rpc

carmine mica

no

quasi oracle

what's this id and why shouldn't it be changed Thonk

smoky scroll

you provide the application id that the assets belong to

you only dont change it if you want the example to work

because the assets belong to that id

quasi oracle

what are assets and how come they belong to an id

smoky scroll

when you make a bot account, you are given the option to enable rich presence & add assets

quasi oracle

:o

smoky scroll

its the same client id there

if discord would load i could provide pictures

have this lovely loading picture instead

quasi oracle
smoky scroll

yeah right there. you add those images in there. and those assets belong to the client id declared at the top

quasi oracle

and what are the assets for? Thonk technically just pictures used for displaying rich presence?

smoky scroll

yeah just to show rich presence stuff. like you might have a picture for every world youre in a game,a nd a small asset for the character youre playing

as ive seen in some game presences

quasi oracle

can one automate asset uploading

smoky scroll

i dont think so, after watchign requests i dont see a way to imitate it

err

actually

no you probably can

quasi oracle

so if I have like, 100 pictures to upload, I'd have to do it by hand?

lol

smoky scroll

https://discordapp.com/api/oauth2/applications/id/assets

post request there

quasi oracle

oh nice

smoky scroll

my b, its 4 am

cut me some slack

LOL

quasi oracle

thank bella

go get some sleep

smoky scroll

bloblul

np, good luck with it

quasi oracle

how does one unset rich presence? 👀

ancient anchor

Close the app which is running it

vernal sinew

can i use it on linux?

quasi oracle

uh, sure?

you can use it on anything that runs node lol

ancient anchor

No because you can't add it as a game, if it's not even on localhost

smoky scroll

four characters

code bank

carmine mica

?

proud loom

I might be lost, I don't understand what the non-legible username said xD

smoky scroll

I don't either

quick wagon

"osama is here"

tribal estuary

🤔

carmine mica

what os are you on

i try to build the socket path by doing uh

const prefix = env.XDG_RUNTIME_DIR || env.TMPDIR || env.TMP || env.TEMP || '/tmp';
return `${prefix.replace(/\/$/, '')}/discord-ipc-0`;

which should be the same thing discord does

can you open your discord client console and search for "rpc"

you should see something like this

tribal estuary

currently on linux

but uh one sec

carmine mica

linux isn't very specific

distro plz

tribal estuary

raspbian

carmine mica

debian

ok

wait you're running discord on your rpi?

that must be pretty slow lol

tribal estuary

i've always run my bot on my pi o;

carmine mica

rpc runs on the same computer as your discord client

like the discord app

tribal estuary

that's probably the problem

i was just tryina get a richpres set up on my bot 🤔

smoky scroll

luhmao

bots dont get rich presence

tribal estuary

🤔

mmm that may also be a thing then

smoky scroll

..

tribal estuary

LMAO

smoky scroll

its an undisputable fact taht bots cant have rich presence

theres no maybe

tribal estuary

hhmmmm, so i would actually have to run it on my computer instead of keeping it over on my rpi, then?

smoky scroll

yes it has to run where your discord client runs

tribal estuary

righty, that got it working

👍

smoky scroll

👌🏻

carmine mica

👍🏻

tribal estuary

also probably a second dumb question but, when i change the client ID to my other applications, its destroys all

smoky scroll

you have to use the client id that has the assets you want

if you change it without changing the assets it wont work

tribal estuary

yuppers, made sure i had assets set up

smoky scroll

imma guess u copied the wrong id then or something, or used wrong asset names

it works a-ok for me

tribal estuary

oh, nevermind it just started working

smoky scroll

oh ok

carmine mica

oh ok

tribal estuary

might've been because it takes a few mins for new applications to register or whatever good stuff they do

was using an existing application to test and just made a new one

proud loom

Is there an use case for a game library (like Steam) within RPC server or has to be game spesific?

carmine mica

er

i dunno

proud loom

I was wondering about this because if steamworks does implements something like that, every game using their matchmaking API could be accessible from discord and does not has to be writen once per application

carmine mica

if you're using the native discord-rpc impl

made by discord

it would probs look like uh

handlers.onJoinRequest = [=](DiscordJoinRequest req) {
  JoinLobby(req.secret);
};

i dunno

proud loom

I see, I'm going to propose this in the steamworks forums

carmine mica

huh

oh

¯_(ツ)_/¯

do it

proud loom

xD

carmine mica

DO IT BITCH

NO BALLS U WONT

proud loom

lul xD

I wasn't sure if this was possible with the current RPC protocol, I guess this will require a more permissive RPC protocol xD

carmine mica

¯_(ツ)_/¯

proud loom

to make it easier for game developers

carmine mica

lead the way in amazing game stuff foffs

i beli🇧 in u

smoky scroll

foffs is godlike

carmine mica

dat ass is godlike

mmLol

proud loom

tail*

smoky scroll

foffs feelsamazingman

carmine mica
smoky scroll

do it no balls

proud loom

wait, do I have to pay 100 U$D to post an idea to steamworks? Thonkang

urban sinew
smoky scroll

@urban sinew u can't

the RPC server is only part of the Discord desktop app

and it's only for users

urban sinew

oohh ok, didnt know that

thanks :)

craggy boughBOT
solid pasture

Thonk

craggy boughBOT
quasi oracle

how does one set the listening to presence Thonk

carmine mica

one sends type 2 on a bot account

urban sinew

does anyone know if discord plans to allow Bot accounts to use RPC?

snow ocean

what's the point though

rich presence is for games and bots cant play games

pastel sphinx

and game was for users when playing

and bots use it

so why not ?

listening, streaming, all this was for users but we can make it for bots

snow ocean

you can only display info for one person

holy shit someone actually addressed me by my name

urban sinew

same thing reseqo said

we use the activity status as a utility tool to communicate info to the users

same way in which the RPC could be utilized to communicate info to the users.

snow ocean

advertising?

urban sinew

communicating/displaying just any info

respectfully, I didnt ask what RPC is for (I know what it is for, its for users to show what games they're playing and to display rich data around that), Im just asking if anyone knows if discord staff have made any comment on bots being able to use it in the future

long glacier

Hey

snow ocean

im pretty sure theyre against it

the general consensus is that bots arent going to be allowed to use it

urban sinew

oo okay ty

snow ocean

sorry for the indirect answer

smoky scroll

Is custom rich presence against tos?

Ok

Thanks

quasi oracle

no liek

I know how it works for the regular presence

but I've seen people with rich presence that said listening to

Thonk

carmine mica

ya they are using selfbots

thats against tos

quasi oracle

pls banne bobby

carmine mica

rpc only allows Playing

smoky scroll

MmmYea

turbid lava

Hey, so as of around yesterday, none of my RPC stuff is able to detect my client anymore.

VS Code, Spotify, etc

I get this error:

    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' }```
carmine mica

is your client open

turbid lava

three different clients

stable, canary, ptb

carmine mica

i see

i think i know the issue

restart the one you want to connect to

turbid lava

done

ayy nice boop the snek works

"have you tried turning it off and on again" facepalm

maybe...

quasi oracle

i love that game

would pay for it

gus where to donate

proud loom

I've just realized it was done within the node library xD

craggy boughBOT
smoky scroll

so rich presence is allowed if you are not using a selfbot?

*custom rich presence

solid pasture

...something...something...learn JavaScript. shug

craggy boughBOT
craggy boughBOT
craggy boughBOT
turbid lava

so it seems like only I can see my rich presence

do I have to get it approved or something?

raw holly

? Wut

turbid lava

nobody other than me can see my rich presence

they only see the name of the game

carmine mica

your app is named spotify

turbid lava

that's all they can see

carmine mica

thats no bueno

you have to name it something else

raw holly

What Gus said

turbid lava

ah, so it's the name triggering a filter?

carmine mica

also discord is about to release an official spoitify integration

you might just wanna wait

turbid lava

THINKING alright then

I'll keep my eye out for that

carmine mica

there is a spotify rpc i made

made with a friend

turbid lava

👌

mucho gracias

carmine mica

muchas*

turbid lava

muchas gracias

hallow kestrel

Hi, i was wondering if that would work using foobar instead of spotify? 🤔

wanton spoke

sure.just.make.it.work

plush pumice

did.you.lose.your.space.key?

carmine mica

?

olive parcel

Does appellation use the rpc for his vsc rich presence?

carmine mica

ads

banned

smoky scroll

come at me AngryArthur

plush pumice

Banhammer

formal skiff

In order to use RPC do we have to register or something

smoky scroll

register?

formal skiff

or can we just node the files and get started

smoky scroll

yes

working example comes with the repo

formal skiff

oh nice

peak lodge
smoky scroll

Think gus already made one

carmine mica

ya i did

hecking

smoky scroll

Oh heck

formal skiff

I can't install electron Thonk

smoky scroll

Are you doing it on your computer over vps

As in not on your vps

formal skiff

I don't have a vps Thonk

smoky scroll

Well I'm just asking cuz it should work fine if you're on your pc

formal skiff

just goes to node install.js and stays there

it's been 30 mins

wanton spoke

npm i -g electron

npm run example

languid saffron
const DiscordRPC = require("discord-rpc");

const ClientId = 'censored';

DiscordRPC.register(ClientId);

const rpc = new DiscordRPC.Client({ transport: 'ipc' });

rpc.on('ready', () => {
  console.log("ready");
  rpc.setActivity({
    details: `test`,
    state: 'test',
    startTimestamp: new Date(),
    // largeImageKey: 'test',
    // largeImageText: 'test',
    // smallImageKey: 'test',
    // smallImageText: 'test',
    instance: false,
  });
});

rpc.login(ClientId).catch(console.error);

what am I doing wrong?

and where do I put the oauth2 token?

carmine mica

update to latest node

languid saffron

how

carmine mica

and you dont need any oauth2 tokens

languid saffron

is 6.11.311.3 new enough

steady sparrow

I don't think that's even close

carmine mica

thats not a node version

tall wasp

latest node.js LTS is 8.9.1

languid saffron

ok

tall wasp

latest node.js is 9.2 iirc but you should just go with LTS tbh

carmine mica
smoky scroll

Is using discord rpc to set a custom status alllowed, or can you get banned from discord for using it

custom status being like, editing code etc

fallen hemlock

It is allowed.

smoky scroll

Ok

smoky scroll

I’m confused, what Id do we put for client.login

when I put my own it says invalid

quick wagon

thonk

you're supposed to put a token

smoky scroll

Your own token ?

how is it allowed then

carmine mica

no

no

quick wagon

oh shit

carmine mica

you put a client id

quick wagon
smoky scroll

i put my client id

quick wagon

nvm ignoreme

smoky scroll

it said invalid

quick wagon

xd

carmine mica

client.login('some client id')

smoky scroll

I got a error code 4000 with a message invalid client id

i put my own

carmine mica

then your client id is invalid

smoky scroll

how is my own client id invalid

if it’s invalid then what do I put

@carmine mica im getting the logged in log so thats working, but after that i get a "Unknown error"

quasi oracle

just fyi

you don’t use literally your accounts id

you need to make an application on the dev platform

enable rpc on it

and use its client id

@smoky scroll

olive parcel

How do you enable rpc on it?

Do you mean rich presence?

undone loom

I have a problem getting the rpc on node/npm

anyone help?

raw holly

just like

describe your problem?

instead of asking if anyone can help

undone loom

yeah, sorry.

I am doing npm i discord-rpc

and ill show logs if okay?

raw holly

if its the peer dependencies

yes

thats normal

undone loom

where should I send the logs?

its the git piece of shit

raw holly

so you dont have git installed?

undone loom

I have the git bash and scuh

such*

raw holly

well

make a screenshot of the error then

undone loom

I have the error in my clipboard on text from the cmd, if I can send it to DM's or anything?

raw holly

why a dm

just post it in here

undone loom

well, sure

raw holly

if its too long go to hastebin

undone loom

npm WARN optional SKIPPING OPTIONAL DEPENDENCY: register-scheme@github:devsnek/node-register-scheme (node_modules\discord-rpc\node_modules\register-scheme):
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: No git binary found in $PATH

npm ERR! code ENOGIT
npm ERR! No git binary found in $PATH
npm ERR!
npm ERR! Failed using git.
npm ERR! Please check if you have git installed and in your PATH.

npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\memes\AppData\Roaming\npm-cache_logs\2017-11-29T13_01_33_110Z-debug.log

raw holly

yea

git isnt in your path

or installed

undone loom

so how do i get it in my path and which git should I get?

raw holly

is this windows

undone loom

yes

raw holly
undone loom

I have that

raw holly

you surely dont have it installed correctly

so do it again

undone loom

which path should I have it on?

raw holly

it adds itself to path automatically

undone loom

I currently have it on my D: partition, because of shits on this pc

raw holly

that doesnt matter

undone loom

done

so, what now?

raw holly

you open a new shell

and go again

undone loom

so I open a git bash, and do npm i discord-rpc?

raw holly

it doesnt have to be git bash

whatever terminal you use

undone loom

well, I get command not found -.-

raw holly

command not found what

undone loom

bash: npm: command not found

raw holly

do you like

even remotely know what you are doing

npm just worked in your error above

and now you tell me it doesnt

undone loom

I tried it in the Git CMD

raw holly

im asking again

do you even remotely know what you are doing

undone loom

i 50/50 know what I am doing.

raw holly

then how about

you use the npm command

in the terminal

you used earlier

where it worked

undone loom

Same shit happened, git thing

raw holly

ok

since this has nothing to do with me anymore now or this server or rpc

you go and google

"how to add git to path"

and edcuate yourself a little bit

or go to

?tcd

pure onyxBOT

🔗 The Coding Den: Have a general node.js question? Need some Javascript help? Or even programming in another language? The Coding Den is exactly the place you need to be.
http://discord.gg/code

raw holly

and ask for advice on not having git in path

undone loom

okay I found out and I am an idiot.

I need basically admin privileges, which I dont have on this PC since this is a school PC.

So I can't proceed.

tall wasp

wat

olive parcel

@pure onyx A D V E R T I S I N G

tall wasp

why defuq do you have a school pc without admin and try to develope an rpc app on that WaitWhat

undone loom

oh wait, I figured a way around

olive parcel

@undone loom Replace sticky keys with cmd

Then start sticky keys when ur not logged in

cmd with admin privs

tall wasp

people using school pcs to develope that is strange

i mean

just why

undone loom

i know

tall wasp

....

undone loom

i am trying something xd

tall wasp

what is shit xd

undone loom

I MADE IT WORK!

tall wasp

still not rpc related

undone loom

i know

tall wasp

then dont write in here

undone loom

I mean

tall wasp

WaitWhat

undone loom

I got RPC into here

I mean

fuck

tall wasp

its still not related

smoky scroll

The fuck did I just read

meager thorn

Someone trying to npm discord-rpc using git bash instead of actual cmd

And asking why it's not working

smoky scroll

NotLikeThis

tall wasp

Same

craggy boughBOT
ancient anchor

no

u

carmine mica

?

ancient anchor

!

yeah stop shitposting

smoky scroll

can u actually stop

ancient anchor

im sorry

smoky scroll

I’m getting a error

carmine mica

what error

smoky scroll

<rejected> Error: Unknown Error

carmine mica

thats a pretty cool error

smoky scroll

Hm

carmine mica

i'll need to know more

or i can't help you

smoky scroll

one sec lemme login on my pv

pc

ill tag u when I’m ready

@carmine mica https://hastebin.com/elobipegud.coffeescript

  <rejected> Error: Unknown Error
    at RPCClient._onRpcMessage (C:\Users\dab\node_modules\discord-rpc\src\Client.js:156:16)
    at emitOne (events.js:115:13)
    at IPCTransport.emit (events.js:210:7)
carmine mica

thats from the client then

smoky scroll

well yea

its happening when i set the activity

carmine mica

no i mean

thats from the discord client

smoky scroll

is there a way to fix it?

carmine mica

do you get it every time

smoky scroll

what you mean everytime

everytime i load the script?

carmine mica

whenever it happens

does it happen consistently

smoky scroll

yes

carmine mica

cool

open discord console

watch console as you run it

you should see something useful

smoky scroll

ok

carmine mica

look for Socket Emit and Socket Message

from [RPCServer:IPC]

smoky scroll

@carmine mica got it

what do I do now

carmine mica

show me it

screenshot or smth

smoky scroll

Got it working @carmine mica also for like large image key and stuff what can we put, can we put like a image url

carmine mica

no

can i see the actual error object

what was triggering it

etc

@smoky scroll

smoky scroll

@carmine mica the large and small image was occurring the unknown err

carmine mica

wdym

invalid keys?

smoky scroll

i copied it from your code on the examp,e

so most likely

but I can’t seem to set the name, it’s just saying streamkit overlay

carmine mica

hwhat

you're using test/sk.js?

smoky scroll

Yea

carmine mica

no

don't use that

smoky scroll

Oh

What do I use

craggy boughBOT
carmine mica

@smoky scroll try the folder called example

tests and examples are not the same thing

smoky scroll

why electron tho

carmine mica

because thats what the example is

smoky scroll

the image is causing the error @carmine mica

when I remove all the stuff with the image it works fine

carmine mica

can you just show me the object it sends

(╯°□°)╯︵ ┻━┻

smoky scroll

which object

cosmic skiff

is using rich precents API Abuse?

carmine mica

the error

no

cosmic skiff

b1nzy wont ban me :-)?

smoky scroll

the only error I’m getting is a error on the get request to /assets 404

@carmine mica

carmine mica

no I meant

after that

there should be an rpc message

with an error object

smoky scroll

Checking

@carmine mica there’s no error object but if there is all I’m getting is ERROR and unknown error

just take a screenshot of that

fast pelican

@carmine mica how does discord-rpc allow for a more detailed game status/activity? Looked at discordjs and it for doesnt seem to have the same capability as discord-rpc

carmine mica

?

they aren't the same thing

fast pelican

ik

im asking how

u did it

differently

carmine mica

uhm

one is rpc

one is bot api

fast pelican

ik....

solid pasture

Well, discord.js is for accessing the Discord API, where you can control all of the online data Discord uses. On the other hand, discord-rpc is a thing you're supposed to embed into your game or program that allows users to have rich presences for said program.

carmine mica

that was a pretty meh explaination

solid pasture

shug

carmine mica

discord.js handles the discord gateway/http api

discord-rpc handles the local client rpc

proud loom

Discord.js is intended to interact with the Discord API, the Discord-RPC library is intended to interact with a local Discord client RPC server

carmine mica

foffs get rekt

proud loom

dam :c

fast pelican

@solid pasture @proud loom thank u for actually answering my question

proud loom

2fast4me

solid pasture

I tried to put it into words a someone who has never touched code before would understand. 😛

Most people just make fake "games" with it though, and set up their own personal rich presences.

carmine mica

atf

i know you hate me

but this is my lib

so you'll have to deal with me

fast pelican

👍

solid pasture

xD

fast pelican

u were a dick to me first, so if there is any hate, its justified

smoky scroll

tf didnt gus say the exact same thing, except first

carmine mica

isa

go do ur hw

plz

smoky scroll

never

carmine mica

proud loom

before he pulled a dick for some reason this situation reminds me of this quote xD

carmine mica

i'll pull your dick

proud loom

wait

wut

.>

carmine mica

💦

carmine mica

:3

lapis pollen

:3

smoky scroll

hi

formal skiff

when I try to use npm i, when it gets to electron it takes forever

should this be happening?

carmine mica

no

formal skiff

why does it then?

carmine mica

¯_(ツ)_/¯

formal skiff

that's helpful

carmine mica

i dunno

i don't support electron or npm

formal skiff

fair enough

craggy boughBOT
craggy boughBOT
craggy boughBOT
craggy boughBOT
smoky scroll

@carmine mica I gotchu fam ayy

meager thorn

That was a nice professional answer 👌

smoky scroll

can't tell if sarcasm or not Thonk

meager thorn

was being for real

smoky scroll

I can expect everything from this guild

spark rain

Does anyone know a reliable way to package RPC applications?

Because I have had no luck here.

tall wasp

define "to package"

spark rain

Like, to make ones code an EXE or to bundle Node JS with it.

tall wasp

uhh

i dont think you should do that anyways

just create a ZIP out of your files and then do with that whatever you want, when you need it again unpack it and run it as normal

spark rain

It's just that primarily I want to package it to a not very programmer orientated group (TF2 playerbase)

smoky scroll

I only know you can make batch to run the npm script don't know about compiling outside of ts

spark rain

But eh, might just my over hey-lets-make-this-easy sense kicking in and I am underestimating how intelligent the rest of the world is.

tall wasp

i know there was a project to compile node.js applications to an EXE

but i dont remember it

carmine mica

i have used electron and zeit pkg with great success

spark rain

I tried PKG and my app never closes, even when the window itself is dead, the Discord still thinks it is running

carmine mica

do you mean the rich presence stays?

that could be a discord bug

spark rain

Hmmm.

I tried in canary and it still happens, but only on PKG

it works on it's own.

carmine mica

¯_(ツ)_/¯

check for orphaned processes

i can't really support this

spark rain

Ya know what, I am just gonna go all out set it up yourself mode and since I can sort out the hardest half as an exe (The python segment) the node js part will probably be fine un packaged.

hidden hull

how would i change the "Playing" to "Listening to" or etc.?

🤔

tall wasp

Sefbots are not allowed

hidden hull

o

tall wasp

also you can change that by rpc aswell y21 iirc

smoky scroll

@hidden hull master version thinkingLol

you cannot

unless im missing something

@carmine mica

tall wasp

oh you can't?

smoky scroll

gus said you cant, not with rpc,

tall wasp

though so

well then you cant

mb porgpeek

carmine mica

you can't

unique bolt

so only bot accounts can use rpc?

smoky scroll

the opposite

thonk

unique bolt

nani?

i thought selfbots can't

smoky scroll

rpc interacts with your discord client

unique bolt

so like, a new instance of my discord client?

smoky scroll

no

like ur client picks up games, this sends info to it

unique bolt

ah

so what if i did a playing status on my client that is supported by rich presence?

smoky scroll

???????

if u use rpc its allowed

unique bolt

ah

thanks lucario!

smoky scroll

np

limpid hazel

how do I get the elapsed add the elapsed time for custom rich presense

carmine mica

send timestamps

cedar totem

Can someoen help me with rpc?

upon run I get this error

for (const [name, message] of Object.entries(Messages)) register(name, message);
                                     ^

TypeError: Object.entries is not a function```
raw holly

update to at least node 8

which is LTS now

cedar totem

ok

oh god your right actually I've not updated node in a while

thanks I will try that now

craggy boughBOT
smoky scroll

console.log("Discord.js")

@smoky scroll please take your shitposting to a non support channel

@smoky scroll

dud

i was just joking

calm

those

last kind warning to move to a different channel

quick wagon

Tl;dr gtfo

crude pollen

hey guys trying to get rich presence working

carmine mica

cool

crude pollen
module.js:487
    throw err;
    ^

Error: Cannot find module './util'
    at Function.Module._resolveFilename (module.js:485:15)
    at Function.Module._load (module.js:437:25)
    at Module.require (module.js:513:17)
    at require (internal/module.js:11:18)
    at Object.<anonymous> (/home/gibigbig/node4/spoticord/node_modules/discord-rpc/src/index.js:2:14)
    at Module._compile (module.js:569:30)
    at Object.Module._extensions..js (module.js:580:10)
    at Module.load (module.js:503:32)
    at tryModuleLoad (module.js:466:12)
    at Function.Module._load (module.js:458:3)
wanton spoke

we dont support your inability to download a script off github

carmine mica

we don't support random modules here

p.s. if you want a good spotify thing

i made one

wanton spoke

yeah but i made a better one

crude pollen

i also tried this

carmine mica

yes thats mine

wanton spoke

and the error was?

crude pollen

which says its an extension of discordjs which is why im here

ok one sec

carmine mica

what is your question

crude pollen

let me gather the info

module.js:487
    throw err;
    ^

Error: Cannot find module './util'
    at Function.Module._resolveFilename (module.js:485:15)
    at Function.Module._load (module.js:437:25)
    at Module.require (module.js:513:17)
    at require (internal/module.js:11:18)
    at Object.<anonymous> (/home/gibigbig/node_modules/discord-rpc/src/index.js:2:14)
    at Module._compile (module.js:569:30)
    at Object.Module._extensions..js (module.js:580:10)
    at Module.load (module.js:503:32)
    at tryModuleLoad (module.js:466:12)
    at Function.Module._load (module.js:458:3)
wanton spoke

thats the same error

crude pollen

same error

yeah

i install discordjs and discord-rpc

and used the example in the documentation with edits to the clientid

carmine mica

looks like an outdated version

crude pollen

i installed from git updated 12 hours ago

carmine mica

nowhere in the current codebase does ./util turn up

so you're outdated

crude pollen

ok im deleting everything and starting over

ok more or less the same thing

I tried running test/rp.js and i get this

{ Error [RPC_CONNECTION_TIMEOUT]
    at Timeout.setTimeout [as _onTimeout] (/home/gibigbig/node3/discord-rpc/src/Client.js:109:47)
    at ontimeout (timers.js:488:11)
    at tryOnTimeout (timers.js:323:5)
    at Timer.listOnTimeout (timers.js:283:5) [Symbol(code)]: 'RPC_CONNECTION_TIMEOUT' }
carmine mica

rpc runs on your computer

not a server

@crude pollen

crude pollen

Hmm so I have to install node and stuff on my pc?

I was hoping to avoid that since I have a nice environment in my server

and I just wanted to set the RP vars manually

smoky scroll

it communicates with ur discord client

so it must run on wherever ur client is ran

crude pollen

I see, thanks. so just to be clear, I need to install node on my machine, and then install discord-rpc

and then run rp.js locally?

smoky scroll

yea

crude pollen

ok trying

crude pollen

thanks guys