start work with broadcast streams

This commit is contained in:
Amish Shah
2016-12-29 21:22:13 +00:00
parent e9af3f0a1f
commit 72a99f9582
6 changed files with 153 additions and 10 deletions

View File

@@ -12,6 +12,8 @@ client.login(auth.token).then(() => console.log('logged')).catch(console.error);
const connections = new Map();
let broadcast;
client.on('message', m => {
if (!m.guild) return;
if (m.content.startsWith('/join')) {
@@ -39,6 +41,13 @@ client.on('message', m => {
}
doQueue(connData);
}
} else if (m.content.startsWith('#eval') && m.author.id === '66564597481480192') {
try {
const com = eval(m.content.split(' ').slice(1).join(' '));
m.channel.sendMessage(`\`\`\`\n${com}\`\`\``);
} catch (e) {
m.channel.sendMessage(`\`\`\`\n${e}\`\`\``);
}
}
});