Skip to content

Commit

Permalink
fix: try remove ffmpeg code
Browse files Browse the repository at this point in the history
  • Loading branch information
jimchen5209 committed Jun 7, 2023
1 parent 0baa9fe commit ee0da92
Showing 1 changed file with 2 additions and 10 deletions.
12 changes: 2 additions & 10 deletions src/Components/Discord/Components/Voice.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import { waitUntil } from 'async-wait-until';
import { Client, Member, VoiceConnection } from 'eris';
import FFmpeg from 'fluent-ffmpeg';
import { Client, Member, VoiceConnection } from 'eris';
import fs from 'fs';
import { Logger } from 'tslog-helper';
import Queue from 'promise-queue';
Expand Down Expand Up @@ -178,14 +177,7 @@ export class DiscordVoice {
return;
}
this.voice?.once('end', () => res());
FFmpeg.ffprobe(file, (__, data) => {
this.voice?.play(file);
const time = data.format.duration || 0;
setTimeout(() => {
this.voice?.stopPlaying();
res();
}, time * 1200);
});
this.voice?.play(file, { format: 'ogg' });
});
}
}

0 comments on commit ee0da92

Please sign in to comment.