forked from laughing-nerd/Cowie
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.js
36 lines (30 loc) · 1.04 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
// Packages
const { Client, GatewayIntentBits, Collection } = require("discord.js"),
{ DisTube } = require("distube");
redditFetch = require("reddit-fetch");
fetch = require("node-fetch");
zello = require("zello");
// Configs & Data
const { AnimeSubreddits, AnimeNames, AnimePosts } = require("./data.json");
const Config = require("./config.json");
// Important Variables
const client = new Client({
intents: [
GatewayIntentBits.Guilds,
GatewayIntentBits.GuildMessages,
GatewayIntentBits.MessageContent,
GatewayIntentBits.GuildVoiceStates,
],
});
module.exports.distube = new DisTube(client, {
leaveOnStop: false,
emitNewSongOnly: true,
emitAddSongWhenCreatingQueue: false,
emitAddListWhenCreatingQueue: false,
nsfw: true,
});
client.commands = new Collection();
client.aliases = new Collection();
client.helpCommands = []
for (let x of ["Commands", "Events", "Distube"]) require(`./modules/handle${x}`)(client);
client.login(Config.Token || process.env.TOKEN).catch((e) => zello.error(e));