feat(bym): 添加 SerpTool 并增强 EditCardTool 功能

- 添加 SerpTool,用于处理搜索结果
- 在 bym 插件中根据配置条件动态加载 SerpTool
- 更新 EditCardTool,增加管理员权限验证功能
This commit is contained in:
ycxom 2024-12-31 13:34:05 +08:00
parent 2cf83fbdd8
commit 3e70ae88dc
2 changed files with 11 additions and 2 deletions

View file

@ -16,6 +16,8 @@ import { EditCardTool } from '../utils/tools/EditCardTool.js'
import { JinyanTool } from '../utils/tools/JinyanTool.js'
import { KickOutTool } from '../utils/tools/KickOutTool.js'
import { SetTitleTool } from '../utils/tools/SetTitleTool.js'
import {SerpTool} from '../utils/tools/SerpTool.js'
import fs from "fs";
import { fileTypeFromBuffer } from 'file-type';
import moment from 'moment';
@ -275,6 +277,9 @@ export class bym extends plugin {
new WebsiteTool(),
new WeatherTool()
]
if (Config.azSerpKey) {
tools.push(new SerpTool())
}
if (e.group.is_admin || e.group.is_owner) {
tools.push(new EditCardTool())
tools.push(new JinyanTool())