Kirk Trombley 8 сар өмнө
parent
commit
c968996049

+ 13 - 0
commands/commands/querying.py

@@ -183,6 +183,19 @@ async def southie(req: Request, logger: Logger):
         RollbotFailure.SERVICE_DOWN.raise_exc(detail="Failed to call GOES16")
 
 
+@as_command
+async def seaboardie(req: Request, logger: Logger):
+    try:
+        async with req.get(
+            "https://cdn.star.nesdis.noaa.gov/GOES16/ABI/SECTOR/eus/GEOCOLOR/latest.jpg"
+        ) as res:
+            res.raise_for_status()
+            return Attachment("image", await res.read())
+    except:
+        logger.exception("Failed to call GOES16")
+        RollbotFailure.SERVICE_DOWN.raise_exc(detail="Failed to call GOES16")
+
+
 @as_command
 async def cat(req: Request, logger: Logger):
     """