-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.js
47 lines (39 loc) · 1.25 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
const Discord = require("discord.js")
const { Player } = require("discord-player")
const playdl = require("play-dl")
const { DiscordTogether } = require("discord-together")
require("dotenv").config()
const client = new Discord.Client({
partials: ["CHANNEL"],
intents: [
"GUILDS",
"GUILD_MESSAGES",
"GUILD_MEMBERS",
"GUILD_VOICE_STATES",
"DIRECT_MESSAGES",
],
})
let bot = {
client,
prefix: "ay.",
owners: "465403883469012992",
}
client.player = new Player(client)
client.playdl = playdl
client.discordTogether = new DiscordTogether(client)
client.commands = new Discord.Collection()
client.events = new Discord.Collection()
client.slashcommands = new Discord.Collection()
client.buttons = new Discord.Collection()
client.loadEvents = (bot, reload) => require("./handlers/events")(bot, reload)
client.loadCommands = (bot, reload) =>
require("./handlers/commands")(bot, reload)
client.loadSlashCommands = (bot, reload) =>
require("./handlers/slashcommands")(bot, reload)
client.loadButtons = (bot, reload) => require("./handlers/buttons")(bot, reload)
client.loadEvents(bot, false)
client.loadCommands(bot, false)
client.loadSlashCommands(bot, false)
client.loadButtons(bot, false)
module.exports = bot
client.login(process.env.TOKEN)