Table Frame Problem
let ban = await message.guild.fetchBans().catch(error => { return message.channel.send('Извини, но у меня нет разрешений на просмотр банов!'); }); ban = ban.array(); let username = message.guild.fetchBans().id; arraySort(ban, 'size', { reverse: true }); let possiblebans = [ ['Пользователи', 'ID'] ]; ban.forEach(function(ban) { possiblebans.push([ban.username, ban.id]); }) const embed = new MessageEmbed() .setColor(0xCB5A5E) .addField('Блокировки', `\`\`\`${table.table(possiblebans)}\`\`\``); send(message.channel, embed, { name: 'Баны', icon: 'http://gaia.adage.com/images/bin/image/x-large/iStock47643841422.jpg' }); And when I try to run a command, I get the following error:
TypeError: Cannot set property '0' of undefined at chunkedValue.forEach (F: \ Projects \ JS \ JSBot \ node_modules \ table \ dist \ mapDataUsingRowHeightIndex.js: 49: 35) at Array.forEach () at cells.forEach (F : \ Projects \ JS \ JSBot \ node_modules \ table \ dist \ mapDataUsingRowHeightIndex.js: 48: 20) at Array.forEach () at unmappedRows.map. js: 39: 11) at Array.map () at exports.default (F: \ Projects \ JS \ JSBot \ node_modules \ table \ dist \ mapDataUsingRowHeightIndex.js: 30: 35) at Object.exports.default [as table] (F: \ Projects \ JS \ JSBot \ node_modules \ table \ dist \ table.js: 126: 51) at BansCommand.run (F: \ Projects \ JS \ JSBot \ src \ commands \ info \ bans.js: 40: 48) at