|
@@ -4,6 +4,7 @@ import asyncio
|
|
|
|
|
|
from aiohttp import MultipartWriter
|
|
|
from bs4 import BeautifulSoup
|
|
|
+from commands.teamspeak import teamspeak
|
|
|
|
|
|
from rollbot import as_command, RollbotFailure, Attachment
|
|
|
from rollbot.injection import Request, Args, Arg, Config
|
|
@@ -250,3 +251,9 @@ async def minecraft(minecraft_url: Config("minecraft.url"), req: Request, logger
|
|
|
except:
|
|
|
logger.exception("Failed to call MC service")
|
|
|
RollbotFailure.SERVICE_DOWN.raise_exc(detail="Failed to query Minecraft server")
|
|
|
+
|
|
|
+
|
|
|
+@as_command
|
|
|
+async def mcts(ts_query: Config("teamspeak.query"), minecraft_url: Config("minecraft.url"), req: Request, logger: Logger):
|
|
|
+ ts, mc = await asyncio.gather(teamspeak(ts_query, req, logger), minecraft(minecraft_url, req, logger))
|
|
|
+ return f"Teamspeak: {ts}\nMinecraft: {mc}"
|