Archived
export MessageEmbed + redesigned error message
This commit is contained in:
1 parent
217cc09b39
commit
1b7400ae0a
3 files changed
+8
-9
No files matched your search
@@ -1,5 +1,6 @@
|
|||||||
import { Bot } from './src/Bot.js';
|
import { Bot } from "./src/Bot.js";
|
||||||
import { Command } from './src/Command.js';
|
import { Command } from "./src/Command.js";
|
||||||
|
import { MessageEmbed } from "discord.js";
|
||||||
|
|
||||||
export default Bot;
|
export default Bot;
|
||||||
export { Bot, Command };
|
export { Bot, Command, MessageEmbed };
|
||||||
+3
-5
@@ -106,7 +106,7 @@ export class Bot extends EventEmitter {
|
|||||||
}
|
}
|
||||||
console.log("✔");
|
console.log("✔");
|
||||||
process.stdout.write("Connecting to Discord... ");
|
process.stdout.write("Connecting to Discord... ");
|
||||||
if (await this.client.login(this.token)) {
|
await this.client.login(this.token);
|
||||||
this.client.on("ready", () => {
|
this.client.on("ready", () => {
|
||||||
console.log("✔\n");
|
console.log("✔\n");
|
||||||
this.emit("READY");
|
this.emit("READY");
|
||||||
@@ -153,12 +153,10 @@ export class Bot extends EventEmitter {
|
|||||||
this.emit("MESSAGE", m);
|
this.emit("MESSAGE", m);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
} else {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
return true;
|
return true;
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
console.error(`ERROR! ${e.toString()}`);
|
console.log("❌");
|
||||||
|
console.error(`[❌ ERROR] ${e.toString()}`);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -164,7 +164,7 @@ export class SystemMessageManager {
|
|||||||
return embed;
|
return embed;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
console.error("ERROR! System message: Incorrect parameter");
|
console.error("[❌ ERROR] System message: Incorrect parameter");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in new issue
Block a user