import { BotArgumentTypeCaster, regex } from '#lib'; import type { Snowflake } from 'discord.js'; export const snowflake: BotArgumentTypeCaster = (_, phrase) => { if (!phrase) return null; if (regex.snowflake.test(phrase)) return phrase; return null; };