Skip to content

Commit

Permalink
feat(Webhook): add Edit Webhook Message result and error 50027 (#71)
Browse files Browse the repository at this point in the history
  • Loading branch information
advaith1 committed Jan 26, 2021
1 parent 84759d1 commit 4c77a5d
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
2 changes: 2 additions & 0 deletions common/index.ts
Expand Up @@ -87,6 +87,8 @@ export const enum RESTJSONErrorCodes {
CannotExecuteActionOnThisChannelType = 50024,
InvalidOauth2AccessToken,

InvalidWebhookToken = 50027,

InvalidRecipients = 50033,
OneOfTheMessagesProvidedWasTooOldForBulkDelete,
InvalidFormBodyOrContentType,
Expand Down
8 changes: 8 additions & 0 deletions v8/rest/webhook.ts
Expand Up @@ -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
*/
Expand Down

0 comments on commit 4c77a5d

Please sign in to comment.