revert the class changes for between.js, usernameGen.js and ansi.js along with having the bot.js file extend EventEmitter like chayapak suggested

This commit is contained in:
Parker2991
2025-05-07 09:39:07 -04:00
parent a8a0b210be
commit 7cb0524f24
11 changed files with 59 additions and 72 deletions
+1
View File
@@ -235,6 +235,7 @@ class ChatModule {
message = tryParse(packet.content);
}
if (
message.translate === "advMode.setCommand.success" &&
config?.debug?.commandSetMessage === false
+1 -1
View File
@@ -57,7 +57,7 @@ class DiscordModule {
.replaceAll("```\u001b[9```" + "```\u001b[3```")
.replaceAll("https://discord", "https:\rdiscord");
try {
sendDiscordMessage(new fixansi(ansi?.replaceAll("`", "`\u200b")).ansi);
sendDiscordMessage(fixansi(ansi?.replaceAll("`", "`\u200b")));
} catch (e) {
bot.console.warn(`Error sending a message to Discord: ${e.message}`);
sendDiscordMessage(e.message);
+1 -1
View File
@@ -14,7 +14,7 @@ class ReconnectModule {
if (options.usernameGen) {
client =
options.client ??
mc.createClient(options, (options.username = new usernameGen().username()));
mc.createClient(options, (options.username = usernameGen()));
} else {
client = options.client ?? mc.createClient(options);
}