Webpack build for branch master: 6f96cf7325

This commit is contained in:
Travis CI 2017-04-29 23:38:59 +00:00
parent 179cd0239f
commit 50a5032d8b
2 changed files with 5 additions and 5 deletions

View file

@ -26366,19 +26366,19 @@ class GuildAuditLogsEntry {
*/ */
this.id = data.id; this.id = data.id;
if (['USER', 'GUILD'].includes(targetType)) { if ([Targets.USER, Targets.GUILD].includes(targetType)) {
/** /**
* Target of this entry * Target of this entry
* @type {?Guild|User|Role|Emoji|Promise<Invite>|Promise<Webhook>} * @type {?Guild|User|Role|Emoji|Invite|Webhook}
*/ */
this.target = guild.client[`${targetType.toLowerCase()}s`].get(data.target_id); this.target = guild.client[`${targetType.toLowerCase()}s`].get(data.target_id);
} else if (targetType === 'WEBHOOK') { } else if (targetType === Targets.WEBHOOK) {
this.target = guild.fetchWebhooks() this.target = guild.fetchWebhooks()
.then(hooks => { .then(hooks => {
this.target = hooks.find(h => h.id === data.target_id); this.target = hooks.find(h => h.id === data.target_id);
return this.target; return this.target;
}); });
} else if (targetType === 'INVITE') { } else if (targetType === Targets.INVITE) {
const change = this.changes.find(c => c.name === 'code'); const change = this.changes.find(c => c.name === 'code');
this.target = guild.fetchInvites() this.target = guild.fetchInvites()
.then(invites => { .then(invites => {

File diff suppressed because one or more lines are too long