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

17 lines
564 B
Python
Raw Normal View History

2023-04-08 04:25:48 +00:00
import asyncio
2023-04-19 07:41:39 +00:00
2023-04-08 04:25:48 +00:00
from modules.server.server import server
2023-04-19 07:41:39 +00:00
from .utils import fake_msg, AkariTool
2023-04-08 04:25:48 +00:00
2023-06-20 07:29:56 +00:00
async def minecraft_server(address: str):
2023-04-08 04:25:48 +00:00
results = await asyncio.gather(
2023-06-20 07:29:56 +00:00
server(address, fake_msg, mode='j'), server(address, fake_msg, mode='b'),
2023-04-08 04:25:48 +00:00
)
return f'Java Edition result: {results[0]}\n\nBedrock Edition result: {results[1]}'
2023-06-20 07:29:56 +00:00
server_tool = AkariTool.from_function(
func=minecraft_server,
2023-04-08 04:25:48 +00:00
description='A tool for checking the status of Minecraft: Java/Bedrock Edition servers. Input should be a valid Minecraft server address.'
)