mirror of
https://github.com/tiramisulabs/seyfert.git
synced 2025-07-01 20:46:08 +00:00
feat: add update and deferUpdate to
This commit is contained in:
parent
815e51fbc8
commit
03d7e5bda8
@ -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;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user