From 6f96cf7325fd9e9fd34cef6b3776d8c581860334 Mon Sep 17 00:00:00 2001 From: Gus Caplan Date: Sat, 29 Apr 2017 18:36:26 -0500 Subject: [PATCH] Use Target variables for consistency (#1431) --- src/structures/GuildAuditLogs.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/structures/GuildAuditLogs.js b/src/structures/GuildAuditLogs.js index d83b44fb6618..509c3e62a5a0 100644 --- a/src/structures/GuildAuditLogs.js +++ b/src/structures/GuildAuditLogs.js @@ -164,19 +164,19 @@ class GuildAuditLogsEntry { */ this.id = data.id; - if (['USER', 'GUILD'].includes(targetType)) { + if ([Targets.USER, Targets.GUILD].includes(targetType)) { /** * Target of this entry - * @type {?Guild|User|Role|Emoji|Promise|Promise} + * @type {?Guild|User|Role|Emoji|Invite|Webhook} */ this.target = guild.client[`${targetType.toLowerCase()}s`].get(data.target_id); - } else if (targetType === 'WEBHOOK') { + } else if (targetType === Targets.WEBHOOK) { this.target = guild.fetchWebhooks() .then(hooks => { this.target = hooks.find(h => h.id === data.target_id); return this.target; }); - } else if (targetType === 'INVITE') { + } else if (targetType === Targets.INVITE) { const change = this.changes.find(c => c.name === 'code'); this.target = guild.fetchInvites() .then(invites => {