restarted notification

This commit is contained in:
Ben
2023-07-09 20:28:50 -04:00
parent e9ae1853af
commit bca122833c
3 changed files with 13 additions and 2 deletions
+10
View File
@@ -103,6 +103,16 @@ export class DiscordService implements OnModuleInit {
}
}
public async notifyRestarted() {
if (this.bot == null) {
return;
}
const guild = await this.bot.guilds.fetch(this.guildId);
const channel = await guild.channels.fetch(this.channelId) as TextChannel;
channel.send(`Server Restarted.`);
}
public async notifySubscribersBlockFound(height: number, block: Block, message: string) {
if (this.bot == null) {
return;
+1 -1
View File
@@ -14,7 +14,7 @@ export class NotificationService implements OnModuleInit {
) { }
async onModuleInit(): Promise<void> {
await this.discordService.notifyRestarted();
}
public async notifySubscribersBlockFound(address: string, height: number, block: Block, message: string) {