Created
September 23, 2018 19:50
-
-
Save nea89o/65679b1fa38bda42292eb0a4375e995a to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { Client as RPCClient } from 'discord-rpc'; | |
const client = new RPCClient({ transport: 'ipc' }); | |
const scopes = ['rpc', 'rpc.api', 'messages.read']; | |
const clientId = '312256871174111233'; | |
client.on('ready', () => { | |
console.log('Logged in as', client.application.name); | |
console.log('Authed for user', client.user.username); | |
// client.selectVoiceChannel('493422153002254337'); | |
}); | |
client.on('error', console.error) | |
client.login({ clientId, scopes }).catch(console.error); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment