-
Notifications
You must be signed in to change notification settings - Fork 1
/
index.js
60 lines (48 loc) · 1.76 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
console.log(`
# ## # # ####
# # # ## ## # #
# # # # ## # # #
# ###### # # # #
# # # # # # #
###### # # # # ####
`)
const { Client, Intents, Collection } = require("discord.js"),
{ token, prefix, color, ownerId } = require("./settings.json"),
client = new Client( { intents: [ Intents.FLAGS.GUILDS, Intents.FLAGS.GUILD_MEMBERS, Intents.FLAGS.GUILD_MESSAGES, Intents.FLAGS.GUILD_PRESENCES ] })
client.prefix_commands = new Collection();
client.slash_commands = new Collection();
client.aliases = new Collection();
client.settings = { prefix, color, ownerId }
for(let handler of ["slash_command", "prefix_command", "event"]) require(`./handlers/${handler}`)(client);
const keepalive = require("./lamo.js")
const asitroStatus = [
`Made By Asitro Development `,
`lamo Bot`,
`${prefix}help`,
`${client.users.cache.size} users`
]
client.on('ready', () => {
console.log(`${client.user.tag} is now online!`)
setInterval(() => {
client.user.setPresence({ activities: [{ name: asitroStatus[Math.floor(Math.random() * asitroStatus.length)] }], status: 'idle', type: "WATCHING" })
}, 5000)
})
client.on('message', async message => {
try {
if (message.mentions.has(client.user.id) && !message.content.includes("@everyone") && !message.content.includes("@here")) {
message.channel.send(`\nMy prefix for \`${message.guild.name}\` is \`${prefix}\` Type \`${prefix}help\` for help`);
}
} catch {
return;
};
});
console.log(`
# ## # # ####
# # # ## ## # #
# # # # ## # # #
# ###### # # # #
# # # # # # #
###### # # # # ####
`)
keepalive();
client.login(token)