fix: transformers types

This commit is contained in:
MARCROCK22 2024-12-30 20:13:20 -04:00
parent aa7be2aa71
commit 250346fe1d
5 changed files with 8 additions and 6 deletions

View File

@ -136,9 +136,11 @@ export class CommandContext<
return this.write(body as InteractionCreateBodyRequest, withResponse);
}
followup(body: MessageWebhookCreateBodyRequest) {
followup(
body: MessageWebhookCreateBodyRequest,
): Promise<If<InferWithPrefix, WebhookMessageStructure | MessageStructure, WebhookMessageStructure>> {
if (this.interaction) return this.interaction.followup(body);
return this.messageResponse!.reply(body);
return this.messageResponse!.reply(body) as never;
}
async fetchResponse(): Promise<

View File

@ -78,7 +78,7 @@ export class EntryPointContext<M extends keyof RegisteredMiddlewares = never> ex
return this.interaction.editOrReply<WR>(body as InteractionCreateBodyRequest, withResponse);
}
followup(body: MessageWebhookCreateBodyRequest) {
followup(body: MessageWebhookCreateBodyRequest): Promise<WebhookMessageStructure> {
return this.interaction.followup(body);
}

View File

@ -102,7 +102,7 @@ export class MenuCommandContext<
return this.interaction.editOrReply<WR>(body as InteractionCreateBodyRequest, withResponse);
}
followup(body: MessageWebhookCreateBodyRequest) {
followup(body: MessageWebhookCreateBodyRequest): Promise<WebhookMessageStructure> {
return this.interaction.followup(body);
}

View File

@ -131,7 +131,7 @@ export class ComponentContext<
return this.interaction.editOrReply<FR>(body as InteractionCreateBodyRequest, fetchReply);
}
followup(body: MessageWebhookCreateBodyRequest) {
followup(body: MessageWebhookCreateBodyRequest): Promise<WebhookMessageStructure> {
return this.interaction.followup(body);
}

View File

@ -100,7 +100,7 @@ export class ModalContext<M extends keyof RegisteredMiddlewares = never> extends
return this.interaction.editOrReply<FR>(body as InteractionCreateBodyRequest, fetchReply);
}
followup(body: MessageWebhookCreateBodyRequest) {
followup(body: MessageWebhookCreateBodyRequest): Promise<WebhookMessageStructure> {
return this.interaction.followup(body);
}