Answer the question
In order to leave comments, you need to log in
The on_raw_reaction_add() function does not work. What is the problem?
Hello. In general, I decided to break my bot into several separate scripts / files. And this error appeared when executing the function, which will be given below:
[<Member id=726559007019630593 name='CISBOT' discriminator='0598' bot=True nick=None guild=<Guild id=540944004041146399 name='CISCORD' shard_id=None chunked=False member_count=63>>]
AttributeError("'NoneType' object has no attribute 'id'")
AttributeError("'NoneType' object has no attribute 'remove_roles'")
@client.event
async def on_raw_reaction_add(payload):
if str(payload.message_id) == str(shop_embs.EMB1_ID) or str(payload.message_id) == str(shop_embs.EMB2_ID) or str(payload.message_id) == str(shop_embs.EMB3_ID):
channel = client.get_channel(payload.channel_id)
message = await channel.fetch_message(payload.message_id)
print(message.guild.members)
member = utils.get(message.guild.members, id=payload.user_id)
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question