This is a super simple global chat discord bot, this bot is used for you and your guid members to have conversations corss-server, setup is easy, what are you waiting for!
Everytime the bot receives a message, it just prints an error without doing anything in the chat.
(node:72750) UnhandledPromiseRejectionWarning: TypeError: fields.flat is not a function
at Function.normalizeFields (/home/shmail/Schreibtisch/globalbottest1/Discord-Global-Chat-Bot/node_modules/discord.js/src/structures/MessageEmbed.js:443:8)
at MessageEmbed.addFields (/home/shmail/Schreibtisch/globalbottest1/Discord-Global-Chat-Bot/node_modules/discord.js/src/structures/MessageEmbed.js:259:42)
at MessageEmbed.addField (/home/shmail/Schreibtisch/globalbottest1/Discord-Global-Chat-Bot/node_modules/discord.js/src/structures/MessageEmbed.js:250:17)
at Client.client.on (/home/shmail/Schreibtisch/globalbottest1/Discord-Global-Chat-Bot/index.js:40:8)
at Client.emit (events.js:203:15)
at MessageCreateAction.handle (/home/shmail/Schreibtisch/globalbottest1/Discord-Global-Chat-Bot/node_modules/discord.js/src/client/actions/MessageCreate.js:31:14)
at Object.module.exports [as MESSAGE_CREATE] (/home/shmail/Schreibtisch/globalbottest1/Discord-Global-Chat-Bot/node_modules/discord.js/src/client/websocket/handlers/MESSAGE_CREATE.js:4:32)
at WebSocketManager.handlePacket (/home/shmail/Schreibtisch/globalbottest1/Discord-Global-Chat-Bot/node_modules/discord.js/src/client/websocket/WebSocketManager.js:386:31)
at WebSocketShard.onPacket (/home/shmail/Schreibtisch/globalbottest1/Discord-Global-Chat-Bot/node_modules/discord.js/src/client/websocket/WebSocketShard.js:436:22)
at WebSocketShard.onMessage (/home/shmail/Schreibtisch/globalbottest1/Discord-Global-Chat-Bot/node_modules/discord.js/src/client/websocket/WebSocketShard.js:293:10)
(node:72750) 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: 17)
Everytime the bot receives a message, it just prints an error without doing anything in the chat.
EDIT: Upgrading to NodeJS 12 didnt fix issue.