-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconfig.js
35 lines (27 loc) · 835 Bytes
/
config.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
const { Client, Intents } = require("discord.js");
const fs = require("fs");
const { Poru } = require("poru");
const { Spotify } = require("poru-spotify");
require("dotenv").config();
const config = require("./config.json");
const { clientID, clientSecret } = config.spotify;
const nodes = config.nodes;
const PoruOptions = {
library: "discord.js",
defaultPlatform: "ytsearch",
plugins: [new Spotify({ clientID, clientSecret })]
};
const client = new Client({
intents: [
Intents.FLAGS.GUILDS,
Intents.FLAGS.GUILD_MESSAGES,
Intents.FLAGS.GUILD_VOICE_STATES,
],
});
client.commands = new Map();
const token = config.botToken;
const prefix = config.prefix;
const ownerID = config.ownerID;
client.login(token);
client.poru = new Poru(client, nodes, PoruOptions);
module.exports = { client, prefix, ownerID };