Added guild.createChannel(name, type)

This commit is contained in:
hydrabolt
2016-04-26 17:44:42 +01:00
parent e9d7dfaee3
commit 2d3116d505
6 changed files with 52 additions and 5 deletions

View File

@@ -20,7 +20,7 @@ client.on('guildUpdate', (old, guild) => {
console.log(old.name, guild.name);
});
client.on('channelCreate', channel => {
console.log(channel);
// console.log(channel);
});
client.on('channelDelete', channel => {
console.log(channel);
@@ -70,9 +70,11 @@ client.on('typingStop.', (channel, user, data) => {
client.on('message', message => {
if (message.author.username === 'hydrabolt') {
message.channel.sendMessage('test').then(msg => {
msg.edit('woah!');
});
if (message.content === 'makechann') {
if (message.channel.guild) {
message.channel.guild.createChannel('hi', 'text').then(console.log);
}
}
}
});