Update debugging
- Uniform client name
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
// Debug
|
||||
const { DebugBuilder } = require("../utilities/debugBuilder.js");
|
||||
const log = new DebugBuilder("client-bot", "configController");
|
||||
const log = new DebugBuilder("client", "configController");
|
||||
// Modules
|
||||
const { readFileSync } = require('fs');
|
||||
const path = require("path");
|
||||
|
||||
@@ -12,6 +12,11 @@ exports.DebugBuilder = class DebugBuilder {
|
||||
this.INFO = debug(`${appName}:${fileName}:INFO`);
|
||||
this.DEBUG = debug(`${appName}:${fileName}:DEBUG`);
|
||||
this.WARN = debug(`${appName}:${fileName}:WARNING`);
|
||||
this.ERROR = debug(`${appName}:${fileName}:ERROR`);
|
||||
this.VERBOSE = debug(`${appName}:${fileName}:VERBOSE`);
|
||||
this.ERROR = (...messageParts) => {
|
||||
const error = debug(`${appName}:${fileName}:ERROR`);
|
||||
error(messageParts);
|
||||
if (process.env.EXIT_ON_ERROR && process.env.EXIT_ON_ERROR > 0) setTimeout(process.exit, process.env.EXIT_ON_ERROR_DELAY ?? 0);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -4,7 +4,7 @@ const { exec } = require("child_process");
|
||||
// Debug
|
||||
const { DebugBuilder } = require("../utilities/debugBuilder.js");
|
||||
// Global Vars
|
||||
const log = new DebugBuilder("client-bot", "executeConsoleCommands");
|
||||
const log = new DebugBuilder("client", "executeConsoleCommands");
|
||||
const execCommand = promisify(exec);
|
||||
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
// Debug
|
||||
const { DebugBuilder } = require("../utilities/debugBuilder.js");
|
||||
const log = new DebugBuilder("client-bot", "messageHandler");
|
||||
const log = new DebugBuilder("client", "messageHandler");
|
||||
|
||||
exports.replyToInteraction = async function replyToInteraction(interaction, message){
|
||||
interaction.reply({ content: message, fetchReply: true })
|
||||
|
||||
Reference in New Issue
Block a user