I created a join command for my discord.py bot, but if ill specify a channel name with spaces, it wont connect to him. It throws an AttributeError, which indicates that the channel could not be found.
@commands.command()
async def join(self, ctx, channelname):
channel = discord.utils.get(ctx.guild.channels, name=channelname)
await channel.connect()
name=‘My Channel Name’
, perhaps?