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

@ -2,8 +2,8 @@ import * as config from "../source/discord-bot/config";
export const data: config.Config_Interface = {
discord: {
api_key: "MTA1MjAxNzMyOTM3NjA3MTc4MQ.GFmCFK.hAEnQ2Qx7syQ4_CFuMRe4ajJ507bpjc21Isvlo",
application_client_id: "1052017329376071781",
api_key: "MTE1MzM5MDU1NzQ4NjM4MzEwNA.Gybr-t.R3LdqcF6_PWTC10J-6Sbx9d8c6oDbgyUA4Rxfc",
application_client_id: "1153390557486383104",
guild_id: "1007735047039750214"
}
}

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); }
}
}