From e43cb0ab079bf377684ab49cfae8a74a49db9da2 Mon Sep 17 00:00:00 2001 From: snowy Date: Mon, 1 Apr 2024 11:46:47 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E6=84=9A=E4=BA=BA=E8=8A=82=E5=BF=AB?= =?UTF-8?q?=E4=B9=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/README.md | 4 ++-- liteyuki/liteyuki_main/core.py | 8 ++++++-- liteyuki/resources/lang/zh-CN.lang | 6 +++++- 3 files changed, 13 insertions(+), 5 deletions(-) diff --git a/docs/README.md b/docs/README.md index 2edb2119..c27d2f04 100644 --- a/docs/README.md +++ b/docs/README.md @@ -7,8 +7,8 @@ bgImage: bgImageDark: bgImageStyle: background-attachment: fixed -heroText: LiteyukiBot 666 -tagline: 轻雪机器人,一个以笨重和复杂为设计理念基于Nonebot114514的OneBotv1919810标准聊天机器人,可用于雪地清扫 +heroText: HeavyyukiBot666 # LiteyukiBot 6 +tagline: 重雪机器人,一个以笨重和复杂为设计理念基于Nonebot114514的OneBotv1919810标准聊天机器人,可用于雪地清扫 #tagline: 轻雪机器人,一个以轻量和简洁为设计理念基于Nonebot2的OneBot标准聊天机器人 actions: diff --git a/liteyuki/liteyuki_main/core.py b/liteyuki/liteyuki_main/core.py index 1cb9986e..8e197d1e 100644 --- a/liteyuki/liteyuki_main/core.py +++ b/liteyuki/liteyuki_main/core.py @@ -137,11 +137,15 @@ async def _(result: Arparma, event: T_MessageEvent, bot: T_Bot): @switch_image_mode.handle() async def _(bot: T_Bot, event: T_MessageEvent): + # 切换图片模式,False以图片形式发送,True以markdown形式发送 ulang = get_user_lang(str(event.user_id)) stored_config: StoredConfig = common_db.first(StoredConfig(), default=StoredConfig()) - stored_config.config["markdown_image"] = not stored_config.config.get("markdownimage", False) + stored_config.config["markdown_image"] = not stored_config.config.get("markdown_image", False) common_db.upsert(stored_config) - await switch_image_mode.finish(f"{ulang.get('liteyuki.image_mode_switched', MODE=ulang.get('liteyuki.image_mode_on') if stored_config.config.get('image_mode') else ulang.get('liteyuki.image_mode_off'))}") + await switch_image_mode.finish( + f"{ulang.get('liteyuki.image_mode_switched', MODE=ulang.get('liteyuki.image_mode_on') + if stored_config.config.get('image_mode') else ulang.get('liteyuki.image_mode_off'))}") + @driver.on_startup async def on_startup(): diff --git a/liteyuki/resources/lang/zh-CN.lang b/liteyuki/resources/lang/zh-CN.lang index 7146ec69..034a0e9e 100644 --- a/liteyuki/resources/lang/zh-CN.lang +++ b/liteyuki/resources/lang/zh-CN.lang @@ -91,4 +91,8 @@ user.profile.nickname.desc=设置Bot对用户的称呼 user.profile.input_value=请输入 {ATTR} 的值 user.profile.set_success=成功将 {ATTR} 设置为 {VALUE} -user.profile.set_failed=设置 {ATTR} 失败,请检查输入是否合法 \ No newline at end of file +user.profile.set_failed=设置 {ATTR} 失败,请检查输入是否合法 + +liteyuki.image_mode_switched=图片模式已切换为 {MODE} +liteyuki.image_mode_on=开启Markdown图片模式 +liteyuki.image_mode_off=关闭Markdown图片模式 \ No newline at end of file