9 |
const SpamFilter = require("./SpamFilter"); |
const SpamFilter = require("./SpamFilter"); |
10 |
const server = require("./server"); |
const server = require("./server"); |
11 |
const AntiRaid = require("./AntiRaid"); |
const AntiRaid = require("./AntiRaid"); |
12 |
|
const MessageFilter = require("./MessageFilter"); |
13 |
|
const { random } = require("../commands/pixabay"); |
14 |
|
|
15 |
class App { |
class App { |
16 |
constructor(rootdir) { |
constructor(rootdir) { |
37 |
this.logger = new Logger(); |
this.logger = new Logger(); |
38 |
this.spamFilter = new SpamFilter(); |
this.spamFilter = new SpamFilter(); |
39 |
this.antiRaid = new AntiRaid(); |
this.antiRaid = new AntiRaid(); |
40 |
|
this.messageFilter = new MessageFilter(); |
41 |
this.boot(); |
this.boot(); |
42 |
} |
} |
43 |
|
|
44 |
boot() { |
boot() { |
45 |
this.on('ready', () => { |
this.on('ready', () => { |
46 |
console.log("Logged in as " + this.client.user.tag); |
console.log("Logged in as " + this.client.user.tag); |
47 |
|
|
48 |
|
this.client.user.setStatus(random(['dnd', 'idle'])); |
49 |
|
this.client.user.setActivity("over the server", { type: "WATCHING" }); |
50 |
|
|
51 |
server(); |
server(); |
52 |
}); |
}); |
53 |
|
|
58 |
|
|
59 |
await (this.msg = message); |
await (this.msg = message); |
60 |
|
|
61 |
//await this.spamFilter.start(message); |
await this.spamFilter.start(message); |
62 |
|
await this.messageFilter.start(message, this.commandManager); |
63 |
|
|
64 |
await this.commandManager.setMessage(message); |
await this.commandManager.setMessage(message); |
65 |
|
|