From 458cb83b47cb903ff1e16b96c129501afdd8278e Mon Sep 17 00:00:00 2001 From: Rapptz Date: Thu, 21 Sep 2017 22:15:47 -0400 Subject: [PATCH] Properly handle cases where a category is removed. --- discord/abc.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/discord/abc.py b/discord/abc.py index b7cd26ef5..e836dda3c 100644 --- a/discord/abc.py +++ b/discord/abc.py @@ -222,7 +222,7 @@ class GuildChannel: yield from http.bulk_channel_update(self.guild.id, payload, reason=reason) self.position = position if parent_id is not _undefined: - self.category_id = int(parent_id) + self.category_id = int(parent_id) if parent_id else None @asyncio.coroutine def _edit(self, options, reason):