mirror of
https://github.com/LiteyukiStudio/nonebot-plugin-marshoai.git
synced 2025-02-08 07:16:19 +08:00
734 B
Executable File
734 B
Executable File
title |
---|
hunyuan |
Module nonebot_plugin_marshoai.hunyuan
@genimage_cmd.handle()
async func genimage(event: Event, prompt = None)
Source code or View on GitHub
@genimage_cmd.handle()
async def genimage(event: Event, prompt=None):
if not prompt:
await genimage_cmd.finish('无提示词')
try:
result = generate_image(prompt)
url = json.loads(result)['ResultImage']
await UniMessage.image(url=url).send()
except Exception as e:
traceback.print_exc()