MenuCommandContext
Extends
BaseContext
.ExtendContext
Type parameters
Type parameter | Value |
---|---|
T extends MessageCommandInteraction | UserCommandInteraction | - |
M extends keyof RegisteredMiddlewares | never |
Constructors
new MenuCommandContext(client, interaction, shardId, command)
1new MenuCommandContext<T, M>(2 client: UsingClient,3 interaction: T,4 shardId: number,5command: ContextMenuCommand): MenuCommandContext<T, M>
Parameters
Parameter | Type |
---|---|
client | UsingClient |
interaction | T |
shardId | number |
command | ContextMenuCommand |
Returns
MenuCommandContext
<T
, M
>
Inherited from
BaseContext.constructor
Source
seyfert/src/commands/applications/menucontext.ts:36
Properties
Property | Modifier | Type | Inherited from |
---|---|---|---|
client | readonly | UsingClient | BaseContext.client |
command | readonly | ContextMenuCommand | - |
globalMetadata | public | GlobalMetadata | - |
interaction | readonly | T | - |
metadata | public | CommandMetadata <UnionToTuple <M , []>> | - |
shardId | readonly | number | - |
Accessors
author
1get author(): User
Returns
Source
seyfert/src/commands/applications/menucontext.ts:148
channelId
1get channelId(): string
Returns
string
Source
seyfert/src/commands/applications/menucontext.ts:144
fullCommandName
1get fullCommandName(): string
Returns
string
Source
seyfert/src/commands/applications/menucontext.ts:66
guildId
1get guildId(): undefined | string
Returns
undefined
| string
Source
seyfert/src/commands/applications/menucontext.ts:140
member
1get member(): undefined | InteractionGuildMember
Returns
undefined
| InteractionGuildMember
Source
seyfert/src/commands/applications/menucontext.ts:152
proxy
1get proxy(): APIRoutes
Returns
Source
seyfert/src/commands/basecontex.ts:10
t
1get t(): __InternalParseLocale<DefaultLocale> & Object
Returns
__InternalParseLocale
<DefaultLocale
> & Object
Source
seyfert/src/commands/applications/menucontext.ts:62
target
1get target(): InteractionTarget<T>
Returns
Source
seyfert/src/commands/applications/menucontext.ts:49
Methods
channel()
channel(mode)
1channel(mode?: "rest" | "flow"): Promise<AllChannels>
Parameters
Parameter | Type |
---|---|
mode ? | "rest" | "flow" |
Returns
Promise
<AllChannels
>
Source
seyfert/src/commands/applications/menucontext.ts:104
channel(mode)
1channel(mode?: "cache"): ReturnCache<AllChannels>
Parameters
Parameter | Type |
---|---|
mode ? | "cache" |
Returns
Source
seyfert/src/commands/applications/menucontext.ts:105
deferReply()
1deferReply(ephemeral: boolean): Promise<void>
Parameters
Parameter | Type | Default value |
---|---|---|
ephemeral | boolean | false |
Returns
Promise
<void
>
Source
seyfert/src/commands/applications/menucontext.ts:81
deleteResponse()
1deleteResponse(): Promise<undefined | void>
Returns
Promise
<undefined
| void
>
Source
seyfert/src/commands/applications/menucontext.ts:89
editOrReply()
1editOrReply<FR>(body: Omit<RESTPatchAPIWebhookWithTokenMessageJSONBody, "components" | "embeds"> & ResolverProps | Omit<APIInteractionResponseCallbackData, "components" | "embeds" | "poll"> & SendResolverProps, fetchReply?: FR): Promise<When<FR, Message | WebhookMessage, void | Message | WebhookMessage>>
Type parameters
Type parameter | Value |
---|---|
FR extends boolean | false |
Parameters
Parameter | Type |
---|---|
body | Omit <RESTPatchAPIWebhookWithTokenMessageJSONBody , "components" | "embeds" > & ResolverProps | Omit <APIInteractionResponseCallbackData , "components" | "embeds" | "poll" > & SendResolverProps |
fetchReply ? | FR |
Returns
Promise
<When
<FR
, Message
| WebhookMessage
, void
| Message
| WebhookMessage
>>
Source
seyfert/src/commands/applications/menucontext.ts:93
editResponse()
1editResponse(body: Omit<RESTPatchAPIWebhookWithTokenMessageJSONBody, "components" | "embeds"> & ResolverProps): Promise<WebhookMessage>
Parameters
Parameter | Type |
---|---|
body | Omit <RESTPatchAPIWebhookWithTokenMessageJSONBody , "components" | "embeds" > & ResolverProps |
Returns
Promise
<WebhookMessage
>
Source
seyfert/src/commands/applications/menucontext.ts:85
fetchResponse()
1fetchResponse(): Promise<undefined | WebhookMessage>
Returns
Promise
<undefined
| WebhookMessage
>
Source
seyfert/src/commands/applications/menucontext.ts:100
guild()
guild(mode)
1guild(mode?: "rest" | "flow"): Promise<undefined | Guild<"cached" | "api">>
Parameters
Parameter | Type |
---|---|
mode ? | "rest" | "flow" |
Returns
Promise
<undefined
| Guild
<"cached"
| "api"
>>
Source
seyfert/src/commands/applications/menucontext.ts:125
guild(mode)
1guild(mode?: "cache"): ReturnCache<undefined | Guild<"cached">>
Parameters
Parameter | Type |
---|---|
mode ? | "cache" |
Returns
ReturnCache
<undefined
| Guild
<"cached"
>>
Source
seyfert/src/commands/applications/menucontext.ts:126
isChat()
1isChat(): this is CommandContext<Object, never>
Returns
this is CommandContext<Object, never>
Inherited from
BaseContext.isChat
Source
seyfert/src/commands/basecontex.ts:14
isComponent()
1isComponent(): this is ComponentContext<keyof ComponentCommandInteractionMap>
Returns
this is ComponentContext<keyof ComponentCommandInteractionMap>
Inherited from
BaseContext.isComponent
Source
seyfert/src/commands/basecontex.ts:30
isMenu()
1isMenu(): this is MenuCommandContext<UserCommandInteraction<boolean> | MessageCommandInteraction<boolean>, never>
Returns
this is MenuCommandContext<UserCommandInteraction<boolean> | MessageCommandInteraction<boolean>, never>
Inherited from
BaseContext.isMenu
Source
seyfert/src/commands/applications/menucontext.ts:156
isMenuMessage()
1isMenuMessage(): this is MenuCommandContext<MessageCommandInteraction<boolean>, never>
Returns
this is MenuCommandContext<MessageCommandInteraction<boolean>, never>
Inherited from
BaseContext.isMenuMessage
Source
seyfert/src/commands/applications/menucontext.ts:164
isMenuUser()
1isMenuUser(): this is MenuCommandContext<UserCommandInteraction<boolean>, never>
Returns
this is MenuCommandContext<UserCommandInteraction<boolean>, never>
Inherited from
BaseContext.isMenuUser
Source
seyfert/src/commands/applications/menucontext.ts:160
me()
me(mode)
1me(mode?: "rest" | "flow"): Promise<GuildMember>
Parameters
Parameter | Type |
---|---|
mode ? | "rest" | "flow" |
Returns
Promise
<GuildMember
>
Source
seyfert/src/commands/applications/menucontext.ts:112
me(mode)
1me(mode?: "cache"): ReturnCache<undefined | GuildMember>
Parameters
Parameter | Type |
---|---|
mode ? | "cache" |
Returns
ReturnCache
<undefined
| GuildMember
>
Source
seyfert/src/commands/applications/menucontext.ts:113
modal()
1modal(body: ModalCreateBodyRequest): Promise<void>
Parameters
Parameter | Type |
---|---|
body | ModalCreateBodyRequest |
Returns
Promise
<void
>
Source
seyfert/src/commands/applications/menucontext.ts:77
write()
1write<FR>(body: Omit<APIInteractionResponseCallbackData, "components" | "embeds" | "poll"> & SendResolverProps, fetchReply?: FR): Promise<When<FR, WebhookMessage, void | WebhookMessage>>
Type parameters
Type parameter | Value |
---|---|
FR extends boolean | false |
Parameters
Parameter | Type |
---|---|
body | Omit <APIInteractionResponseCallbackData , "components" | "embeds" | "poll" > & SendResolverProps |
fetchReply ? | FR |
Returns
Promise
<When
<FR
, WebhookMessage
, void
| WebhookMessage
>>