mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-10 08:33:30 +01:00
refactor: change parameter names
This commit is contained in:
@@ -94,9 +94,9 @@ class ReactionCollector extends Collector {
|
||||
this.users.set(user.id, user);
|
||||
});
|
||||
|
||||
this.on('remove', (reaction, user) => {
|
||||
this.on('remove', (_reaction, user) => {
|
||||
this.total--;
|
||||
if (!this.collected.some(users => users.cache.has(user.id))) this.users.delete(user.id);
|
||||
if (!this.collected.some(reaction => reaction.users.cache.has(user.id))) this.users.delete(user.id);
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -22,9 +22,7 @@ class StickerPack extends Base {
|
||||
* The stickers in the pack
|
||||
* @type {Collection<Snowflake, Sticker>}
|
||||
*/
|
||||
this.stickers = new Collection(
|
||||
pack.stickers.map(stickerPack => [stickerPack.id, new Sticker(client, stickerPack)]),
|
||||
);
|
||||
this.stickers = new Collection(pack.stickers.map(sticker => [sticker.id, new Sticker(client, sticker)]));
|
||||
|
||||
/**
|
||||
* The name of the sticker pack
|
||||
|
||||
@@ -165,9 +165,7 @@ class BitField {
|
||||
if (typeof DefaultBit === typeof bit && bit >= DefaultBit) return bit;
|
||||
if (bit instanceof BitField) return bit.bitfield;
|
||||
if (Array.isArray(bit)) {
|
||||
return bit
|
||||
.map(permission => this.resolve(permission))
|
||||
.reduce((prev, permission) => prev | permission, DefaultBit);
|
||||
return bit.map(bit_ => this.resolve(bit_)).reduce((prev, bit_) => prev | bit_, DefaultBit);
|
||||
}
|
||||
if (typeof bit === 'string') {
|
||||
if (!isNaN(bit)) return typeof DefaultBit === 'bigint' ? BigInt(bit) : Number(bit);
|
||||
|
||||
Reference in New Issue
Block a user