0

我正在登录一个不和谐的用户帐户,并试图获取该用户帐户所在的服务器列表。这是我的代码:

from discord.ext.commands import Bot
from discord.ext import commands
main = "my user token"
client = Bot(main)
client.remove_command('help')

print(client.guilds)

client.run(main,bot=False)   

这将返回一个空列表,即使该帐户位于许多服务器中。

4

1 回答 1

1

您将客户端设置为 Bot 然后打印 client.guilds,这不会尝试打印 bot 所在的行会吗?

于 2020-03-17T06:31:32.893 回答