feat: add update and deferUpdate to

This commit is contained in:
MARCROCK22 2024-12-15 15:42:53 -04:00
parent 815e51fbc8
commit 03d7e5bda8

View File

@ -783,6 +783,26 @@ export interface ModalSubmitInteraction<FromGuild extends boolean = boolean>
@mix(Interaction)
export class ModalSubmitInteraction<FromGuild extends boolean = boolean> extends BaseInteraction<FromGuild> {
declare data: ObjectToLower<APIModalSubmission>;
update<WR extends boolean = false>(data: ComponentInteractionMessageUpdate, withResponse?: WR) {
return this.reply(
{
type: InteractionResponseType.UpdateMessage,
data,
},
withResponse,
);
}
deferUpdate<WR extends boolean = false>(withResponse?: WR) {
return this.reply<WR>(
{
type: InteractionResponseType.DeferredMessageUpdate,
},
withResponse,
);
}
get customId() {
return this.data.customId;
}