1
0
forked from bot/app

feat: 愚人节快乐

This commit is contained in:
远野千束 2024-04-01 11:46:47 +08:00
parent c1ba64e7c3
commit e43cb0ab07
3 changed files with 13 additions and 5 deletions

View File

@ -7,8 +7,8 @@ bgImage:
bgImageDark: bgImageDark:
bgImageStyle: bgImageStyle:
background-attachment: fixed background-attachment: fixed
heroText: LiteyukiBot 666 heroText: HeavyyukiBot666 # LiteyukiBot 6
tagline: 雪机器人一个以笨重和复杂为设计理念基于Nonebot114514的OneBotv1919810标准聊天机器人可用于雪地清扫 tagline: 雪机器人一个以笨重和复杂为设计理念基于Nonebot114514的OneBotv1919810标准聊天机器人可用于雪地清扫
#tagline: 轻雪机器人一个以轻量和简洁为设计理念基于Nonebot2的OneBot标准聊天机器人 #tagline: 轻雪机器人一个以轻量和简洁为设计理念基于Nonebot2的OneBot标准聊天机器人
actions: actions:

View File

@ -137,11 +137,15 @@ async def _(result: Arparma, event: T_MessageEvent, bot: T_Bot):
@switch_image_mode.handle() @switch_image_mode.handle()
async def _(bot: T_Bot, event: T_MessageEvent): async def _(bot: T_Bot, event: T_MessageEvent):
# 切换图片模式False以图片形式发送True以markdown形式发送
ulang = get_user_lang(str(event.user_id)) ulang = get_user_lang(str(event.user_id))
stored_config: StoredConfig = common_db.first(StoredConfig(), default=StoredConfig()) 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) 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 @driver.on_startup
async def on_startup(): async def on_startup():

View File

@ -91,4 +91,8 @@ user.profile.nickname.desc=设置Bot对用户的称呼
user.profile.input_value=请输入 {ATTR} 的值 user.profile.input_value=请输入 {ATTR} 的值
user.profile.set_success=成功将 {ATTR} 设置为 {VALUE} user.profile.set_success=成功将 {ATTR} 设置为 {VALUE}
user.profile.set_failed=设置 {ATTR} 失败,请检查输入是否合法 user.profile.set_failed=设置 {ATTR} 失败,请检查输入是否合法
liteyuki.image_mode_switched=图片模式已切换为 {MODE}
liteyuki.image_mode_on=开启Markdown图片模式
liteyuki.image_mode_off=关闭Markdown图片模式