|
@@ -6,9 +6,19 @@ from commands.tarot import tarot
|
|
|
from commands.querying import inspire
|
|
|
from commands.simple import inquire
|
|
|
|
|
|
+from rollbot.types import Attachment
|
|
|
+
|
|
|
@as_command
|
|
|
async def omen(req: Request, logger: Logger):
|
|
|
- yield inquire()
|
|
|
- yield tarot(False, False)
|
|
|
- yield await inspire(req, logger)
|
|
|
+ inquiry = inquire()
|
|
|
+ drawing = tarot(False, False)
|
|
|
+ formatted = f"{inquiry}\n---\n{drawing}"
|
|
|
+ inspiration = await inspire(req, logger)
|
|
|
+ try:
|
|
|
+ async with req.get(inspiration) as res:
|
|
|
+ image = Attachment("image", await res.read())
|
|
|
+ except:
|
|
|
+ logger.exception("Failed to actually get inspiration image")
|
|
|
+ return formatted + "\n---\nFailed to load inspiration"
|
|
|
+ return formatted, image
|
|
|
|