Skip to main content
yor.ts / Exports / ModalContext

Class: ModalContext

Hierarchy

  • BaseContext ↳ ModalContext

Table of contents

Constructors

Properties

Methods

Constructors

constructor

• new ModalContext(client, data): ModalContext Initializes a new instance of the constructor.

Parameters

Returns

ModalContext

Overrides

BaseContext.constructor

Defined in

src/structures/Contexts/ModalContext.ts:42

Properties

API

• Private API: YorClientAPI

Defined in

src/structures/Contexts/ModalContext.ts:34

applicationId

• Readonly applicationId: string

Defined in

src/structures/Contexts/ModalContext.ts:26

channel

• channel: undefined | Channel

Defined in

src/structures/Contexts/ModalContext.ts:30

client

• client: YorClient

Inherited from

BaseContext.client

Defined in

src/structures/Base.ts:4

components

• components: ModalSubmitActionRowComponent[]

Defined in

src/structures/Contexts/ModalContext.ts:29

customId

• Readonly customId: string

Defined in

src/structures/Contexts/ModalContext.ts:24

interactionId

• Readonly interactionId: string

Defined in

src/structures/Contexts/ModalContext.ts:25

member

• member: undefined | Member

Defined in

src/structures/Contexts/ModalContext.ts:32

raw

• Readonly raw: APIModalSubmitInteraction

Defined in

src/structures/Contexts/ModalContext.ts:22

token

• Readonly token: string

Defined in

src/structures/Contexts/ModalContext.ts:27

user

• user: undefined | User

Defined in

src/structures/Contexts/ModalContext.ts:31

Methods

decorate

▸ decorate(name, data): unknown Decorates the object with a new property.

Parameters

Returns

unknown The decorated object.

Inherited from

BaseContext.decorate

Defined in

src/structures/Contexts/BaseContext.ts:22

defer

▸ defer(ephemeral?): Promise<void> Defers the execution of the function.

Parameters

Returns

Promise<void> A promise that resolves when the deferral is complete.

Defined in

src/structures/Contexts/ModalContext.ts:82

deleteReply

▸ deleteReply(): Promise<void> Deletes a reply.

Returns

Promise<void> A promise that resolves when the reply is deleted.

Defined in

src/structures/Contexts/ModalContext.ts:151

editReply

▸ editReply(data): Promise<APIMessage> Edits a reply.

Parameters

Returns

Promise<APIMessage> A promise that resolves when the reply is edited.

Defined in

src/structures/Contexts/ModalContext.ts:125

fetchReply

▸ fetchReply(): Promise<APIMessage> Fetches the reply asynchronously.

Returns

Promise<APIMessage> A promise that resolves when the original reply is fetched.

Defined in

src/structures/Contexts/ModalContext.ts:160

followUp

▸ followUp(data): Promise<APIMessage> Calls the followUp method of the API class with the provided data.

Parameters

Returns

Promise<APIMessage> A promise that resolves to an APIMessage object.

Defined in

src/structures/Contexts/ModalContext.ts:173

isFromMessage

▸ isFromMessage(): boolean Determines if the function is from a message.

Returns

boolean Returns true if the function is from a message, otherwise false.

Defined in

src/structures/Contexts/ModalContext.ts:72

reply

▸ reply(data): Promise<void> Replies to an interaction.

Parameters

Returns

Promise<void> A promise that resolves when the reply is sent.

Defined in

src/structures/Contexts/ModalContext.ts:102