errory voice

This commit is contained in:
Amish Shah
2016-08-24 21:38:48 +01:00
parent 48444a5444
commit 8683f45816
20 changed files with 476 additions and 13 deletions

View File

@@ -177,6 +177,11 @@ client.on('messageUpdate', (old, message) => {
console.log('Message updated from', old.content, 'to', message.content);
});
client.on('guildMemberSpeaking', (member, speaking) => {
const message = speaking ? `${member.user.username} is speaking` : `${member.user.username} is not speaking`;
member.guild.channels.get(member.guild.id).sendMessage(message);
});
client.on('message', msg => {
if (msg.content.startsWith('?raw')) {
msg.channel.sendMessage('```' + msg.content + '```');
@@ -191,3 +196,16 @@ client.on('message', msg => {
}
}
});
let disp;
client.on('message', msg => {
if (msg.content.startsWith('/join')) {
const chan = msg.content.split(' ').slice(1).join(' ');
msg.channel.guild.channels.get(chan).join()
.then(conn => {
msg.reply('done');
})
.catch(console.log);
}
})