12 |
import AntiRaid from '../automod/AntiRaid'; |
import AntiRaid from '../automod/AntiRaid'; |
13 |
import Starboard from '../services/Starboard'; |
import Starboard from '../services/Starboard'; |
14 |
import Server from '../api/Server'; |
import Server from '../api/Server'; |
|
import Cooldown from '../automod/Cooldown'; |
|
15 |
import StartupManager from '../services/StartupManager'; |
import StartupManager from '../services/StartupManager'; |
16 |
import AutoClear from '../automod/AutoClear'; |
import AutoClear from '../automod/AutoClear'; |
17 |
import RandomStatus from '../services/RandomStatus'; |
import RandomStatus from '../services/RandomStatus'; |
24 |
import Antijoin from '../automod/Antijoin'; |
import Antijoin from '../automod/Antijoin'; |
25 |
import Automute from '../automod/Automute'; |
import Automute from '../automod/Automute'; |
26 |
import ServiceManager from './ServiceManager'; |
import ServiceManager from './ServiceManager'; |
27 |
|
import ChannelLockManager from '../services/ChannelLockManager'; |
28 |
|
|
29 |
export default class DiscordClient extends Client { |
export default class DiscordClient extends Client { |
30 |
private _commands = new Collection<string, BaseCommand>(); |
private _commands = new Collection<string, BaseCommand>(); |
47 |
messageFilter: MessageFilter = {} as MessageFilter; |
messageFilter: MessageFilter = {} as MessageFilter; |
48 |
antiraid: AntiRaid = {} as AntiRaid; |
antiraid: AntiRaid = {} as AntiRaid; |
49 |
starboard: Starboard = {} as Starboard; |
starboard: Starboard = {} as Starboard; |
|
cooldown: Cooldown = {} as Cooldown; |
|
50 |
startupManager: StartupManager = {} as StartupManager; |
startupManager: StartupManager = {} as StartupManager; |
51 |
autoClear: AutoClear = {} as AutoClear; |
autoClear: AutoClear = {} as AutoClear; |
52 |
randomStatus: RandomStatus = {} as RandomStatus; |
randomStatus: RandomStatus = {} as RandomStatus; |
55 |
welcomer: Welcomer = {} as Welcomer; |
welcomer: Welcomer = {} as Welcomer; |
56 |
antijoin: Antijoin = {} as Antijoin; |
antijoin: Antijoin = {} as Antijoin; |
57 |
automute: Automute = {} as Automute; |
automute: Automute = {} as Automute; |
58 |
|
channelLock: ChannelLockManager = {} as ChannelLockManager; |
59 |
|
|
60 |
aliases = { |
aliases = { |
61 |
automod: path.resolve(__dirname, '..', 'automod'), |
automod: path.resolve(__dirname, '..', 'automod'), |
72 |
"@automod/MessageFilter": "messageFilter", |
"@automod/MessageFilter": "messageFilter", |
73 |
"@automod/AntiRaid": "antiraid", |
"@automod/AntiRaid": "antiraid", |
74 |
"@services/Starboard": "starboard", |
"@services/Starboard": "starboard", |
|
"@automod/Cooldown": "cooldown", |
|
75 |
"@services/StartupManager": "startupManager", |
"@services/StartupManager": "startupManager", |
76 |
"@automod/AutoClear": "autoClear", |
"@automod/AutoClear": "autoClear", |
77 |
"@services/RandomStatus": "randomStatus", |
"@services/RandomStatus": "randomStatus", |
78 |
"@services/Verification": "verification", |
"@services/Verification": "verification", |
79 |
"@services/Welcomer": "welcomer", |
"@services/Welcomer": "welcomer", |
80 |
|
"@services/ChannelLockManager": "channelLock", |
81 |
"@automod/Antijoin": "antijoin", |
"@automod/Antijoin": "antijoin", |
82 |
"@automod/Automute": "automute", |
"@automod/Automute": "automute", |
83 |
}; |
}; |
153 |
} |
} |
154 |
|
|
155 |
async handleCrash(error: Error, origin: NodeJS.UncaughtExceptionOrigin) { |
async handleCrash(error: Error, origin: NodeJS.UncaughtExceptionOrigin) { |
156 |
|
console.log('here'); |
157 |
await this.debugLogger.logToHomeServer(`Uncaught ${error.name}: ${error.message}\n${error.stack}`); |
await this.debugLogger.logToHomeServer(`Uncaught ${error.name}: ${error.message}\n${error.stack}`); |
158 |
} |
} |
159 |
} |
} |