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

+1 -1
View File
@@ -1,6 +1,6 @@
{ {
"name": "commandbot", "name": "commandbot",
"version": "3.0.0-rc2", "version": "3.0.0-rc3",
"description": "A framework that helps you create your own Discord bot easier.", "description": "A framework that helps you create your own Discord bot easier.",
"main": "dist/cjs/index.js", "main": "dist/cjs/index.js",
"module": "dist/mjs/index.js", "module": "dist/mjs/index.js",
+5 -1
View File
@@ -90,7 +90,11 @@ export class Bot extends EventEmitter {
async start(port?: number, register?: boolean): Promise<boolean> { async start(port?: number, register?: boolean): Promise<boolean> {
try { try {
console.log(`\nBot name: ${this.name}`); 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 === "") { if (this.token === "") {
throw new ReferenceError( throw new ReferenceError(
'No token specified. Please pass your Discord application token as an argument to the "start" method or in the constructor' 'No token specified. Please pass your Discord application token as an argument to the "start" method or in the constructor'