fixed undefined prefix message on startup (rc3)

This commit is contained in:
mmacierzanka committed 2021-08-10 03:14:58 +02:00
1 parent a7ab7dc8e5
commit 45b0589468
2 files changed
+6 -2

No files matched your search

+5 -1
View File
@@ -90,7 +90,11 @@ export class Bot extends EventEmitter {
async start(port?: number, register?: boolean): Promise<boolean> {
try {
console.log(`\nBot name: ${this.name}`);
console.log(`Prefix: ${this.commands.prefix} \n`);
console.log(
`Prefix: ${
this.commands.prefix || "/ (only slash commands)"
} \n`
);
if (this.token === "") {
throw new ReferenceError(
'No token specified. Please pass your Discord application token as an argument to the "start" method or in the constructor'