diff --git a/kurisu.py b/kurisu.py index 7c6d21ef..ad29d4fc 100644 --- a/kurisu.py +++ b/kurisu.py @@ -289,8 +289,9 @@ async def load_channels(self): if channel and isinstance(channel, (discord.TextChannel, discord.VoiceChannel)): self.channels[n] = channel continue - channel = discord.utils.get(self.guild.channels, name=n) - if channel and isinstance(channel, (discord.TextChannel, discord.VoiceChannel)): + channel = discord.utils.find(lambda c: c.name == n and isinstance(c, (discord.TextChannel, discord.VoiceChannel)), self.guild.channels) + if channel: + assert isinstance(channel, (discord.TextChannel, discord.VoiceChannel)) self.channels[n] = channel await self.configuration.add_channel(name=n, channel=channel) else: