Publicly expose a type property for all channels.

Fix #2185
This commit is contained in:
Rapptz committed 2019-06-09 00:23:22 -04:00
1 parent 991140eebe
commit 7e2da1c93b
3 files changed
+22 -12

No files matched your search

+1 -1
View File
@@ -611,7 +611,7 @@ class GuildChannel:
base_attrs['name'] = name or self.name
guild_id = self.guild.id
cls = self.__class__
data = await self._state.http.create_channel(guild_id, self._type, reason=reason, **base_attrs)
data = await self._state.http.create_channel(guild_id, self.type.value, reason=reason, **base_attrs)
obj = cls(state=self._state, guild=self.guild, data=data)
# temporarily add it to the cache