.dL JonesTown
.dL JonesTown
Explore posts from servers
DIAdiscord.js - Imagine an app
Created by .dL JonesTown on 11/10/2023 in #djs-questions
RPC help
I want to only run this on my bot and no one else how can i got about that
const DiscordRPC = require('discord-rpc');

const ID = '';

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

DiscordRPC.register(ID);

async function activity() {
if (!RPC) return

RPC.setActivity({
details: 'RPC DETAILS',
state: 'RPC STATE'
})
}

RPC.on('ready', async () => {
console.log("RPC STARTED");
activity();

setInterval(() => {
activity();
}, 100000000)
})

RPC.login({ clientId: ID});
const DiscordRPC = require('discord-rpc');

const ID = '';

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

DiscordRPC.register(ID);

async function activity() {
if (!RPC) return

RPC.setActivity({
details: 'RPC DETAILS',
state: 'RPC STATE'
})
}

RPC.on('ready', async () => {
console.log("RPC STARTED");
activity();

setInterval(() => {
activity();
}, 100000000)
})

RPC.login({ clientId: ID});
2 replies