blob: 15896aef43be71a7ff512ef14293e94fdfe134c7 (
plain)
1
2
3
4
5
6
7
8
|
import { type BushArgumentTypeCaster } from '#lib';
import { type Snowflake } from 'discord.js';
export const snowflake: BushArgumentTypeCaster<Snowflake | null> = (_, phrase) => {
if (!phrase) return null;
if (client.consts.regex.snowflake.test(phrase)) return phrase;
return null;
};
|