I think I got ChannelUpdate working??

This commit is contained in:
hydrabolt
2016-04-30 18:22:09 +01:00
parent 2341c83638
commit 90cf787759
9 changed files with 130 additions and 12 deletions

View File

@@ -79,9 +79,17 @@ client.on('message', message => {
if (message.content === 'delchann') {
message.channel.delete();
}
if (message.content.startsWith('setname')) {
message.channel.setName(message.content.substr(8)).then(chanLoop).catch(console.log);
}
}
});
function chanLoop(channel) {
channel.setName(channel.name + 'a').then(chanLoop).catch(console.log);
}
client.on('messageDelete', message => {
console.log('Message deleted by', message.author.username);
});