Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Traceback (most recent call last):
- File "/home/pi/.local/lib/python3.7/site-packages/discord/ext/commands/core.py", line 85, in wrapped
- ret = await coro(*args, **kwargs)
- File "/home/pi/Swimbot/whois.py", line 294, in whois
- embed.set_footer(text=f"Requested by {ctx.message.author.name}", icon_url= ctx.message.guild.get_member(ctx.message.author.id).avatar_url)
- AttributeError: 'NoneType' object has no attribute 'avatar_url'
Advertisement
Comments
-
- This error message is indicating that an AttributeError occurred in the file "/home/pi/Swimbot/whois.py" on line 294. Specifically, the error is that a 'NoneType' object (an object that does not have a value) does not have an attribute called 'avatar_url'.
- It seems the code is trying to access the avatar_url attribute of a discord member object. But the object returned by ctx.message.guild.get_member(ctx.message.author.id) is None, so it cannot access the attribute.
- It is likely that the member is not found in the guild, and thus ctx.message.guild.get_member(ctx.message.author.id) return None.
- You should check the code before this line and make sure the member exists in the guild before trying to access its avatar_url.
- According to CHatGPT.
- Just playing...
- Greetings, MrLunk
Add Comment
Please, Sign In to add comment
Advertisement