feat(Webhook): add Edit Webhook Message result and error 50027 (#71)

This commit is contained in:
Advaith
2021-01-26 11:59:23 -08:00
committed by GitHub
parent 84759d19bc
commit 4c77a5d90a
2 changed files with 10 additions and 0 deletions

View File

@@ -87,6 +87,8 @@ export const enum RESTJSONErrorCodes {
CannotExecuteActionOnThisChannelType = 50024,
InvalidOauth2AccessToken,
InvalidWebhookToken = 50027,
InvalidRecipients = 50033,
OneOfTheMessagesProvidedWasTooOldForBulkDelete,
InvalidFormBodyOrContentType,

View File

@@ -207,12 +207,20 @@ export type RESTPatchAPIWebhookWithTokenMessageJSONBody = Nullable<
Pick<RESTPostAPIWebhookWithTokenJSONBody, 'content' | 'embeds' | 'allowed_mentions'>
>;
/**
* 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
*/