|
|
@ -97,7 +97,7 @@ export default class DiscordBot extends InternalService<Application> |
|
|
|
/** |
|
|
|
* Boot the discord bot |
|
|
|
*/ |
|
|
|
public async boot() { |
|
|
|
public override async boot() { |
|
|
|
let token = await secret(env("DISCORD_BOT_KEY_FILE")); |
|
|
|
await this.bot.login(token); |
|
|
|
} |
|
|
@ -105,7 +105,7 @@ export default class DiscordBot extends InternalService<Application> |
|
|
|
/** |
|
|
|
* Invoked when all other services are booted and ready |
|
|
|
*/ |
|
|
|
public async start() { |
|
|
|
public override async start() { |
|
|
|
await this.loadChannels(); |
|
|
|
this.bot.on("message", message => this.onMessage(message)); |
|
|
|
setInterval(() => { |
|
|
@ -116,7 +116,7 @@ export default class DiscordBot extends InternalService<Application> |
|
|
|
/** |
|
|
|
* Shutdown the discord bot |
|
|
|
*/ |
|
|
|
public async shutdown() { |
|
|
|
public override async shutdown() { |
|
|
|
this.bot.destroy(); |
|
|
|
} |
|
|
|
|
|
|
|