Closed TheClashFruit closed 3 years ago
Most likely you are using scopes you don't have permission to use.
My Code: (There is no scopes)
const clientID = '';
DiscordRPC.register(clientID);
const rpc = new DiscordRPC.Client({ transport: 'ipc' });
const startTimestamp = new Date();
const endTimestamp = startTimestamp + 1000;
function setStatus() {
rpc.updatePresence({
state: 'Status',
details: 'Something',
startTimestamp,
endTimestamp,
largeImageKey: 'icon',
instance: true
});
}
rpc.on('ready', () => {
setStatus();
});
rpc.login({ clientID }).catch(console.error);
My guess is you're not authorized to use the IPC transport as it's invite-only.
The issue tracker is only for bug reports and enhancement suggestions. If you have a question, please ask it in the Discord server instead of opening an issue – you will get redirected there anyway.
Shouldn't you be using setActivity
? I don't tihnk updatePresence
is a function: https://github.com/discordjs/RPC/blob/master/src/client.js#L480
Also, isn't IPC transport accessible to anyone? I thought only websocket is invite-only.