discord.py text channel permission code example
Example 1: how to change role permissions in discord.py
#edit permissions of role
permissions = discord.Permissions()
permissions.update(kick_members = False)
await role.edit(reason = None, colour = discord.Colour.blue(), permissions=permissions)
Example 2: discord py server.channels
# Returns a list of all channels from all guilds( as channel IDs )
bot.get_all_channels()