node-event-bot/server/events/guildScheduledEventCreate.ts
mightypanders 790a0d65f4
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
use repetitionstring validator in new and updated events
2022-04-23 21:32:32 +02:00

12 lines
464 B
TypeScript

import { GuildScheduledEvent } from 'discord.js'
import { validateRepetitionStringAndSendMessageOnFail } from '../handler/repeatingEvents/helper'
export const name = 'guildScheduledEventCreate'
export async function execute(guildScheduledEvent: GuildScheduledEvent) {
try {
console.log(`${JSON.stringify(guildScheduledEvent)} has been created.`)
validateRepetitionStringAndSendMessageOnFail(guildScheduledEvent)
} catch (error) {
console.error(error)
}
}