13 |
const { random } = require("../commands/pixabay"); |
const { random } = require("../commands/pixabay"); |
14 |
const AFKEngine = require("./AFKEngine"); |
const AFKEngine = require("./AFKEngine"); |
15 |
const Starboard = require("./Starboard"); |
const Starboard = require("./Starboard"); |
16 |
|
const { runTimeouts, setTimeoutv2 } = require("./setTimeout"); |
17 |
|
const autoRole = require("./AutoRole"); |
18 |
|
|
19 |
class App { |
class App { |
20 |
constructor(rootdir) { |
constructor(rootdir) { |
62 |
this.client.user.setActivity("over the server", { type: "WATCHING" }); |
this.client.user.setActivity("over the server", { type: "WATCHING" }); |
63 |
|
|
64 |
server(); |
server(); |
65 |
|
|
66 |
|
runTimeouts(); |
67 |
|
|
68 |
|
// setTimeoutv2(path.resolve(__dirname, '../queues/send.js'), 10000, "Hello world"); |
69 |
}); |
}); |
70 |
|
|
71 |
this.on('raw', async event => { |
this.on('raw', async event => { |
145 |
this.on("messageReactionAdd", async (reaction, message) => { |
this.on("messageReactionAdd", async (reaction, message) => { |
146 |
console.log('inside'); |
console.log('inside'); |
147 |
|
|
148 |
if (!reaction || !reaction.message) { |
if (!reaction || !reaction.message || !message.guild || message.channel.type == 'dm') { |
149 |
return; |
return; |
150 |
} |
} |
151 |
|
|
189 |
|
|
190 |
this.on('guildMemberAdd', async (member) => { |
this.on('guildMemberAdd', async (member) => { |
191 |
console.log('Joined'); |
console.log('Joined'); |
192 |
|
await autoRole(member, member.guild); |
193 |
await this.antiRaid.start(member); |
await this.antiRaid.start(member); |
194 |
await this.logger.logJoined(member); |
await this.logger.logJoined(member); |
195 |
}); |
}); |