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});
Was this page helpful?