vip draw AI 绘图

This commit is contained in:
xtaodada 2023-04-13 21:35:55 +08:00
parent 6aff41c8dc
commit 1de86de85f
Signed by: xtaodada
GPG Key ID: 4CBB3F4FA8C85659
2 changed files with 64 additions and 4 deletions

View File

@ -1,4 +1,45 @@
命令天气weather weather_pic weather_he
Duckduckgoduckduckgo
彩云翻译caiyun
文本转语音tts_nan tts_nv tts_tw tts_ne tts_en。与 weather 插件冲突
VIP 相关命令:
# 天气
与 weather 插件冲突
## 彩云天气
`,weather 北京`
`,weather_pic 北京`
## 和风天气
`,weather_he 北京`
# 搜索
## Duckduckgo
`,duckduckgo pagermaid`
# 翻译
## 彩云翻译
`,caiyun hello`
# 文本转语音
`,tts_nan 简体男声`
`,tts_nv 简体女声`
`,tts_tw 繁体男声`
`,tts_ne 简体新闻男声`
`,tts_en 英文男声`
# AI
## 画图
`,draw two boy`

View File

@ -124,3 +124,22 @@ async def az_tts_ne(client: Client, message: Message):
parameters="[字符串]")
async def az_tts_en(client: Client, message: Message):
await az_tts(client, message, "en")
@listener(
command="draw",
description="使用 AI 进行绘图。",
parameters="prompt"
)
async def draw_photo(client: Client, message: Message):
text = message.obtain_message()
if not text:
return await message.edit("请输入 prompt")
async with client.conversation("PagerMaid_Modify_bot") as conv:
answer: Message = await conv.ask(f"/draw {text}")
await conv.mark_as_read()
await answer.copy(
message.chat.id,
reply_to_message_id=message.reply_to_message_id or message.reply_to_top_message_id
)
await message.safe_delete()