mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-16 03:23:29 +01:00
docs(builders): Add some basic documentation (#9359)
This commit is contained in:
@@ -1,5 +1,26 @@
|
||||
let validate = true;
|
||||
|
||||
export const enableValidators = () => (validate = true);
|
||||
export const disableValidators = () => (validate = false);
|
||||
export const isValidationEnabled = () => validate;
|
||||
/**
|
||||
* Enables validators.
|
||||
*
|
||||
* @returns Whether validation is occurring.
|
||||
*/
|
||||
export function enableValidators() {
|
||||
return (validate = true);
|
||||
}
|
||||
|
||||
/**
|
||||
* Disables validators.
|
||||
*
|
||||
* @returns Whether validation is occurring.
|
||||
*/
|
||||
export function disableValidators() {
|
||||
return (validate = false);
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks whether validation is occurring.
|
||||
*/
|
||||
export function isValidationEnabled() {
|
||||
return validate;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user