Answers for "discord rpc js"

1

discord rpc js

const clientId = 'your bot/client id here';
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('put your voice channel id here');
});

// Log in to RPC with client id
client.login({ clientId, scopes });

// Make your bot here https://discord.com/developers/applications
// Use my previos grepper code snippets to set up your discord bot
Posted by: Guest on October-08-2021

Code answers related to "Javascript"

Browse Popular Code Answers by Language