Archived
added start method protection
This commit is contained in:
1 parent
d898ddc81d
commit
535e59c7ea
1 file changed
+3
@@ -121,6 +121,9 @@ export class Bot extends EventEmitter {
|
||||
*/
|
||||
public async start(port?: number, register?: boolean): Promise<boolean> {
|
||||
try {
|
||||
if (applicationState.running) {
|
||||
throw new Error("This bot is already running");
|
||||
}
|
||||
console.log(`\nBot name: ${this.name}`);
|
||||
console.log(`Prefix: ${this.commands.prefix || "/ (only slash commands)"} \n`);
|
||||
if (this.token === "") {
|
||||
|
||||
Reference in new issue
Block a user