模块 nonebot_plugin_marshoai.plugins.builtin_tools.liteyuki
@on_function_call(description='获取分布式轻雪机器人节点情况')
async func get_liteyuki_info() -> str
说明: 获取分布式轻雪机器人节点情况
返回: str: 节点情况
源代码 或 在GitHub上查看
python
@on_function_call(description='获取分布式轻雪机器人节点情况')
async def get_liteyuki_info() -> str:
register = 0
online = 0
async with AsyncClient() as client:
response = await client.get('https://api.liteyuki.icu/count')
register = response.json().get('register')
response = await client.get('https://api.liteyuki.icu/online')
online = response.json().get('online')
return f'注册节点数: {register}\n在线节点数: {online}'