【发布时间】:2021-04-13 17:01:48
【问题描述】:
抱歉,标题太长了。我希望我的机器人告诉我我的机器人在服务器中有多少成员处于机器人的状态。换句话说,我希望我的机器人雕像说Watching [member count] people and [server count] servers,但我不知道怎么做。有人可以帮忙吗?
@client.event
async def on_ready():
print('Potato Cat is ready :D')
await client.change_presence(
activity=discord.Activity(
type=discord.ActivityType.watching,
name=f'{len(client.guilds)} servers and {len(client.members)} people'))
【问题讨论】:
标签: python discord.py