`ModalBuilder` validation error

When creating a modal like this:
export default class InputSocialMediaAccountName extends CustomModal {
public override async build() {
this.setCustomId(PresetModal.InputSocialMediaAccountName)
.setTitle('Connecting a social media account')
.setComponents([
new ActionRowBuilder<TextInputBuilder>() //
.setComponents([
new TextInputBuilder()
.setCustomId('handle')
.setLabel('Account Handle')
.setMinLength(1)
.setPlaceholder('@clipx')
.setRequired(true)
.setStyle(TextInputStyle.Short)
])
]);
}
}
export default class InputSocialMediaAccountName extends CustomModal {
public override async build() {
this.setCustomId(PresetModal.InputSocialMediaAccountName)
.setTitle('Connecting a social media account')
.setComponents([
new ActionRowBuilder<TextInputBuilder>() //
.setComponents([
new TextInputBuilder()
.setCustomId('handle')
.setLabel('Account Handle')
.setMinLength(1)
.setPlaceholder('@clipx')
.setRequired(true)
.setStyle(TextInputStyle.Short)
])
]);
}
}
I'm running into this error: https://pastebin.com/S5fda8s4 Not sure what the issue could be as the validation error isn't really helpful (or I just don't know how to interpret it; CustomModal for reference
export default abstract class CustomModal extends ModalBuilder {
constructor(public readonly manager: ModalsManager) {
super();
}

public abstract build(): Promise<void>;
}
export default abstract class CustomModal extends ModalBuilder {
constructor(public readonly manager: ModalsManager) {
super();
}

public abstract build(): Promise<void>;
}
Pastebin
2025-01-13 13:31:20 - ERROR - Encountered error while handling an i...
Pastebin.com is the number one paste tool since 2002. Pastebin is a website where you can store text online for a set period of time.
1 Reply
Favna
Favna5d ago
At a glance I can't say where but s.instance checks if a class is instanceof an expected class so somewhere you are providing an invalid class instance.

Did you find this page helpful?