-
Notifications
You must be signed in to change notification settings - Fork 20
/
index.js
58 lines (45 loc) · 1.53 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
53
54
55
56
57
58
const Discord = require("discord.js")
require("dotenv").config()
// const generateImage = require("./generateImage")
const client = new Discord.Client({
intents: [
"GUILDS",
"GUILD_MESSAGES",
"GUILD_MEMBERS"
]
})
let bot = {
client,
prefix: "n.",
owners: ["315850603396071424"]
}
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.on("ready", () => {
// console.log(`Logged in as ${client.user.tag}`)
// })
// client.on("messageCreate", (message) => {
// if (message.content == "hi"){
// message.reply("Hello World!")
// }
// })
// const welcomeChannelId = "926530810008453120"
// client.on("guildMemberAdd", async (member) => {
// const img = await generateImage(member)
// member.guild.channels.cache.get(welcomeChannelId).send({
// content: `<@${member.id}> Welcome to the server!`,
// files: [img]
// })
// })
client.login(process.env.TOKEN)