|
|
@ -1,9 +1,9 @@
|
|
|
|
exports.mockDispatcher = {
|
|
|
|
exports.mockDispatcher = {
|
|
|
|
pause: () => console.log('pause();'),
|
|
|
|
pause: () => console.log('Dispatcher.pause();'),
|
|
|
|
resume: () => console.log('resume();'),
|
|
|
|
resume: () => console.log('Dispatcher.resume();'),
|
|
|
|
setVolume: (perc) => console.log(`setVolume(${perc});`),
|
|
|
|
setVolume: (perc) => console.log(`Dispatcher.setVolume(${perc});`),
|
|
|
|
on: (event, callback) => console.log(`on(${event}, ${callback});`),
|
|
|
|
on: (event, callback) => console.log(`Dispatcher.on(${event}, ${callback});`),
|
|
|
|
end: () => console.log('end();')
|
|
|
|
end: () => console.log('Dispatcher.end();')
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
exports.mockConnection = {
|
|
|
|
exports.mockConnection = {
|
|
|
@ -11,24 +11,24 @@ exports.mockConnection = {
|
|
|
|
members: {
|
|
|
|
members: {
|
|
|
|
size: 10
|
|
|
|
size: 10
|
|
|
|
},
|
|
|
|
},
|
|
|
|
leave: () => console.log('leave();')
|
|
|
|
leave: () => console.log('Connection.leave();')
|
|
|
|
},
|
|
|
|
},
|
|
|
|
status: 0,
|
|
|
|
status: 0,
|
|
|
|
playFile: (fname) => {
|
|
|
|
playFile: (fname) => {
|
|
|
|
console.log(`playFile(${fname});`);
|
|
|
|
console.log(`Connection.playFile(${fname});`);
|
|
|
|
return exports.mockDispatcher;
|
|
|
|
return exports.mockDispatcher;
|
|
|
|
},
|
|
|
|
},
|
|
|
|
playStream: (stream, opts) => {
|
|
|
|
playStream: (stream, opts) => {
|
|
|
|
console.log(`playStream(ytdl, ${opts};`);
|
|
|
|
console.log(`Connection.playStream(ytdl, ${opts};`);
|
|
|
|
return exports.mockDispatcher;
|
|
|
|
return exports.mockDispatcher;
|
|
|
|
},
|
|
|
|
},
|
|
|
|
disconnect: () => console.log('disconnect();')
|
|
|
|
disconnect: () => console.log('Connection.disconnect();')
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
exports.mockVoicechannel = {
|
|
|
|
exports.mockVoicechannel = {
|
|
|
|
name: 'mockVoicechannel',
|
|
|
|
name: 'mockVoicechannel',
|
|
|
|
join: () => {
|
|
|
|
join: () => {
|
|
|
|
console.log('join();');
|
|
|
|
console.log('Voicechannel.join();');
|
|
|
|
return new Promise((rs, rj) => rs(exports.mockConnection));
|
|
|
|
return new Promise((rs, rj) => rs(exports.mockConnection));
|
|
|
|
},
|
|
|
|
},
|
|
|
|
members: {
|
|
|
|
members: {
|
|
|
|