-
Notifications
You must be signed in to change notification settings - Fork 0
/
logs.js
47 lines (37 loc) · 1.25 KB
/
logs.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
43
44
45
46
47
const client = require('./lib/client')
client.on('ready', () => {
console.log('the client becomes ready to start')
console.log(`I am ready! Logged in as ${client.user.tag}!`)
console.log(`Bot has started, with ${client.users.cache.size} users, in ${client.channels.cache.size} channels of ${client.guilds.cache.size} guilds.`)
client.user.setActivity('popi-dev')
client.user.setStatus('Online')
client.generateInvite(['ADMINISTRATOR'])
.then(link => {
console.log(`Generated bot invite link: ${link}`)
// inviteLink = link
})
})
client.on('reconnecting', () => {
console.log('client tries to reconnect to the WebSocket')
})
client.on('resume', (replayed) => {
console.log(`whenever a WebSocket resumes, ${replayed} replays`)
})
client.on('error', (error) => {
console.error(`[ERROR] - ${error}`)
})
client.on('disconnect', (event) => {
console.log('The WebSocket has closed and will no longer attempt to reconnect')
})
client.on('warn', (info) => {
console.log(`[WARN] - ${info}`)
})
client.on('info', (info) => {
console.log(`[INFO] - ${info}`)
})
client.on('invalidated', (info) => {
console.log(`[SESSION INVALIDATED] - ${info}`)
})
client.on('ratelimit', (info) => {
console.log(`[REACHED RATE LIMIT] - ${info}`)
})