-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathapp.js
More file actions
24 lines (21 loc) · 1.09 KB
/
app.js
File metadata and controls
24 lines (21 loc) · 1.09 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
const DiscordRPC = require('discord-rpc');
const client = new DiscordRPC.Client({ transport: 'ipc' });
require('dotenv').config(); // This is for .env
(async () => {
client.on('ready', async () => {
await client.setActivity({
buttons: [
{ label: "Test", url: "URL_LINK"}, // (OPTIONAL) Button 1
{ label: "Test2", url: "URL_LINK2"} // (OPTIONAL) Button 2
], // Buttons & URLs ()
details: "Description", // Description
largeImageKey: "lmk", // (OPTIONAL) Asset ID
largeImageText: "Testy Test.", // (OPTIONAL) When you hover your mouse over the image
smallImageKey: "starairlines", // (OPTIONAL) The small Image to the bottom right of your large
smallImageText: "Smol Testy Test.", // (OPTIONAL) Small Image Text
startTimestamp: 79 // (OPTIONAL) Elapsed Time
}).catch(err => console.log(err));
console.log("Abadima's Rich Presence Active.");
});
await client.login({ clientId: process.env.applicationID }).catch(console.error);
})();