get_x
and utils.get
both return None
if they can't find anything matching.
Common causes include:
- Not subscribed to the relevant intent.
- Wrong key
- Bot not logged in, and trying to grab objects from cache
- Bot cannot "see" the object.
- Objects retuned by
fetch_x
will not have a populated cache.
Pretty sure you didn't enable intents.members
, see: Privileged Intents
Also, those three if-statements
are useless, you can put everything in one
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…