Skip to content

模块 nonebot_plugin_marshoai.hunyuan


@genimage_cmd.handle()

async func genimage(event: Event, prompt = None)

源代码在GitHub上查看
python
@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()

文档完善中,欢迎提出建议或帮助我们完善。