Skip to content

Commit b144c8d

Browse files
committed
tours: Tag for Pet Mods tours
1 parent c4c62d7 commit b144c8d

1 file changed

Lines changed: 10 additions & 0 deletions

File tree

src/ps/handlers/tours.tsx

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,9 @@ import { errorLog } from '@/utils/logger';
1010
import { randomString } from '@/utils/random';
1111

1212
import type { Client } from 'ps-client';
13+
import { getChannel } from '@/discord/loaders/channels';
14+
import { ANNOUNCEMENTS_CHANNEL, ROLES } from '@/discord/constants/servers/petmods';
15+
import { IS_ENABLED } from '@/enabled';
1316

1417
export type BracketNode = {
1518
team: string;
@@ -62,6 +65,13 @@ export function tourHandler(this: Client, roomId: string, line: string, isIntro?
6265
const wallTourFinals = ['hindi', 'capproject'].includes(roomId);
6366

6467
switch (event) {
68+
case 'create': {
69+
const [_format, generator, _, name] = data.lazySplit('|', 3);
70+
if (IS_ENABLED.DB && roomId === 'petmods') {
71+
getChannel(ANNOUNCEMENTS_CHANNEL)?.send(`${ROLES.PS_TOURS} A ${name} ${generator} tournament has been created in the room!`);
72+
}
73+
break;
74+
}
6575
case 'battlestart': {
6676
if (wishLuck) {
6777
const [_p1, _p2, battleRoom] = data.lazySplit('|', 2);

0 commit comments

Comments
 (0)