@ovencord/builders 1.12.1 → 1.12.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -6,6 +6,7 @@ export const textInputPredicate = z.object({
|
|
|
6
6
|
id: idPredicate,
|
|
7
7
|
type: z.literal(ComponentType.TextInput),
|
|
8
8
|
custom_id: customIdPredicate,
|
|
9
|
+
label: z.string().min(1).max(45),
|
|
9
10
|
style: z.nativeEnum(TextInputStyle),
|
|
10
11
|
min_length: z.number().min(0).max(4_000).optional(),
|
|
11
12
|
max_length: z.number().min(1).max(4_000).optional(),
|
|
@@ -50,6 +50,24 @@ export class TextInputBuilder extends ComponentBuilder<APITextInputComponent> {
|
|
|
50
50
|
return this;
|
|
51
51
|
}
|
|
52
52
|
|
|
53
|
+
/**
|
|
54
|
+
* Sets the label for this text input.
|
|
55
|
+
*
|
|
56
|
+
* @param label - The label to use
|
|
57
|
+
*/
|
|
58
|
+
public setLabel(label: string) {
|
|
59
|
+
this.data.label = label;
|
|
60
|
+
return this;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
/**
|
|
64
|
+
* Clears the label for this text input.
|
|
65
|
+
*/
|
|
66
|
+
public clearLabel() {
|
|
67
|
+
this.data.label = undefined;
|
|
68
|
+
return this;
|
|
69
|
+
}
|
|
70
|
+
|
|
53
71
|
/**
|
|
54
72
|
* Sets the style for this text input.
|
|
55
73
|
*
|