body: { error: 'invalid_client' }

const e = new Error(r.status); ^ Error: 401 at D:\RPC\node_modules\discord-rpc\src\client.js:64:21 at process.processTicksAndRejections (node:internal/process/task_queues:95:5) at async RPCClient.authorize (D:\RPC\node_modules\discord-rpc\src\client.js:215:22) at async RPCClient.login (D:\RPC\node_modules\discord-rpc\src\client.js:143:21) { body: { error: 'invalid_client' } }
10 Replies
d.js toolkit
d.js toolkit2y ago
• What's your exact discord.js npm list discord.js and node node -v version? • Post the full error stack trace, not just the top part! • Show your code! • Explain what exactly your issue is. • Not a discord.js issue? Check out #useful-servers.
RichtigJoJo
RichtigJoJoOP2y ago
const DiscordRPC = require("discord-rpc")

const client = new DiscordRPC.Client({transport: "ipc"})


client.on("ready", () => {
client.setActivity({
details: "det",
state: "state",
startTimestamp: new Date(2023, 10, 24, 12)
})
})


client.login({clientId: "", scopes: ['rpc'], redirectUri: "http://127.0.0.1"})
const DiscordRPC = require("discord-rpc")

const client = new DiscordRPC.Client({transport: "ipc"})


client.on("ready", () => {
client.setActivity({
details: "det",
state: "state",
startTimestamp: new Date(2023, 10, 24, 12)
})
})


client.login({clientId: "", scopes: ['rpc'], redirectUri: "http://127.0.0.1"})
treble/luna
treble/luna2y ago
not djs related, #other-js-ts
RichtigJoJo
RichtigJoJoOP2y ago
for what is this tag?
treble/luna
treble/luna2y ago
didnt know there was a tag nor this was made by the same devs anyhow you provided an invalid id and from the looks of your code you didnt provided anything at all
RichtigJoJo
RichtigJoJoOP2y ago
I have a Application ID there
Squid
Squid2y ago
Can you try just doing cilent.login({ clientId: "id here"}) without the other options?
RichtigJoJo
RichtigJoJoOP2y ago
yes Thanks, it works but how can I make a timer until a date?
Squid
Squid2y ago
I would assume that you'd use the endTimestamp option instead of using startTimestamp
RichtigJoJo
RichtigJoJoOP2y ago
makes sense thanks
Want results from more Discord servers?
Add your server