chore(deps): update deps and fix lint (#3833)

This commit is contained in:
Crawl
2020-02-24 23:14:31 +01:00
committed by GitHub
parent c1d396a6c4
commit 3a0470b45c
12 changed files with 39 additions and 38 deletions

View File

@@ -616,7 +616,7 @@ class Guild extends Base {
user: this.client.users.add(ban.user),
});
return collection;
}, new Collection())
}, new Collection()),
);
}
@@ -634,7 +634,7 @@ class Guild extends Base {
return this.client.api.guilds(this.id).integrations.get().then(data =>
data.reduce((collection, integration) =>
collection.set(integration.id, new Integration(this.client, integration, this)),
new Collection())
new Collection()),
);
}
@@ -1086,7 +1086,7 @@ class Guild extends Base {
this.client.actions.GuildChannelsPositionUpdate.handle({
guild_id: this.id,
channels: updatedChannels,
}).guild
}).guild,
);
}
@@ -1120,7 +1120,7 @@ class Guild extends Base {
this.client.actions.GuildRolePositionUpdate.handle({
guild_id: this.id,
roles: rolePositions,
}).guild
}).guild,
);
}
@@ -1250,7 +1250,7 @@ class Guild extends Base {
_sortedChannels(channel) {
const category = channel.type === ChannelTypes.CATEGORY;
return Util.discordSort(this.channels.cache.filter(c =>
c.type === channel.type && (category || c.parent === channel.parent)
c.type === channel.type && (category || c.parent === channel.parent),
));
}
}

View File

@@ -375,6 +375,7 @@ class GuildChannel extends Channel {
*/
setParent(channel, { lockPermissions = true, reason } = {}) {
return this.edit({
// eslint-disable-next-line no-prototype-builtins
parentID: channel !== null ? channel.hasOwnProperty('id') ? channel.id : channel : null,
lockPermissions,
}, reason);

View File

@@ -108,7 +108,7 @@ class Message extends Base {
if (data.attachments) {
for (const attachment of data.attachments) {
this.attachments.set(attachment.id, new MessageAttachment(
attachment.url, attachment.filename, attachment
attachment.url, attachment.filename, attachment,
));
}
}
@@ -230,7 +230,7 @@ class Message extends Base {
this.attachments = new Collection();
for (const attachment of data.attachments) {
this.attachments.set(attachment.id, new MessageAttachment(
attachment.url, attachment.filename, attachment
attachment.url, attachment.filename, attachment,
));
}
} else {
@@ -242,7 +242,7 @@ class Message extends Base {
'mentions' in data ? data.mentions : this.mentions.users,
'mentions_roles' in data ? data.mentions_roles : this.mentions.roles,
'mention_everyone' in data ? data.mention_everyone : this.mentions.everyone,
'mention_channels' in data ? data.mention_channels : this.mentions.crosspostedChannels
'mention_channels' in data ? data.mention_channels : this.mentions.crosspostedChannels,
);
this.flags = new MessageFlags('flags' in data ? data.flags : 0).freeze();
@@ -511,7 +511,7 @@ class Message extends Base {
reply(content, options) {
return this.channel.send(content instanceof APIMessage ?
content :
APIMessage.transformOptions(content, options, { reply: this.member || this.author })
APIMessage.transformOptions(content, options, { reply: this.member || this.author }),
);
}

View File

@@ -300,7 +300,7 @@ class TextBasedChannel {
let messageIDs = messages instanceof Collection ? messages.keyArray() : messages.map(m => m.id || m);
if (filterOld) {
messageIDs = messageIDs.filter(id =>
Date.now() - Snowflake.deconstruct(id).date.getTime() < 1209600000
Date.now() - Snowflake.deconstruct(id).date.getTime() < 1209600000,
);
}
if (messageIDs.length === 0) return new Collection();
@@ -336,7 +336,7 @@ class TextBasedChannel {
'typing',
'typingCount',
'createMessageCollector',
'awaitMessages'
'awaitMessages',
);
}
for (const prop of props) {