mirror of
https://github.com/tiramisulabs/seyfert.git
synced 2025-07-02 21:16:09 +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)
|
@mix(Interaction)
|
||||||
export class ModalSubmitInteraction<FromGuild extends boolean = boolean> extends BaseInteraction<FromGuild> {
|
export class ModalSubmitInteraction<FromGuild extends boolean = boolean> extends BaseInteraction<FromGuild> {
|
||||||
declare data: ObjectToLower<APIModalSubmission>;
|
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() {
|
get customId() {
|
||||||
return this.data.customId;
|
return this.data.customId;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user