L
L
leonid13032021-08-01 10:15:45
Bots
leonid1303, 2021-08-01 10:15:45

I can't translate the discord id of the name into the nickname itself?

unknown.png
https://cdn.discordapp.com/attachments/71074995079...
Id it gives out
but doesn't want to translate into member.name
what's the catch I xs
if I remove the member name then everything is fine

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
Vindicar, 2021-08-01
@Vindicar

Think with your head and teach python with simpler examples to start with.
NoneType object has no attribute 'name' - you have None instead of an object, and you are trying to take an attribute.
And you have None, because get_user() returned None to you, and you don't check. Although the docs say it can return None.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question