mirror of
https://github.com/Rapptz/discord.py.git
synced 2025-06-07 12:18:59 +00:00
Add ability to delete channels.
This commit is contained in:
parent
0e29d5a136
commit
5f69fe9b07
@ -672,3 +672,14 @@ class Client(object):
|
|||||||
return channel
|
return channel
|
||||||
|
|
||||||
return None
|
return None
|
||||||
|
|
||||||
|
def delete_channel(self, channel):
|
||||||
|
"""Deletes a :class:`Channel` from its respective :class:`Server`.
|
||||||
|
|
||||||
|
Note that you need proper permissions to delete the channel.
|
||||||
|
|
||||||
|
:param channel: The :class:`Channel` to delete.
|
||||||
|
"""
|
||||||
|
|
||||||
|
url = '{0}/{1.id}'.format(endpoints.CHANNELS, channel)
|
||||||
|
requests.delete(url, headers=self.headers)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user