SudhanPlayz / Discord-MusicBot

An advanced discord music bot, supports Spotify, Soundcloud, YouTube with Shuffling, Volume Control and Web Dashboard with Slash Commands support!
https://musicbot.darrenofficial.com
Other
2.99k stars 2.9k forks source link

TypeError: fields.flat is not a function #618

Closed TypicalShavonne closed 2 years ago

TypicalShavonne commented 2 years ago

TypeError: fields.flat is not a function at Function.normalizeFields (/root/Discord-MusicBot/node_modules/discord.js/src/structures/MessageEmbed.js:450:8) at MessageEmbed.addFields (/root/Discord-MusicBot/node_modules/discord.js/src/structures/MessageEmbed.js:266:42) at MessageEmbed.addField (/root/Discord-MusicBot/node_modules/discord.js/src/structures/MessageEmbed.js:257:17) at Object.run (/root/Discord-MusicBot/commands/play.js:178:26) at process._tickCallback (internal/process/next_tick.js:68:7) (node:711858) UnhandledPromiseRejectionWarning: TypeError: fields.flat is not a function at Function.normalizeFields (/root/Discord-MusicBot/node_modules/discord.js/src/structures/MessageEmbed.js:450:8) at MessageEmbed.setup (/root/Discord-MusicBot/node_modules/discord.js/src/structures/MessageEmbed.js:78:91) at new MessageEmbed (/root/Discord-MusicBot/node_modules/discord.js/src/structures/MessageEmbed.js:18:10) at embedLikes.map.e (/root/Discord-MusicBot/node_modules/discord.js/src/structures/APIMessage.js:166:40) at Array.map () at APIMessage.resolveData (/root/Discord-MusicBot/node_modules/discord.js/src/structures/APIMessage.js:166:31) at TextChannel.send (/root/Discord-MusicBot/node_modules/discord.js/src/structures/interfaces/TextBasedChannel.js:166:62) at DiscordMusicBot.sendTime (/root/Discord-MusicBot/structures/DiscordMusicBot.js:256:13) at Object.run (/root/Discord-MusicBot/commands/play.js:197:21) at process._tickCallback (internal/process/next_tick.js:68:7) (node:711858) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1) (node:711858) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code. (node:711858) UnhandledPromiseRejectionWarning: TypeError: fields.flat is not a function at Function.normalizeFields (/root/Discord-MusicBot/node_modules/discord.js/src/structures/MessageEmbed.js:450:8) at MessageEmbed.addFields (/root/Discord-MusicBot/node_modules/discord.js/src/structures/MessageEmbed.js:266:42) at MessageEmbed.addField (/root/Discord-MusicBot/node_modules/discord.js/src/structures/MessageEmbed.js:257:17) at Manager.DiscordMusicBot.Manager.Manager.on.on.on (/root/Discord-MusicBot/structures/DiscordMusicBot.js:169:12) at Manager.emit (events.js:198:13) at Node.trackStart (/root/Discord-MusicBot/node_modules/erela.js/dist/structures/Node.js:260:22) at Node.handleEvent (/root/Discord-MusicBot/node_modules/erela.js/dist/structures/Node.js:238:18) at Node.message (/root/Discord-MusicBot/node_modules/erela.js/dist/structures/Node.js:222:22) at WebSocket.emit (events.js:198:13) at Receiver.receiverOnMessage (/root/Discord-MusicBot/node_modules/ws/lib/websocket.js:983:20) (node:711858) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 2)

JotaroKujo0525 commented 2 years ago

TypeError: fields.flat is not a function at Function.normalizeFields (/root/Discord-MusicBot/node_modules/discord.js/src/structures/MessageEmbed.js:450:8) at MessageEmbed.addFields (/root/Discord-MusicBot/node_modules/discord.js/src/structures/MessageEmbed.js:266:42) at MessageEmbed.addField (/root/Discord-MusicBot/node_modules/discord.js/src/structures/MessageEmbed.js:257:17) at Object.run (/root/Discord-MusicBot/commands/play.js:178:26) at process._tickCallback (internal/process/next_tick.js:68:7) (node:711858) UnhandledPromiseRejectionWarning: TypeError: fields.flat is not a function at Function.normalizeFields (/root/Discord-MusicBot/node_modules/discord.js/src/structures/MessageEmbed.js:450:8) at MessageEmbed.setup (/root/Discord-MusicBot/node_modules/discord.js/src/structures/MessageEmbed.js:78:91) at new MessageEmbed (/root/Discord-MusicBot/node_modules/discord.js/src/structures/MessageEmbed.js:18:10) at embedLikes.map.e (/root/Discord-MusicBot/node_modules/discord.js/src/structures/APIMessage.js:166:40) at Array.map () at APIMessage.resolveData (/root/Discord-MusicBot/node_modules/discord.js/src/structures/APIMessage.js:166:31) at TextChannel.send (/root/Discord-MusicBot/node_modules/discord.js/src/structures/interfaces/TextBasedChannel.js:166:62) at DiscordMusicBot.sendTime (/root/Discord-MusicBot/structures/DiscordMusicBot.js:256:13) at Object.run (/root/Discord-MusicBot/commands/play.js:197:21) at process._tickCallback (internal/process/next_tick.js:68:7) (node:711858) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1) (node:711858) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code. (node:711858) UnhandledPromiseRejectionWarning: TypeError: fields.flat is not a function at Function.normalizeFields (/root/Discord-MusicBot/node_modules/discord.js/src/structures/MessageEmbed.js:450:8) at MessageEmbed.addFields (/root/Discord-MusicBot/node_modules/discord.js/src/structures/MessageEmbed.js:266:42) at MessageEmbed.addField (/root/Discord-MusicBot/node_modules/discord.js/src/structures/MessageEmbed.js:257:17) at Manager.DiscordMusicBot.Manager.Manager.on.on.on (/root/Discord-MusicBot/structures/DiscordMusicBot.js:169:12) at Manager.emit (events.js:198:13) at Node.trackStart (/root/Discord-MusicBot/node_modules/erela.js/dist/structures/Node.js:260:22) at Node.handleEvent (/root/Discord-MusicBot/node_modules/erela.js/dist/structures/Node.js:238:18) at Node.message (/root/Discord-MusicBot/node_modules/erela.js/dist/structures/Node.js:222:22) at WebSocket.emit (events.js:198:13) at Receiver.receiverOnMessage (/root/Discord-MusicBot/node_modules/ws/lib/websocket.js:983:20) (node:711858) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 2)

Upgrade your node version, recommended is 12 and 14