mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-10 08:33:30 +01:00
refactor: switch api and gateway to V8 (#4879)
Co-authored-by: Jan <66554238+Vaporox@users.noreply.github.com>
This commit is contained in:
@@ -3,7 +3,7 @@
|
||||
const Integration = require('./Integration');
|
||||
const Webhook = require('./Webhook');
|
||||
const Collection = require('../util/Collection');
|
||||
const { PartialTypes } = require('../util/Constants');
|
||||
const { OverwriteTypes, PartialTypes } = require('../util/Constants');
|
||||
const Permissions = require('../util/Permissions');
|
||||
const Snowflake = require('../util/Snowflake');
|
||||
const Util = require('../util/Util');
|
||||
@@ -384,16 +384,19 @@ class GuildAuditLogsEntry {
|
||||
case Actions.CHANNEL_OVERWRITE_CREATE:
|
||||
case Actions.CHANNEL_OVERWRITE_UPDATE:
|
||||
case Actions.CHANNEL_OVERWRITE_DELETE:
|
||||
switch (data.options.type) {
|
||||
case 'member':
|
||||
this.extra = guild.members.cache.get(data.options.id) || { id: data.options.id, type: 'member' };
|
||||
break;
|
||||
|
||||
case 'role':
|
||||
switch (Number(data.options.type)) {
|
||||
case OverwriteTypes.role:
|
||||
this.extra = guild.roles.cache.get(data.options.id) || {
|
||||
id: data.options.id,
|
||||
name: data.options.role_name,
|
||||
type: 'role',
|
||||
type: OverwriteTypes[OverwriteTypes.role],
|
||||
};
|
||||
break;
|
||||
|
||||
case OverwriteTypes.member:
|
||||
this.extra = guild.members.cache.get(data.options.id) || {
|
||||
id: data.options.id,
|
||||
type: OverwriteTypes[OverwriteTypes.member],
|
||||
};
|
||||
break;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user