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:
David Malchin
2023-05-22 10:59:57 +03:00
committed by GitHub
parent 985def3f25
commit 6c7a5ed1e7
4 changed files with 33 additions and 20 deletions

View File

@@ -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>;
}
/**