From 1bcc0c2e1d7a8824529e63bee304ad1cb54ddfe3 Mon Sep 17 00:00:00 2001 From: Carter <45381083+Fyko@users.noreply.github.com> Date: Tue, 19 Nov 2019 13:51:26 -0700 Subject: [PATCH] feat(GuildAuditLogs): add new event types (#3584) * adds more audit-log entries this adds additional audit-log types from https://discordapp/discord-api-docs/pull/1191 * typings for new audit-log entries * typings for new audit-log entries * fix action numbers --- src/structures/GuildAuditLogs.js | 18 ++++++++++++++++++ typings/index.d.ts | 9 +++++++++ 2 files changed, 27 insertions(+) diff --git a/src/structures/GuildAuditLogs.js b/src/structures/GuildAuditLogs.js index 924219194238..53494fa45247 100644 --- a/src/structures/GuildAuditLogs.js +++ b/src/structures/GuildAuditLogs.js @@ -53,6 +53,9 @@ const Targets = { * * MEMBER_BAN_REMOVE: 23 * * MEMBER_UPDATE: 24 * * MEMBER_ROLE_UPDATE: 25 + * * MEMBER_MOVE: 26 + * * MEMBER_DISCONNECT: 27 + * * BOT_ADD: 28, * * ROLE_CREATE: 30 * * ROLE_UPDATE: 31 * * ROLE_DELETE: 32 @@ -66,6 +69,12 @@ const Targets = { * * EMOJI_UPDATE: 61 * * EMOJI_DELETE: 62 * * MESSAGE_DELETE: 72 + * * MESSAGE_BULK_DELETE: 73 + * * MESSAGE_PIN: 74 + * * MESSAGE_UNPIN: 75 + * * INTEGRATION_CREATE: 80 + * * INTEGRATION_UPDATE: 81 + * * INTEGRATION_DELETE: 82 * @typedef {?number|string} AuditLogAction */ @@ -89,6 +98,9 @@ const Actions = { MEMBER_BAN_REMOVE: 23, MEMBER_UPDATE: 24, MEMBER_ROLE_UPDATE: 25, + MEMBER_MOVE: 26, + MEMBER_DISCONNECT: 27, + BOT_ADD: 28, ROLE_CREATE: 30, ROLE_UPDATE: 31, ROLE_DELETE: 32, @@ -102,6 +114,12 @@ const Actions = { EMOJI_UPDATE: 61, EMOJI_DELETE: 62, MESSAGE_DELETE: 72, + MESSAGE_BULK_DELETE: 73, + MESSAGE_PIN: 74, + MESSAGE_UNPIN: 75, + INTEGRATION_CREATE: 80, + INTEGRATION_UPDATE: 81, + INTEGRATION_DELETE: 82, }; diff --git a/typings/index.d.ts b/typings/index.d.ts index da78cc7e2d44..1da0d9d2da61 100644 --- a/typings/index.d.ts +++ b/typings/index.d.ts @@ -2188,6 +2188,9 @@ declare module 'discord.js' { MEMBER_BAN_REMOVE?: number; MEMBER_UPDATE?: number; MEMBER_ROLE_UPDATE?: number; + MEMBER_MOVE?: number; + MEMBER_DISCONNECT?: number; + BOT_ADD?: number; ROLE_CREATE?: number; ROLE_UPDATE?: number; ROLE_DELETE?: number; @@ -2201,6 +2204,12 @@ declare module 'discord.js' { EMOJI_UPDATE?: number; EMOJI_DELETE?: number; MESSAGE_DELETE?: number; + MESSAGE_BULK_DELETE?: number; + MESSAGE_PIN?: number; + MESSAGE_UNPIN?: number; + INTEGRATION_CREATE?: number; + INTEGRATION_UPDATE?: number; + INTEGRATION_DELETE?: number; } type GuildAuditLogsActionType = 'CREATE'