-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.js
42 lines (34 loc) · 925 Bytes
/
index.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
const clientId = '946791837543305247';
const RPC = require('discord-rpc')
const client = new RPC.Client({ transport: 'ipc' });
RPC.register(clientId)
async function setActivity(){
if(!client) return
client.setActivity({
details:`How to drink water`,
state:`Watching`,
startTimestamp: Date.now(),
largeImageKey:`youtube`,
largeImageText:`YouTube`,
// smallImageKey:`youtube`,
// smallImageText:`YouTube`,
instance:false,
buttons:[
{
label:`YouTube`,
url:'https://youtube.com'
},{
label:`Neoncm`,
url:`https://discord.gg/neoncm`
}
]
})
}
client.on('ready', () => {
console.log(`Logged in for ${client.user.username} `)
setActivity()
setTimeout(()=>{
setActivity()
},15000)
});
client.login({ clientId}).catch(console.error)