I'm trying to make a discord bot that creates a channel and then adds permissions for it to a specific role.
here is the code that adds the channel:
server = message.server
everyone = discord.PermissionOverwrite(read_messages=False, send_messages=False)
mine = discord.PermissionOverwrite(read_messages=True)
await client.create_channel(server, 'secret', (server.default_role, everyone), (server.me, mine))
overwrite = discord.PermissionOverwrite(read_messages=True, send_messages=True)
await client.edit_channel_permissions(message.channel, discord.utils.get(server.roles, name="InFight"), overwrite)
So the bot adds the channel but doesn't give the role "InFight" the permissions specified. Any idea on what the problem is? I think it is the way I mention the role.