Attachments

do attachments not work? whenever i try one, it returns the error
node:events:491
      throw er; // Unhandled 'error' event
      ^

TypeError: Cannot use 'in' operator to search for 'size' in ../pepperbot/src/logs/errors.log
    at Attachment._patch (C:\Users\User\Desktop\VSCode projects\discordjs\pepperbot\node_modules\discord.js\src\structures\Attachment.js:34:16)
    at new Attachment (C:\Users\User\Desktop\VSCode projects\discordjs\pepperbot\node_modules\discord.js\src\structures\Attachment.js:24:10)
    at Object.execute (C:\Users\User\Desktop\VSCode projects\discordjs\pepperbot\src\commands\sendlog.js:20:24)
    at Client.<anonymous> (C:\Users\User\Desktop\VSCode projects\discordjs\pepperbot\src\index.js:78:34)
    at Client.emit (node:events:513:28)
    at MessageCreateAction.handle (C:\Users\User\Desktop\VSCode projects\discordjs\pepperbot\node_modules\discord.js\src\client\actions\MessageCreate.js:28:14)
    at module.exports [as MESSAGE_CREATE] (C:\Users\User\Desktop\VSCode projects\discordjs\pepperbot\node_modules\discord.js\src\client\websocket\handlers\MESSAGE_CREATE.js:4:32)
    at WebSocketManager.handlePacket (C:\Users\User\Desktop\VSCode projects\discordjs\pepperbot\node_modules\discord.js\src\client\websocket\WebSocketManager.js:355:31)
    at WebSocketManager.<anonymous> (C:\Users\User\Desktop\VSCode projects\discordjs\pepperbot\node_modules\discord.js\src\client\websocket\WebSocketManager.js:239:12)
    at WebSocketManager.emit (C:\Users\User\Desktop\VSCode projects\discordjs\pepperbot\node_modules\@vladfrangu\async_event_emitter\dist\index.js:282:31)
Emitted 'error' event on Client instance at:
    at emitUnhandledRejectionOrErr (node:events:394:10)
    at process.processTicksAndRejections (node:internal/process/task_queues:84:21)

Node.js v19.0.0
Was this page helpful?