Skip to content

Commit

Permalink
refactor: change parameter names
Browse files Browse the repository at this point in the history
  • Loading branch information
sdanialraza committed Sep 18, 2023
1 parent 260db6e commit fb602c7
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 6 deletions.
4 changes: 1 addition & 3 deletions packages/discord.js/src/structures/StickerPack.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 1 addition & 3 deletions packages/discord.js/src/util/BitField.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit fb602c7

Please sign in to comment.