diff --git a/vip/DES.md b/vip/DES.md index 94c5e6d..a0178c6 100644 --- a/vip/DES.md +++ b/vip/DES.md @@ -1,4 +1,45 @@ -命令:天气:weather weather_pic weather_he -Duckduckgo:duckduckgo -彩云翻译:caiyun -文本转语音:tts_nan tts_nv tts_tw tts_ne tts_en。与 weather 插件冲突 \ No newline at end of file +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` diff --git a/vip/main.py b/vip/main.py index 4de96ed..69a79f9 100644 --- a/vip/main.py +++ b/vip/main.py @@ -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()