aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRapptz <[email protected]>2015-09-19 05:13:14 -0400
committerRapptz <[email protected]>2015-09-19 18:42:19 -0400
commit6c54b24a6f2e89d8ec59740fbfc746adb4e0f5a1 (patch)
tree754082d44a8821a3a44a197c713a4d8f0d4a0219
parentFix keep_alive running after logout() (diff)
downloaddiscord.py-6c54b24a6f2e89d8ec59740fbfc746adb4e0f5a1.tar.xz
discord.py-6c54b24a6f2e89d8ec59740fbfc746adb4e0f5a1.zip
Remove duplicated create_channel function.
-rw-r--r--discord/client.py24
1 files changed, 0 insertions, 24 deletions
diff --git a/discord/client.py b/discord/client.py
index 22371d26..ddf9de84 100644
--- a/discord/client.py
+++ b/discord/client.py
@@ -609,30 +609,6 @@ class Client(object):
log.info('{0.__name__} has successfully been registered as an event'.format(function))
return function
- def create_channel(self, server, name, type='text'):
- """Creates a channel in the specified server.
-
- In order to create the channel the client must have the proper permissions.
-
- :param server: The :class:`Server` to create the channel from.
- :param name: The name of the channel to create.
- :param type: The type of channel to create. Valid values are 'text' or 'voice'.
- :returns: The recently created :class:`Channel`.
- """
- url = '{}/{}/channels'.format(endpoints.SERVERS, server.id)
- payload = {
- 'name': name,
- 'type': type
- }
- response = requests.post(url, json=payload, headers=self.headers)
- if response.status_code == 200:
- data = response.json()
- log.debug(request_success_log.format(name='create_channel', response=response, json=payload, data=data))
- channel = Channel(server=server, **data)
- return channel
- else:
- log.error(request_logging_format.format(response=response, name='create_channel'))
-
def delete_channel(self, channel):
"""Deletes a channel.