-
Notifications
You must be signed in to change notification settings - Fork 38
/
index.js
52 lines (45 loc) · 1.3 KB
/
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
43
44
45
46
47
48
49
50
51
52
const discord = require("discord.js");
const { Poru } = require("poru");
require("dotenv").config()
const client = new discord.Client({
messageCacheLifetime: 60,
fetchAllMembers: false,
messageCacheMaxSize: 10,
restTimeOffset: 0,
restWsBridgetimeout: 100,
allowedMentions: {
parse: ["roles", "users", "everyone"],
repliedUser: true,
},
partials: ["MESSAGE", "CHANNEL", "REACTION"],
intents: [
"GUILDS","GUILD_BANS", "GUILD_VOICE_STATES", "GUILD_MESSAGES", "GUILD_MESSAGE_REACTIONS"],
});
client.login(process.env.TOKEN).catch(e => console.log("No token provided"))
// Atreya#2401 [diwasatreya]
client.config = require("./config.json");
client.poru = new Poru(client, client.config.nodes,{
spotify:{
clientID:"cb41529dc3bd4d8f8a240dbee0fff4e8",
clientSecret:"bcca82f42930498aa385a8289fdf276b",
playlistLimit:5
},
apple:{
playlistLimit:5
}
})
// copyright 2022 @diwasatreya
client.commands = new discord.Collection();
client.aliases = new discord.Collection();
client.slash = new discord.Collection();
//now creating interaction event
['commands', 'events', 'slash', 'PoruEvent'].forEach((handler) => {
require(`./handlers/${handler}`)(client);
});
require('node:http')
.createServer((_, res) =>
res.end(
`Developed by DIWAS ATREYA `,
),
)
.listen(8080);