Open ejsoftcom opened 2 years ago
I have the same issue. There is a function fetchMessageFiles
in the file slack2discord/src/commands/sendMessages.js
which calls new MessageAttachment()
. It seems according to changelog of the module discord.js
it was refactored and they use Attachment
now. https://github.com/discordjs/discord.js/commit/ab4c608b97ff319935e1a7f23564622bfd7ddd57
[ERR] TypeError: MessageAttachment is not a constructor
[ERR] TypeError: MessageAttachment is not a constructor
[ERR] TypeError: MessageAttachment is not a constructor
[ERR] TypeError: MessageAttachment is not a constructor
[ERR] TypeError: MessageAttachment is not a constructor
[ERR] TypeError: MessageAttachment is not a constructor
[ERR] TypeError: MessageAttachment is not a constructor
[ERR] TypeError: MessageAttachment is not a constructor
[ERR] TypeError: MessageAttachment is not a constructor
[ERR] TypeError: MessageAttachment is not a constructor
[ERR] TypeError: MessageAttachment is not a constructor
[ERR] TypeError: MessageAttachment is not a constructor
[ERR] TypeError: MessageAttachment is not a constructor
[ERR] TypeError: MessageAttachment is not a constructor
[ERR] TypeError: MessageAttachment is not a constructor
[ERR] TypeError: MessageAttachment is not a constructor
[ERR] TypeError: MessageAttachment is not a constructor
[ERR] TypeError: MessageAttachment is not a constructor
[ERR] TypeError: MessageAttachment is not a constructor
[ERR] TypeError: MessageAttachment is not a constructor
[ERR] TypeError: MessageAttachment is not a constructor
[ERR] TypeError: MessageAttachment is not a constructor
node:events:491 throw er; // Unhandled 'error' event ^
TypeError: Cannot read properties of undefined (reading 'id') at C:\Users\shine\AppData\Roaming\npm\node_modules\slack2discord\src\commands\sendMessages.js:106:74 at Array.reduce ()
at getFilesById (C:\Users\shine\AppData\Roaming\npm\node_modules\slack2discord\src\commands\sendMessages.js:106:42)
at processTicksAndRejections (node:internal/process/task_queues:96:5)
at async sendToDiscord (C:\Users\shine\AppData\Roaming\npm\node_modules\slack2discord\src\commands\sendMessages.js:65:23)
at async Client. (C:\Users\shine\AppData\Roaming\npm\node_modules\slack2discord\src\commands\sendMessages.js:25:7)
Emitted 'error' event on Client instance at:
at emitUnhandledRejectionOrErr (node:events:394:10)
at processTicksAndRejections (node:internal/process/task_queues:85:21)