chore(Deps): upgrade deps (#4701)

This commit is contained in:
Noel
2020-08-14 21:46:23 +02:00
committed by GitHub
parent 178439ef8c
commit dea48d64a5
12 changed files with 11320 additions and 51 deletions

View File

@@ -18,9 +18,7 @@ const BeforeReadyWhitelist = [
WSEvents.GUILD_MEMBER_REMOVE,
];
const UNRECOVERABLE_CLOSE_CODES = Object.keys(WSCodes)
.slice(1)
.map(Number);
const UNRECOVERABLE_CLOSE_CODES = Object.keys(WSCodes).slice(1).map(Number);
const UNRESUMABLE_CLOSE_CODES = [1000, 4006, 4007];
/**

View File

@@ -121,10 +121,7 @@ class MessageManager extends BaseManager {
async delete(message, reason) {
message = this.resolveID(message);
if (message) {
await this.client.api
.channels(this.channel.id)
.messages(message)
.delete({ reason });
await this.client.api.channels(this.channel.id).messages(message).delete({ reason });
}
}

View File

@@ -74,10 +74,7 @@ class GuildEmoji extends BaseGuildEmoji {
throw new Error('MISSING_MANAGE_EMOJIS_PERMISSION', this.guild);
}
}
const data = await this.client.api
.guilds(this.guild.id)
.emojis(this.id)
.get();
const data = await this.client.api.guilds(this.guild.id).emojis(this.id).get();
this._patch(data);
return this.author;
}

View File

@@ -330,10 +330,7 @@ class TextBasedChannel {
}
if (messageIDs.length === 0) return new Collection();
if (messageIDs.length === 1) {
await this.client.api
.channels(this.id)
.messages(messageIDs[0])
.delete();
await this.client.api.channels(this.id).messages(messageIDs[0]).delete();
const message = this.client.actions.MessageDelete.getMessage(
{
message_id: messageIDs[0],

View File

@@ -64,9 +64,7 @@ class SnowflakeUtil {
* @returns {DeconstructedSnowflake} Deconstructed snowflake
*/
static deconstruct(snowflake) {
const BINARY = Util.idToBinary(snowflake)
.toString(2)
.padStart(64, '0');
const BINARY = Util.idToBinary(snowflake).toString(2).padStart(64, '0');
const res = {
timestamp: parseInt(BINARY.substring(0, 42), 2) + EPOCH,
workerID: parseInt(BINARY.substring(42, 47), 2),