-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.js
111 lines (90 loc) · 3.24 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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
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: ["683914336376455200"]
}
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!")
}
})
client.on("messageCreate", (message) => {
if (message.content == "ping"){
message.reply("pong!")
}
})
client.on("messageCreate", (message) => {
if (message.content == "!ping"){
message.reply("<@683914336376455200>")
}
})
client.on("messageCreate", (message) => {
if (message.content == "cs1asched"){
message.reply("https://cdn.discordapp.com/attachments/1018057172711653437/1064051339430219786/3cs1asched.png")
}
})
client.on("messageCreate", (message) => {
if (message.content == "is1asched"){
message.reply("https://media.discordapp.net/attachments/1008642078592471084/1034046317158215751/issched.png?width=610&height=597")
}
})
client.on("messageCreate", (message) => {
if (message.content == "it1asched"){
message.reply("https://media.discordapp.net/attachments/1034063578333990962/1034071467832389703/BSIT_1A_NORTH.jpg?width=379&height=490")
}
})
client.on("messageCreate", (message) => {
if (message.content == "vods 1st sem"){
message.reply("https://youtube.com/playlist?list=PL-EDcGHq7b9wUdGrWmFjD7vtCxNmDePdC")
}
})
client.on("messageCreate", (message) => {
if (message.content == "vods 2nd sem"){
message.reply("https://www.youtube.com/playlist?list=PL-EDcGHq7b9w0-gjjdQKQvIiaCng388t0")
}
})
// When I started writing this, only God and I understood what I was doing
// Now, only God knows
client.on("messageCreate", (message) => {
if (message.content == "r1"){
message.reply("<@&1011206648129409107>, ${@683914336376455200} is recording...")
message.mentions.members
message.reply("<@&1011206648129409107>, <@683914336376455200> is recording...")
message.guild.members.cache.get()
}
})
// const welcomeChannelId = "1052346489017466900"
// 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)