2 |
import { format } from "date-fns"; |
import { format } from "date-fns"; |
3 |
import { appendFile } from "fs/promises"; |
import { appendFile } from "fs/promises"; |
4 |
import path from "path"; |
import path from "path"; |
|
import { exit } from "process"; |
|
5 |
import DiscordClient from "../../client/Client"; |
import DiscordClient from "../../client/Client"; |
6 |
import { LogLevel } from "../../services/DebugLogger"; |
import { LogLevel } from "../../services/DebugLogger"; |
7 |
import BaseEvent from "../../utils/structures/BaseEvent"; |
import BaseEvent from "../../utils/structures/BaseEvent"; |
8 |
|
|
9 |
export default class DebugEvent extends BaseEvent { |
export default class DebugEvent extends BaseEvent { |
10 |
logFile: string = path.resolve(__dirname, "..", "..", "..", "logs", 'debug.log'); |
logFile: string = path.join(process.env.SUDO_PREFIX ?? (__dirname + "/../../../"), "logs", 'debug.log'); |
11 |
|
|
12 |
constructor() { |
constructor() { |
13 |
super("debug"); |
super("debug"); |