Added opus as an optional

This commit is contained in:
hydrabolt
2015-11-07 21:36:43 +00:00
parent 48c3770caf
commit f5640fa5d0
3 changed files with 9 additions and 4 deletions

View File

@@ -7,9 +7,7 @@ function _inherits(subClass, superClass) { if (typeof superClass !== "function"
var WebSocket = require("ws");
var dns = require("dns");
var udp = require("dgram");
var Lame = require("lame");
var Opus = require('node-opus');
var Wav = require('wav');
var fs = require("fs");
var ffmpeg = require('fluent-ffmpeg');
var AudioEncoder = require("./AudioEncoder.js");
@@ -24,6 +22,9 @@ var VoiceConnection = (function (_EventEmitter) {
_classCallCheck(this, VoiceConnection);
_EventEmitter.call(this);
if (!Opus) {
console.log("HEY! WATCH OUT\n\n discord.js needs node-opus, you don't have it installed.");
}
this.voiceChannel = channel;
this.client = client;
this.session = session;