Small changes

This commit is contained in:
RoseFix7 2023-09-18 17:37:31 -04:00
parent 0dd6702e33
commit d7b331213a
3 changed files with 17 additions and 3 deletions

View file

@ -17,7 +17,14 @@ export class DiscordBot extends l_discord.Bot {
);
this.discord_bot = new l_discord.Bot(this.config.real.discord);
console.log("Starting");
this.discord_bot.running = true;
console.log("READY")
setTimeout(() => {
this.discord_bot.running = false;
console.log("offline");
}, 2000);
}
}

View file

@ -57,7 +57,14 @@ export class Bot extends l_util.Runable {
}
on_terminate(): void {
let done = false;
this.client.destroy()
.then(() => {
done = true;
});
while (!done) { deasync.sleep(100); }
}
}