Files
yenai-plugin/model/State/FastFetch.js
2024-04-06 19:02:02 +08:00

16 lines
445 B
JavaScript

import { execSync } from "../../tools/index.js"
/**
* 获取FastFetch
* @param e
*/
export default async function getFastFetch(e) {
if (process.platform == "win32" && !/pro/.test(e.msg)) return ""
let ret = await execSync("bash plugins/yenai-plugin/resources/state/state.sh")
if (ret.error) {
e.reply(`❎ 请检查是否使用git bash启动Yunzai-bot\n错误信息:${ret.stderr}`)
return ""
}
return ret.stdout.trim()
}