mirror of
https://github.com/ahmadk953/poixpixel-discord-bot.git
synced 2025-05-01 03:09:35 +00:00
Small changes
This commit is contained in:
parent
0dd6702e33
commit
d7b331213a
3 changed files with 17 additions and 3 deletions
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -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); }
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue