-
Notifications
You must be signed in to change notification settings - Fork 18
/
index.js
39 lines (34 loc) · 1010 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
const { Client, Collection, GatewayIntentBits } = require('discord.js');
require("dotenv").config();
const { Poru } = require('poru');
const {Spotify} = require("poru-spotify");
let spotify = new Spotify({
clientID:"PUT HERE",
clientSecret:"PUT HERE"
})
const client = new Client({
failIfNotExists: true,
allowedMentions: {
parse: ['roles', 'users', 'everyone'],
repliedUser: false,
},
intents: [
GatewayIntentBits.Guilds,
GatewayIntentBits.GuildVoiceStates,
GatewayIntentBits.GuildMessages,
GatewayIntentBits.MessageContent,
],
});
client.config = require('./config.json');
client.poru = new Poru(client, client.config.nodes, {
library:"discord.js",
defaultPlatform: "ytsearch",
plugins: [spotify]
});
client.commands = new Collection();
client.aliases = new Collection();
client.slashCommands = new Collection();
['commands', 'events', 'slash', 'poruEvent'].forEach((handler) => {
require(`./handlers/${handler}`)(client);
});
client.login(process.env.TOKEN);