Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- const { Client } = require('discord-rpc');
- const clientId = '949816401114329118';
- const clientSecret = 'c2CSyGIZg1zNr6wltDhXvnyymRmAiyjN';
- const scopes = ['rpc'];
- const client = new Client({ transport: 'ipc' })
- const startTimestamp = Date.now();
- client.on('ready', () => {
- console.log('Logged in as', client.application.name);
- console.log('Authed for user', client.user.username);
- });
- // Log in to RPC with client id
- client.login({ clientId, scopes, clientSecret, redirectUri: 'https://google.com' }).catch(console.log);
- client.on('ready', () => {
- setActivity();
- })
- async function setActivity() {
- client.setActivity({
- startTimestamp,
- largeImageKey: 'hypixel',
- buttons: [
- {
- label: 'Play Here!',
- url: 'https://www.youtube.com/watch?v=dQw4w9WgXcQ'
- }
- ]
- });
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement