aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRapptz <[email protected]>2017-09-13 18:47:40 -0400
committerRapptz <[email protected]>2017-09-13 18:47:40 -0400
commit7b2e06c2634280582575cf15c4b9c03fa7f56e66 (patch)
tree616b5c884846bc184b89a9d19037356a4307e9d5
parent[commands] Add CategoryChannelConverter (diff)
downloaddiscord.py-7b2e06c2634280582575cf15c4b9c03fa7f56e66.tar.xz
discord.py-7b2e06c2634280582575cf15c4b9c03fa7f56e66.zip
Fix error when creating guild channels.
-rw-r--r--discord/guild.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/discord/guild.py b/discord/guild.py
index 7e58b433..23eb8ebc 100644
--- a/discord/guild.py
+++ b/discord/guild.py
@@ -520,7 +520,7 @@ class Guild(Hashable):
return utils.find(pred, members)
- def _create_channel(self, name, overwrites, type, reason):
+ def _create_channel(self, name, overwrites, channel_type, reason):
if overwrites is None:
overwrites = {}
elif not isinstance(overwrites, dict):
@@ -545,7 +545,7 @@ class Guild(Hashable):
perms.append(payload)
- return self._state.http.create_channel(self.id, name, str(type), permission_overwrites=perms, reason=reason)
+ return self._state.http.create_channel(self.id, name, channel_type.value, permission_overwrites=perms, reason=reason)
@asyncio.coroutine
def create_text_channel(self, name, *, overwrites=None, reason=None):