Nitrogenous Polymorphic Molecule

    discord-rpc
    DefinitelyTyped icon, indicating that this package has TypeScript declarations provided by the separate @types/discord-rpc package

    4.0.1 • Public • Published

    Discord server NPM version NPM downloads Dependencies

    NPM info

    Discord.js RPC Extension

    Documentation

    Rich Presence Example

    Browser Example

    const clientId = '287406016902594560';
    const scopes = ['rpc', 'rpc.api', 'messages.read'];
    
    const client = new RPC.Client({ transport: 'websocket' });
    
    client.on('ready', () => {
      console.log('Logged in as', client.application.name);
      console.log('Authed for user', client.user.username);
    
      client.selectVoiceChannel('81384788862181376');
    });
    
    // Log in to RPC with client id
    client.login({ clientId, scopes });

    Install

    npm i discord-rpc

    DownloadsWeekly Downloads

    12,834

    Version

    4.0.1

    License

    MIT

    Unpacked Size

    94.5 kB

    Total Files

    14

    Last publish

    Collaborators

    • snek