feat: add discord-webhooks module for embed notifications
- New module with batching queue, per-webhook event filtering - Hytale orange (#F26430) embeds with timestamps - Retry on 429 rate limits - Integrated into all 5 tracker modules
This commit is contained in:
parent
be1102119a
commit
48b3359792
13 changed files with 357 additions and 5 deletions
|
|
@ -1,5 +1,6 @@
|
|||
import type { Module, ModuleDependencies } from '../../core/module.js'
|
||||
import type { HytaleTrackerConfig } from '../../types.js'
|
||||
import { formatLauncherEmbed } from '../discord-webhooks/formatter.js'
|
||||
import { formatLauncherUpdate } from './formatter.js'
|
||||
import { checkLauncherUpdate } from './tracker.js'
|
||||
|
||||
|
|
@ -64,6 +65,9 @@ export function hytaleLauncherFactory(
|
|||
chatIds: this.config.chatIds,
|
||||
disableLinkPreview: true,
|
||||
})
|
||||
if (this.dependencies.webhooks) {
|
||||
await this.dependencies.webhooks.send('launcher', formatLauncherEmbed(update))
|
||||
}
|
||||
this.dependencies.logger(this.name, `Update detected: ${update.version}`)
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue