BaseContext
↳ ModalContext
client
, data
): ModalContext
Initializes a new instance of the constructor.
Name | Type | Description |
---|---|---|
client | YorClient | The client object. |
data | APIModalSubmitInteraction | The data to initialize the instance with. |
ModalContext
Private
API: YorClientAPI
Readonly
applicationId: string
undefined
| Channel
YorClient
ModalSubmitActionRowComponent
[]
Readonly
customId: string
Readonly
interactionId: string
undefined
| Member
Readonly
raw: APIModalSubmitInteraction
Readonly
token: string
undefined
| User
name
, data
): unknown
Decorates the object with a new property.
Name | Type | Description |
---|---|---|
name | string | The name of the property. |
data | unknown | The data to assign to the property. |
unknown
The decorated object.
ephemeral?
): Promise
<void
>
Defers the execution of the function.
Name | Type | Default value | Description |
---|---|---|---|
ephemeral | boolean | false | Whether the message is ephemeral or not. |
Promise
<void
>
A promise that resolves when the deferral is complete.
Promise
<void
>
Deletes a reply.
Promise
<void
>
A promise that resolves when the reply is deleted.
data
): Promise
<APIMessage
>
Edits a reply.
Name | Type | Description |
---|---|---|
data | Omit <RESTPostAPIWebhookWithTokenJSONBody , "username" | "avatar_url" > & { flags? : MessageFlags } & { files? : RawFile [] } | The data for editing the reply. |
Promise
<APIMessage
>
A promise that resolves when the reply is edited.
Promise
<APIMessage
>
Fetches the reply asynchronously.
Promise
<APIMessage
>
A promise that resolves when the original reply is fetched.
data
): Promise
<APIMessage
>
Calls the followUp method of the API class with the provided data.
Name | Type | Description |
---|---|---|
data | Omit <RESTPostAPIWebhookWithTokenJSONBody , "username" | "avatar_url" > & { flags? : MessageFlags } & { files? : RawFile [] } | The data to be passed to the followUp method. |
Promise
<APIMessage
>
A promise that resolves to an APIMessage object.
boolean
Determines if the function is from a message.
boolean
Returns true if the function is from a message, otherwise false.
data
): Promise
<void
>
Replies to an interaction.
Name | Type | Description |
---|---|---|
data | Omit <RESTPostAPIWebhookWithTokenJSONBody , "username" | "avatar_url" > & { flags? : MessageFlags } & { files? : RawFile [] } | The data for creating the reply. |
Promise
<void
>
A promise that resolves when the reply is sent.