Skip to content

Commit 32d5f69

Browse files
committed
chore: Ping on Scavscord for Hunt Swap
1 parent 2d3c87b commit 32d5f69

1 file changed

Lines changed: 13 additions & 0 deletions

File tree

src/ps/handlers/cron/ugo.ts

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,10 @@
11
import { resetUGOPlayed } from '@/cache/ugo';
2+
import Discord from '@/discord';
23
import { TimeZone } from '@/ps/handlers/cron/constants';
4+
import getSecretFunction from '@/secrets/functions';
35

46
import type { PSCronJobManager } from '@/ps/handlers/cron/index';
7+
import type { Client as DiscordClient } from 'discord.js';
58
import type { Client } from 'ps-client';
69

710
// UGO-CODE
@@ -11,4 +14,14 @@ export function register(this: Client, Jobs: PSCronJobManager): void {
1114
this.getRoom('Board Games').send(`/modnote Reset player participation counts for the day! Backup: ${backupUrl}`);
1215
});
1316
});
17+
// August 29, 22:00 GMT
18+
Jobs.register('hunt-swap-ping', '0 22 29 08 *', TimeZone.GMT, () => {
19+
getSecretFunction<(client: DiscordClient) => Promise<void>>('pingForHuntSwap', async () => {})(Discord)
20+
.then(() => {
21+
this.getRoom('Scavengers').send('/modnote Pinged for hunt swap. I think. Probably. I hope.');
22+
})
23+
.catch(() => {
24+
this.getRoom('Scavengers').send('/modnote Unable to ping for hunt swap! Tag PartMan!');
25+
});
26+
});
1427
}

0 commit comments

Comments
 (0)