Archived
1
0
Fork 0
This repository has been archived on 2024-04-26. You can view files and clone it, but cannot push or open issues or pull requests.
akari-bot/modules/ask/tools/server.py
2023-09-03 16:50:12 +08:00

17 lines
565 B
Python

import asyncio
from modules.server.server import server
from .utils import fake_msg, AkariTool
async def minecraft_server(address: str):
results = await asyncio.gather(
server(address, fake_msg, mode='j'), server(address, fake_msg, mode='b'),
)
return f'Java Edition result: {results[0]}\n\nBedrock Edition result: {results[1]}'
server_tool = AkariTool.from_function(
func=minecraft_server,
description='A tool for checking the status of Minecraft: Java/Bedrock Edition servers. Input should be a valid Minecraft server address.'
)