From 4c77a5d90acf627574eff571a92a6703c6ea2d13 Mon Sep 17 00:00:00 2001 From: Advaith Date: Tue, 26 Jan 2021 11:59:23 -0800 Subject: [PATCH] feat(Webhook): add Edit Webhook Message result and error 50027 (#71) --- common/index.ts | 2 ++ v8/rest/webhook.ts | 8 ++++++++ 2 files changed, 10 insertions(+) diff --git a/common/index.ts b/common/index.ts index 73280d01f..b59b4ad48 100644 --- a/common/index.ts +++ b/common/index.ts @@ -87,6 +87,8 @@ export const enum RESTJSONErrorCodes { CannotExecuteActionOnThisChannelType = 50024, InvalidOauth2AccessToken, + InvalidWebhookToken = 50027, + InvalidRecipients = 50033, OneOfTheMessagesProvidedWasTooOldForBulkDelete, InvalidFormBodyOrContentType, diff --git a/v8/rest/webhook.ts b/v8/rest/webhook.ts index bc1135b72..98df6f88c 100644 --- a/v8/rest/webhook.ts +++ b/v8/rest/webhook.ts @@ -207,12 +207,20 @@ export type RESTPatchAPIWebhookWithTokenMessageJSONBody = Nullable< Pick >; +/** + * https://discord.com/developers/docs/resources/webhook#edit-webhook-message + */ export type RESTPatchAPIWebhookWithTokenMessageFormDataBody = | { payload_json: string; } | RESTPatchAPIWebhookWithTokenMessageJSONBody; +/** + * https://discord.com/developers/docs/resources/webhook#edit-webhook-message + */ +export type RESTPatchAPIWebhookWithTokenMessageResult = APIMessage; + /** * https://discord.com/developers/docs/resources/webhook#delete-webhook-message */