From 7e2da1c93b9db02b71e9f7a35c8a09679d97b0bb Mon Sep 17 00:00:00 2001 From: Rapptz Date: Sun, 9 Jun 2019 00:23:22 -0400 Subject: Publicly expose a type property for all channels. Fix #2185 --- discord/abc.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'discord/abc.py') diff --git a/discord/abc.py b/discord/abc.py index 35b703af..1d490cd4 100644 --- a/discord/abc.py +++ b/discord/abc.py @@ -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 -- cgit v1.2.3