diff --git a/config/discord-bot.ts b/config/discord-bot.ts index 0ccf373..df11cf0 100644 --- a/config/discord-bot.ts +++ b/config/discord-bot.ts @@ -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" } } \ No newline at end of file diff --git a/source/discord-bot.ts b/source/discord-bot.ts index fc2be33..e4c93e8 100644 --- a/source/discord-bot.ts +++ b/source/discord-bot.ts @@ -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); } } diff --git a/source/discord.ts b/source/discord.ts index 002479d..0d0e4d0 100644 --- a/source/discord.ts +++ b/source/discord.ts @@ -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); } } }