首页 > 解决方案 > Python:discord.py 1.5.1 get_user 函数总是返回 None

问题描述

同样的标题,get_user 总是返回 None,但它的姊妹函数 get_channel 没有问题

直到前几天这才成为问题

import discord

client = discord.Client()


@client.event
async def on_ready():
    print(f"Logged in as {client.user}")
    print(client.get_user(anyIDhere))
    print(client.get_channel(anyIDhere))
client.run("token")

标签: pythondiscord

解决方案


推荐阅读