Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,16 @@ registerClientReadyHandler({
NotifyWaitingCheckin.assertMissPerms(bot, wardenDutyChannel)
const checkins = await NotifyWaitingCheckin.getTodayWaitingCheckins(client.prisma)

await NotifyWaitingCheckin.sendOpening(guild.name, wardenDutyChannel)
await NotifyWaitingCheckin.sendList(checkins, wardenDutyChannel)
await NotifyWaitingCheckin.sendClosing(guild.name, wardenDutyChannel)
if (checkins.length) {
await NotifyWaitingCheckin.sendOpening(guild.name, wardenDutyChannel)
await NotifyWaitingCheckin.sendList(checkins, wardenDutyChannel)
await NotifyWaitingCheckin.sendClosing(guild.name, wardenDutyChannel)

log.success(NotifyWaitingCheckin.MSG.JobSuccess)
log.success(NotifyWaitingCheckin.MSG.JobSuccess)
}
else {
log.success(NotifyWaitingCheckin.MSG.NoWaitingCheckins)
}
})
}
catch (err) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ export class NotifyWaitingCheckinMessage extends DiscordAssert {
...DiscordAssert.MSG,
JobRunning: '[JOB] Running notify waiting checkin...',
JobSuccess: '[JOB] Notify waiting checkin finished successfully',
NoWaitingCheckins: 'There are no check-ins currently waiting for review',
Opening: (guildName: string) => `
Wahai para <@&${FLAMEWARDEN_ROLE}>,
tatkala malam kian mendekat dan waktu hampir beralih hari, ${guildName} mencatat bahwa masih terdapat percikan api yang belum ditakar.
Expand Down