channel stuff (#1775)

* channel stuff

* abstract channel creation

* Update Channel.js

* Update Channel.js

* Update Channel.js

* Update Guild.js

* Update Constants.js

* e
This commit is contained in:
Gus Caplan
2017-08-13 04:57:25 -07:00
committed by Crawl
parent b2c7fcb603
commit 57977b063e
7 changed files with 42 additions and 29 deletions

View File

@@ -960,7 +960,9 @@ class Guild {
return this.client.api.guilds(this.id).channels.post({
data: {
name, type, permission_overwrites: overwrites,
name,
type: Constants.ChannelTypes[type.toUpperCase()],
permission_overwrites: overwrites,
},
reason,
}).then(data => this.client.actions.ChannelCreate.handle(data).channel);