mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-19 04:53:30 +01:00
feat(InteractionResponses): add message parameter (v13) (#8838)
Co-authored-by: MrMythicalYT <91077061+MrMythicalYT@users.noreply.github.com> Co-authored-by: Noel <buechler.noel@outlook.com>
This commit is contained in:
27
typings/index.d.ts
vendored
27
typings/index.d.ts
vendored
@@ -354,11 +354,11 @@ export interface InteractionResponseFields<Cached extends CacheType = CacheType>
|
||||
webhook: InteractionWebhook;
|
||||
reply(options: InteractionReplyOptions & { fetchReply: true }): Promise<GuildCacheMessage<Cached>>;
|
||||
reply(options: string | MessagePayload | InteractionReplyOptions): Promise<void>;
|
||||
deleteReply(): Promise<void>;
|
||||
editReply(options: string | MessagePayload | WebhookEditMessageOptions): Promise<GuildCacheMessage<Cached>>;
|
||||
deleteReply(message?: MessageResolvable | '@original'): Promise<void>;
|
||||
editReply(options: string | MessagePayload | InteractionEditReplyOptions): Promise<GuildCacheMessage<Cached>>;
|
||||
deferReply(options: InteractionDeferReplyOptions & { fetchReply: true }): Promise<GuildCacheMessage<Cached>>;
|
||||
deferReply(options?: InteractionDeferReplyOptions): Promise<void>;
|
||||
fetchReply(): Promise<GuildCacheMessage<Cached>>;
|
||||
fetchReply(message?: MessageResolvable | '@original'): Promise<GuildCacheMessage<Cached>>;
|
||||
followUp(options: string | MessagePayload | InteractionReplyOptions): Promise<GuildCacheMessage<Cached>>;
|
||||
}
|
||||
|
||||
@@ -394,9 +394,9 @@ export abstract class BaseCommandInteraction<Cached extends CacheType = CacheTyp
|
||||
public inRawGuild(): this is BaseCommandInteraction<'raw'>;
|
||||
public deferReply(options: InteractionDeferReplyOptions & { fetchReply: true }): Promise<GuildCacheMessage<Cached>>;
|
||||
public deferReply(options?: InteractionDeferReplyOptions): Promise<void>;
|
||||
public deleteReply(): Promise<void>;
|
||||
public editReply(options: string | MessagePayload | WebhookEditMessageOptions): Promise<GuildCacheMessage<Cached>>;
|
||||
public fetchReply(): Promise<GuildCacheMessage<Cached>>;
|
||||
public deleteReply(message?: MessageResolvable | '@original'): Promise<void>;
|
||||
public editReply(options: string | MessagePayload | InteractionEditReplyOptions): Promise<GuildCacheMessage<Cached>>;
|
||||
public fetchReply(message?: MessageResolvable | '@original'): Promise<GuildCacheMessage<Cached>>;
|
||||
public followUp(options: string | MessagePayload | InteractionReplyOptions): Promise<GuildCacheMessage<Cached>>;
|
||||
public reply(options: InteractionReplyOptions & { fetchReply: true }): Promise<GuildCacheMessage<Cached>>;
|
||||
public reply(options: string | MessagePayload | InteractionReplyOptions): Promise<void>;
|
||||
@@ -1721,9 +1721,9 @@ export class MessageComponentInteraction<Cached extends CacheType = CacheType> e
|
||||
public deferReply(options?: InteractionDeferReplyOptions): Promise<void>;
|
||||
public deferUpdate(options: InteractionDeferUpdateOptions & { fetchReply: true }): Promise<GuildCacheMessage<Cached>>;
|
||||
public deferUpdate(options?: InteractionDeferUpdateOptions): Promise<void>;
|
||||
public deleteReply(): Promise<void>;
|
||||
public editReply(options: string | MessagePayload | WebhookEditMessageOptions): Promise<GuildCacheMessage<Cached>>;
|
||||
public fetchReply(): Promise<GuildCacheMessage<Cached>>;
|
||||
public deleteReply(message?: MessageResolvable | '@original'): Promise<void>;
|
||||
public editReply(options: string | MessagePayload | InteractionEditReplyOptions): Promise<GuildCacheMessage<Cached>>;
|
||||
public fetchReply(message?: MessageResolvable | '@original'): Promise<GuildCacheMessage<Cached>>;
|
||||
public followUp(options: string | MessagePayload | InteractionReplyOptions): Promise<GuildCacheMessage<Cached>>;
|
||||
public reply(options: InteractionReplyOptions & { fetchReply: true }): Promise<GuildCacheMessage<Cached>>;
|
||||
public reply(options: string | MessagePayload | InteractionReplyOptions): Promise<void>;
|
||||
@@ -1954,13 +1954,13 @@ export class ModalSubmitInteraction<Cached extends CacheType = CacheType> extend
|
||||
public webhook: InteractionWebhook;
|
||||
public reply(options: InteractionReplyOptions & { fetchReply: true }): Promise<GuildCacheMessage<Cached>>;
|
||||
public reply(options: string | MessagePayload | InteractionReplyOptions): Promise<void>;
|
||||
public deleteReply(): Promise<void>;
|
||||
public editReply(options: string | MessagePayload | WebhookEditMessageOptions): Promise<GuildCacheMessage<Cached>>;
|
||||
public deleteReply(message?: MessageResolvable | '@original'): Promise<void>;
|
||||
public editReply(options: string | MessagePayload | InteractionEditReplyOptions): Promise<GuildCacheMessage<Cached>>;
|
||||
public deferReply(options: InteractionDeferReplyOptions & { fetchReply: true }): Promise<GuildCacheMessage<Cached>>;
|
||||
public deferReply(options?: InteractionDeferReplyOptions): Promise<void>;
|
||||
public deferUpdate(options: InteractionDeferUpdateOptions & { fetchReply: true }): Promise<GuildCacheMessage<Cached>>;
|
||||
public deferUpdate(options?: InteractionDeferUpdateOptions): Promise<void>;
|
||||
public fetchReply(): Promise<GuildCacheMessage<Cached>>;
|
||||
public fetchReply(message?: MessageResolvable | '@original'): Promise<GuildCacheMessage<Cached>>;
|
||||
public followUp(options: string | MessagePayload | InteractionReplyOptions): Promise<GuildCacheMessage<Cached>>;
|
||||
public inGuild(): this is ModalSubmitInteraction<'raw' | 'cached'>;
|
||||
public inCachedGuild(): this is ModalSubmitInteraction<'cached'>;
|
||||
@@ -6057,6 +6057,9 @@ export type WebhookEditMessageOptions = Pick<
|
||||
WebhookMessageOptions,
|
||||
'content' | 'embeds' | 'files' | 'allowedMentions' | 'components' | 'attachments' | 'threadId'
|
||||
>;
|
||||
export interface InteractionEditReplyOptions extends WebhookEditMessageOptions {
|
||||
message?: MessageResolvable | '@original';
|
||||
}
|
||||
|
||||
export interface WebhookFetchMessageOptions {
|
||||
cache?: boolean;
|
||||
|
||||
Reference in New Issue
Block a user