Files
sansenhoshiandClaude b61d09f09f Add HeXi bot codebase: custom plugins, web frontends, tests
- hexi core: message handling, rate limiting, cooldown, plugin manager
- Custom plugins: BF stats, daily check-in, quotes, persona cards, etc.
- Community plugins vendored under hexi/plugins with local fixes
- Web admin frontends (learning-chat, persona-admin), unified hexi/web
- Tests for rate_limit/cooldown/memes/persona; poetry.lock

Co-Authored-By: Claude <noreply@anthropic.com>
2026-09-01 13:13:40 +08:00

51 lines
1.6 KiB
Python

import os
threshold = 70 # SauceNAO相似度阈值,低于该相似度自动追加ascii2d搜索
SAUCENAO_KEY = "dfc2b9156f254754dee2ead531826020f6316f92" # SauceNAO 的 API key
SAUCENAO_RESULT_NUM = 3 # SauceNAO搜索结果显示数量
ASCII_RESULT_NUM = 3 # ascii2d搜索结果显示数量
SEARCH_TIMEOUT = 60 # 连续搜索模式超时时长
DAILY_LIMIT = 50 # 搜图每日限额
CHAIN_REPLY = True # 是否启用合并转发回复模式
THUMB_ON = True # 是否启用缩略图
CHECK = True # 是否开启手机截屏判定
IGNORE_STAMP = True # 是否在批量搜索中忽略表情包
HOST_CUSTOM = {
# 自定义Host,不使用留空即可
# 格式示例:'https://ascii2d.net' , 'http://localhost:12345'
'SAUCENAO': '',
'ASCII': ''
}
# ascii2d 的 Cloudflare cookie 文件(Netscape 格式,浏览器导出,参考 nonebot_plugin_video_analysis 的 cookies.txt 用法)
# 获取方式:浏览器打开 ascii2d.net 过验证后,用 EditThisCookie / Cookie-Editor 扩展导出为 Netscape 格式,
# 保存为 nonebot_plugin_picfinder_take/data/cookies_ascii2d.txt
# 留空则使用 playwright 无 cookie 尝试(可能无法通过 Cloudflare 验证)
ASCII2D_COOKIES_FILE = os.path.join(
os.path.dirname(os.path.abspath(__file__)), "data", "cookies_ascii2d.txt"
)
proxies = {
'http': '',
'https': ''
} # 网络代理
enableguild = {0000: [00000, 1111], 123456: [2345]} # 频道白名单 格式{频道id: [子频道id]}
helptext = '''
(xx为bot名称)
[@bot+图片] 单张/多张搜图
[xx搜图] 进入批量搜图模式
[谢谢xx] 退出批量搜图模式
'''.strip()