Sopur / Discord-user-bots

Working discord user bots library.
MIT License
81 stars 35 forks source link

How to send a file? #36

Closed Oyo-Player closed 2 months ago

Oyo-Player commented 1 year ago

I'm trying to send a .txt file but everytime I try it's return an error (which I don't understand). Does someone know how to send a file?

Sopur commented 1 year ago

What is the error you're receiving? What's the code you're using to send a .txt file?

Oyo-Player commented 1 year ago

Oh sorry I didn't saw the comment. Here's the error:

node:internal/deps/undici/undici:11118
    Error.captureStackTrace(err, this);
          ^

TypeError: fetch failed
    at Object.fetch (node:internal/deps/undici/undici:11118:11)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5) {
  cause: TypeError: object2 is not iterable
      at action (node:internal/deps/undici/undici:5969:39)
      at action.next (<anonymous>)
      at Object.pull (node:internal/deps/undici/undici:6017:52)
      at ensureIsPromise (node:internal/webstreams/util:205:19)
      at readableStreamDefaultControllerCallPullIfNeeded (node:internal/webstreams/readablestream:2229:5)
      at node:internal/webstreams/readablestream:2319:7
      at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
}
Sopur commented 1 year ago

Can you please also provide the code you used to send your .txt file?