Skip to content

Commit

Permalink
Expose audit log events 83-85 (abalabahaha#1213)
Browse files Browse the repository at this point in the history
* Audit log types 83-85

* Update the comment
  • Loading branch information
bsian03 committed Aug 19, 2021
1 parent 840227e commit 1e4d78a
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 3 deletions.
3 changes: 3 additions & 0 deletions index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1139,6 +1139,9 @@ declare namespace Eris {
INTEGRATION_CREATE: 80;
INTEGRATION_UPDATE: 81;
INTEGRATION_DELETE: 82;
STAGE_INSTANCE_CREATE: 83;
STAGE_INSTANCE_UPDATE: 84;
STAGE_INSTANCE_DELETE: 85;
};
ChannelTypes: {
GUILD_TEXT: 0;
Expand Down
5 changes: 4 additions & 1 deletion lib/Constants.js
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,10 @@ module.exports.AuditLogActions = {

INTEGRATION_CREATE: 80,
INTEGRATION_UPDATE: 81,
INTEGRATION_DELETE: 82
INTEGRATION_DELETE: 82,
STAGE_INSTANCE_CREATE: 83,
STAGE_INSTANCE_UPDATE: 84,
STAGE_INSTANCE_DELETE: 85
};

module.exports.MessageActivityTypes = {
Expand Down
4 changes: 2 additions & 2 deletions lib/structures/GuildAuditLogEntry.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ const {AuditLogActions} = require("../Constants");
* For example, if a channel was renamed from #general to #potato, this would be `{name: "potato"}``
* @prop {Object?} before The properties of the targeted object before the action was taken
* For example, if a channel was renamed from #general to #potato, this would be `{name: "general"}``
* @prop {(CategoryChannel | TextChannel | VoiceChannel)?} channel The channel targeted in the entry, action types 26 (MEMBER_MOVE) and 72/74/75 (MESSAGE_DELETE/PIN/UNPIN) only
* @prop {(CategoryChannel | TextChannel | VoiceChannel | StageChannel)?} channel The channel targeted in the entry, action types 26 (MEMBER_MOVE), 72/74/75 (MESSAGE_DELETE/PIN/UNPIN), and 83-85 (STAGE\_INSTANCE\_CREATE/UPDATE/DELETE) only
* @prop {Number?} count The number of entities targeted
* For example, for action type 26 (MEMBER_MOVE), this is the number of members that were moved/disconnected from the voice channel
* @prop {Number?} deleteMemberDays The number of days of inactivity to prune for, action type 21 (MEMBER_PRUNE) only
Expand Down Expand Up @@ -119,7 +119,7 @@ class GuildAuditLogEntry extends Base {
return this.guild && this.guild.emojis.find((emoji) => emoji.id === this.targetID);
} else if(this.actionType < 80) { // Message
return this.guild && this.guild.shard.client.users.get(this.targetID);
} else if(this.actionType < 90) { // Integrations
} else if(this.actionType < 90) { // Integrations/Stage instances
return null;
} else {
throw new Error("Unrecognized action type: " + this.actionType);
Expand Down

0 comments on commit 1e4d78a

Please sign in to comment.