export MessageEmbed + redesigned error message

This commit is contained in:
mmacierzanka committed 2021-08-02 18:39:46 +02:00
1 parent 217cc09b39
commit 1b7400ae0a
3 files changed
+8 -9

No files matched your search

+4 -3
View File
@@ -1,5 +1,6 @@
import { Bot } from './src/Bot.js';
import { Command } from './src/Command.js';
import { Bot } from "./src/Bot.js";
import { Command } from "./src/Command.js";
import { MessageEmbed } from "discord.js";
export default Bot;
export { Bot, Command };
export { Bot, Command, MessageEmbed };
+3 -5
View File
@@ -106,7 +106,7 @@ export class Bot extends EventEmitter {
}
console.log("✔");
process.stdout.write("Connecting to Discord... ");
if (await this.client.login(this.token)) {
await this.client.login(this.token);
this.client.on("ready", () => {
console.log("✔\n");
this.emit("READY");
@@ -153,12 +153,10 @@ export class Bot extends EventEmitter {
this.emit("MESSAGE", m);
}
});
} else {
return false;
}
return true;
} catch (e) {
console.error(`ERROR! ${e.toString()}`);
console.log("❌");
console.error(`[❌ ERROR] ${e.toString()}`);
return false;
}
}
+1 -1
View File
@@ -164,7 +164,7 @@ export class SystemMessageManager {
return embed;
}
} else {
console.error("ERROR! System message: Incorrect parameter");
console.error("[❌ ERROR] System message: Incorrect parameter");
return;
}
}