I am creating a discord bot using discord.py rewrite and am hosting iton repl.it. I am trying to add assignment of roles, but I get an error everytime I try to
discord.py
I added Alberto Poljak's suggestions and it worked!
import discord.utils @client.command() async def role(ctx, * role: discord.Role): user = ctx.message.author await user.add_roles(role)