#AttributeError 'NoneType' object has no attribute 'id'

1 messages · Page 1 of 1 (latest)

rough vapor
#

You are searching for the id as a string

Don't get the role object from the guild using id and then adding the role object. That's unnecessary and inefficient.
member.add_roles only uses the id from the role object

Rather do use discord.Object
member.add_roles(discord.Object(role1id), discord.Object(role2id), ...)

#

Simple, efficient and faster

#

Read the error?
add_roles returns a coroutine

quiet stirrup
#

You didn't await it chief

rough vapor
#

?tag solved

fringe oxideBOT
#

Done with your help thread?

Please close your own help thread using </close:882631512829329448> (/close) with @sand timber.