Created
September 23, 2018 18:42
-
-
Save nea89o/c7fd5fcee8861b138770ec9a5613ce88 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