We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent aaca01d commit bef86c0Copy full SHA for bef86c0
src/getters.ts
@@ -62,10 +62,11 @@ export const getModal = (id: string) => {
62
const input = modal.config.inputs[id]
63
const inputBuilder = new TextInputBuilder()
64
.setCustomId(id)
65
- .setLabel(input.label)
+ .setLabel(input.label ?? id)
66
.setStyle(
67
input.style ? TextInputStyle[input.style] : TextInputStyle.Short
68
)
69
+ .setRequired(input.required ?? true)
70
71
if (input.minLength) {
72
inputBuilder.setMinLength(input.minLength)
@@ -79,9 +80,6 @@ export const getModal = (id: string) => {
79
80
if (input.value) {
81
inputBuilder.setValue(input.value)
82
}
- if (input.required) {
83
- inputBuilder.setRequired(input.required)
84
- }
85
builder.addComponents(useActionRow(inputBuilder))
86
87
0 commit comments