aboutsummaryrefslogtreecommitdiff
path: root/discord/http.py
diff options
context:
space:
mode:
Diffstat (limited to 'discord/http.py')
-rw-r--r--discord/http.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/discord/http.py b/discord/http.py
index aa5ef47a..9cd46bad 100644
--- a/discord/http.py
+++ b/discord/http.py
@@ -344,13 +344,16 @@ class HTTPClient:
return self.patch(url, json=payload, bucket=_func_())
- def create_channel(self, guild_id, name, channe_type):
+ def create_channel(self, guild_id, name, channe_type, permission_overwrites=None):
url = '{0.GUILDS}/{1}/channels'.format(self, guild_id)
payload = {
'name': name,
'type': channe_type
}
+ if permission_overwrites is not None:
+ payload['permission_overwrites'] = permission_overwrites
+
return self.post(url, json=payload, bucket=_func_())
def delete_channel(self, channel_id):