This commit is contained in:
hibiki
2021-06-30 19:50:55 +08:00
parent a976bae11f
commit fe1879f574
111 changed files with 10620 additions and 454 deletions
+8 -8
View File
@@ -1,18 +1,18 @@
from util.img_utils import CreateImg
from utils.img_utils import CreateImg
from configs.path_config import IMAGE_PATH, DATA_PATH
import ujson as json
import os
from .config import *
from nonebot import require
from configs.config import INITIAL_OPEN_CASE_COUNT, INITIAL_SETU_PROBABILITY, ADMIN_DEFAULT_AUTH
from configs.config import plugins2name_dict
from configs.config import plugins2info_dict
import nonebot
export = require("nonebot_plugin_manager")
width = 1500
e_height = 0
u_height = 850
u_height = 950
o_height = 1500
# f_height =
@@ -49,7 +49,7 @@ def create_help_img():
A.paste(e, (0, 0))
A.paste(u, (0, u_height))
A.paste(o, (0, o_height))
A.text((10, h * 0.76), '大部分交互功能可以通过输入‘取消’,‘算了’来取消当前交互\n对真寻说 “真寻帮助 指令名” 获取对应详细帮助\n'
A.text((10, h * 0.68), '大部分交互功能可以通过输入‘取消’,‘算了’来取消当前交互\n对真寻说 “真寻帮助 指令名” 获取对应详细帮助\n'
'可以通过 “滴滴滴- [消息]” 联系管理员(有趣的想法尽管来吧!<还有Bug和建议>)'
'\n[群管理员请看 管理员帮助(群主与管理员自带 5 级权限)]\n\n'
'\t「如果真寻回复了一些不符合人设的话,那是因为每日白嫖的图灵次数已用完,使用的是备用接口【QAQ】」')
@@ -99,10 +99,10 @@ def create_group_help_img(group_id: int):
A.paste(u, (0, u_height))
A.paste(o, (0, o_height))
# A.text((width, 10), f'总开关【{"√" if data["总开关"] else "×"}】')
A.text((10, h * 0.76), '大部分交互功能可以通过输入‘取消’,‘算了’来取消当前交互\n对真寻说 “真寻帮助 指令名” 获取对应详细帮助\n'
A.text((10, h * 0.68), '大部分交互功能可以通过输入‘取消’,‘算了’来取消当前交互\n对真寻说 “真寻帮助 指令名” 获取对应详细帮助\n'
'可以通过 “滴滴滴- [消息]” 联系管理员(有趣的想法尽管来吧!<还有Bug和建议>)'
f'\n[群管理员请看 管理员帮助(群主与管理员自带 {ADMIN_DEFAULT_AUTH} 级权限)]')
A.text((10, h * 0.81), f"【注】「色图概率:好感度 + {int(INITIAL_SETU_PROBABILITY*100)}%\n"
A.text((10, h * 0.77), f"【注】「色图概率:好感度 + {int(INITIAL_SETU_PROBABILITY*100)}%\n"
f"\t\t每 3 点好感度 + 1次开箱,初始 {INITIAL_OPEN_CASE_COUNT} 次\n"
f"\t\t开启/关闭功能只需输入‘开启/关闭 指令名’(每个功能的第一个指令)」\n"
f"\t\t示例:开启签到\n"
@@ -144,8 +144,8 @@ def rcmd(dfg):
def get_plugin_help(msg: str) -> str:
plugin = None
for p in plugins2name_dict.keys():
if msg in plugins2name_dict[p]:
for p in plugins2info_dict.keys():
if msg in plugins2info_dict[p]['cmd']:
plugin = nonebot.plugin.get_plugin(p)
break
if plugin: