mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-12 01:23:31 +01:00
fix(api): various fixes for overlooked stuff (#9588)
* types(GuildsAPI): fix `getWidgetSettings()` result type * types(GuildsAPI): fix `beginPrune()` result type * types(GuildsAPI): fix `editAutoModerationRule()` result type * types(ApplicationCommandsAPI): fix guild application types * types(GuildsAPI): fix `createTemplate()` body type * fix(InteractionsAPI): make `followUp()` return the message According to the Discord docs, creating a followup message is the same as executing a webhook, but *wait is always true*, meaning we always get the message. * types(WebhooksAPI): fix result types
This commit is contained in:
@@ -4,17 +4,17 @@ import { makeURLSearchParams, type RequestData, type RawFile, type REST } from '
|
||||
import {
|
||||
Routes,
|
||||
type RESTGetAPIWebhookWithTokenMessageQuery,
|
||||
type RESTGetAPIChannelMessageResult,
|
||||
type RESTGetAPIWebhookWithTokenMessageResult,
|
||||
type RESTGetAPIWebhookResult,
|
||||
type RESTPatchAPIWebhookJSONBody,
|
||||
type RESTPatchAPIWebhookResult,
|
||||
type RESTPatchAPIWebhookWithTokenMessageJSONBody,
|
||||
type RESTPatchAPIWebhookWithTokenMessageResult,
|
||||
type RESTPostAPIChannelWebhookJSONBody,
|
||||
type RESTPostAPIChannelWebhookResult,
|
||||
type RESTPostAPIWebhookWithTokenGitHubQuery,
|
||||
type RESTPostAPIWebhookWithTokenJSONBody,
|
||||
type RESTPostAPIWebhookWithTokenQuery,
|
||||
type RESTPostAPIWebhookWithTokenResult,
|
||||
type RESTPostAPIWebhookWithTokenSlackQuery,
|
||||
type RESTPostAPIWebhookWithTokenWaitResult,
|
||||
type Snowflake,
|
||||
@@ -53,7 +53,7 @@ export class WebhooksAPI {
|
||||
reason,
|
||||
body,
|
||||
signal,
|
||||
}) as Promise<RESTPostAPIWebhookWithTokenResult>;
|
||||
}) as Promise<RESTPostAPIChannelWebhookResult>;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -225,7 +225,7 @@ export class WebhooksAPI {
|
||||
query: makeURLSearchParams(query),
|
||||
auth: false,
|
||||
signal,
|
||||
}) as Promise<RESTGetAPIChannelMessageResult>;
|
||||
}) as Promise<RESTGetAPIWebhookWithTokenMessageResult>;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user