refactor: remove obsolete builder methods (#7590)

This commit is contained in:
Almeida
2022-03-06 15:27:17 +00:00
committed by GitHub
parent 79d6c0489c
commit 10607dbdaf
7 changed files with 83 additions and 116 deletions

View File

@@ -52,8 +52,10 @@ export function validateRequired(required: unknown): asserts required is boolean
booleanPredicate.parse(required);
}
export function validateMaxChoicesLength(choices: APIApplicationCommandOptionChoice[]) {
maxArrayLengthPredicate.parse(choices);
const choicesLengthPredicate = z.number().lte(25);
export function validateChoicesLength(amountAdding: number, choices?: APIApplicationCommandOptionChoice[]): void {
choicesLengthPredicate.parse((choices?.length ?? 0) + amountAdding);
}
export function assertReturnOfBuilder<