Add a way to set permission overwrites when creating a channel.
This commit is contained in:
@ -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