我将如何在下面更改为空闲和状态,以观察机器人所在的服务器?
@bot.event
async def on_ready():
print(f'Loged in as {bot.user}\n')
cmds = filter(lambda e: e.endswith(".py"), os.listdir("commands"))
print(f"Loading Commands")
for cmd in cmds:
bot.load_extension(f"commands.{cmd[:-3]}")
print(f"Loaded {cmd}")
await bot.change_presence(activity=discord.Streaming(name=f"{len(bot.guilds)} servers | {prefix}help", url='https://discord.gg/Mws2mSjde6'))
答案 0 :(得分:0)
试试看:
await bot.change_presence(activity=discord.Idle(name=f"{len(bot.guilds)} servers | {prefix}help"))