Add a way to set permission overwrites when creating a channel.
This commit is contained in:
1 parent
46babe822a
commit
f0fc70b2cf
3 files changed
+73
-5
No files matched your search
+4
-1
@@ -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):
|
||||
|
||||
Reference in new issue
Block a user