Home > Blockchain >  Discord.js Sorting Array Of Objects glitching text
Discord.js Sorting Array Of Objects glitching text

Time:07-23

I have this code where I shuffle an array, and display the first 16 values in a discord.js embed:

const items = require('../schemas/gameSchema');
const items0 = await items.find();
var shuffle = require('shuffle-array');

const items1 = shuffle(items0);

const lb = items1
  .slice(0)
  .map(
    ({ DepositAmount, BetAmount, GameName, TotalPlays }, pos) =>
      `**${GameName}** \n Initial Deposit Amount: **${commaNumber(
        DepositAmount,
      )}** <:bob:809551218217058354> \n Bet Amount:  **${commaNumber(
        BetAmount,
      )}** <:bob:809551218217058354> \n Total Game Plays : ${commaNumber(
        TotalPlays,
      )}            
  • Related