seyfert
Version:
The most advanced framework for discord bots
57 lines (56 loc) • 1.74 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.FileUpload = void 0;
const types_1 = require("../types");
const Base_1 = require("./Base");
class FileUpload extends Base_1.BaseComponentBuilder {
constructor(data = {}) {
super({ type: types_1.ComponentType.FileUpload, ...data });
}
/**
* Sets the ID for the file upload.
* @param id - The ID for the file upload.
* @returns The current FileUpload instance.
*/
setId(id) {
this.data.id = id;
return this;
}
/**
* Sets the custom ID for the file upload.
* @param customId - The custom ID for the file upload.
* @returns The current FileUpload instance.
*/
setCustomId(customId) {
this.data.custom_id = customId;
return this;
}
/**
* Sets the minimum number of items that must be uploaded.
* @param minValues - The minimum number of items that must be uploaded.
* @returns The current FileUpload instance.
*/
setMinValues(minValues) {
this.data.min_values = minValues;
return this;
}
/**
* Sets the maximum number of items that can be uploaded.
* @param maxValues - The maximum number of items that can be uploaded.
* @returns The current FileUpload instance.
*/
setMaxValues(maxValues) {
this.data.max_values = maxValues;
return this;
}
/**
* Sets whether the file upload is required.
* @param required - Whether the file upload is required.
* @returns The current FileUpload instance.
*/
setRequired(required) {
this.data.required = required;
return this;
}
}
exports.FileUpload = FileUpload;