mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-10 16:43:31 +01:00
chore(Deps): upgrade deps (#4701)
This commit is contained in:
@@ -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];
|
||||
|
||||
/**
|
||||
|
||||
@@ -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 });
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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],
|
||||
|
||||
@@ -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),
|
||||
|
||||
Reference in New Issue
Block a user