Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

322
Views
TypeError: The compressed data passed is corrupted

My Code :

const {Client} = require('discord.js');
const {DiscordSR} = require('discord-speech-recognition');

const client = new Client();
const discordSR = new DiscordSR(client);

client.on('message', (msg) => {
  if (msg.content.startsWith('!j') && msg.member?.voice.channel) {
    msg.member.voice.channel.join();
  }
});

client.on('message', (msg) => {
  if (msg.content.startsWith('!e') && msg.member?.voice.channel) {
    msg.member.voice.channel.leave();
  }
});

client.on('speech', (msg) => {
  const textChannel = client.channels.cache.get(`<channel ID>`);
  textChannel.send(msg.content);
});

client.login(token);

I am using Nodejs Version : 17.0.0 , Discord JS Version : 12.5.3 , @discordjs/opus Version : 0.6.0

The Error:

node:events:368
      throw er; // Unhandled 'error' event
      ^

TypeError: The compressed data passed is corrupted
    at Decoder._decode (C:\Users\ajhar\Desktop\melbot\node_modules\discord.js\node_modules\prism-media\src\opus\Opus.js:64:25)
    at Decoder._transform (C:\Users\ajhar\Desktop\melbot\node_modules\discord.js\node_modules\prism-media\src\opus\Opus.js:204:22)
    at Decoder.Transform._write (node:internal/streams/transform:184:23)
    at writeOrBuffer (node:internal/streams/writable:390:12)
    at _write (node:internal/streams/writable:331:10)
    at Decoder.Writable.write (node:internal/streams/writable:335:10)
    at Readable.ondata (node:internal/streams/readable:777:22)
    at Readable.emit (node:events:390:28)
    at addChunk (node:internal/streams/readable:324:12)
    at readableAddChunk (node:internal/streams/readable:297:9)
Emitted 'error' event on Decoder instance at:
    at Decoder.onerror (node:internal/streams/readable:796:14)
    at Decoder.emit (node:events:390:28)
    at emitErrorNT (node:internal/streams/destroy:164:8)
    at emitErrorCloseNT (node:internal/streams/destroy:129:3)
    at processTicksAndRejections (node:internal/process/task_queues:83:21)

Node.js v17.0.0

This error only occurs when I try my Discord Bot on my laptop. It works fine on Discord App on Mobile

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!