Skip to content

Commit

Permalink
feat(GuildAuditLogs): add new event types (#3584)
Browse files Browse the repository at this point in the history
* adds more audit-log entries

this adds additional audit-log types from https://discord/discord-api-docs/pull/1191

* typings for new audit-log entries

* typings for new audit-log entries

* fix action numbers
  • Loading branch information
Fyko authored and SpaceEEC committed Nov 19, 2019
1 parent 1352bff commit 1bcc0c2
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 0 deletions.
18 changes: 18 additions & 0 deletions src/structures/GuildAuditLogs.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
*/

Expand All @@ -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,
Expand All @@ -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,
};


Expand Down
9 changes: 9 additions & 0 deletions typings/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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'
Expand Down

0 comments on commit 1bcc0c2

Please sign in to comment.