mioki 0.8.0 → 0.8.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cli.cjs +18 -16
- package/dist/cli.cjs.map +1 -1
- package/dist/cli.mjs +18 -16
- package/dist/cli.mjs.map +1 -1
- package/dist/index.cjs +5 -4
- package/dist/index.cjs.map +1 -1
- package/dist/index.mjs +5 -4
- package/dist/index.mjs.map +1 -1
- package/dist/package-CCa0t7n-.mjs +6 -0
- package/dist/package-CCa0t7n-.mjs.map +1 -0
- package/dist/{package-D-IT6tID.cjs → package-CROM2KRT.cjs} +2 -2
- package/dist/package-CROM2KRT.cjs.map +1 -0
- package/package.json +2 -2
- package/dist/package-BbEBqdaV.mjs +0 -6
- package/dist/package-BbEBqdaV.mjs.map +0 -1
- package/dist/package-D-IT6tID.cjs.map +0 -1
package/dist/index.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { t as __export } from "./chunk-DYZpOiH0.mjs";
|
|
2
|
-
import { t as version } from "./package-
|
|
2
|
+
import { t as version } from "./package-CCa0t7n-.mjs";
|
|
3
3
|
import fs, { default as fs$1 } from "node:fs";
|
|
4
4
|
import util from "node:util";
|
|
5
5
|
import path, { default as path$1 } from "node:path";
|
|
@@ -1742,8 +1742,9 @@ async function start(options = {}) {
|
|
|
1742
1742
|
logger.info(`${colors$1.dim("插件目录: ")}${colors$1.blue(plugin_dir)}`);
|
|
1743
1743
|
logger.info(`${colors$1.dim("配置文件: ")}${colors$1.blue(`${BOT_CWD.value}/package.json`)}`);
|
|
1744
1744
|
logger.info(colors$1.dim("=".repeat(40)));
|
|
1745
|
-
const { protocol = "ws", port =
|
|
1746
|
-
|
|
1745
|
+
const { protocol = "ws", port = 3001, host = "localhost", token = "" } = botConfig.napcat || {};
|
|
1746
|
+
const wsUrl = colors$1.green(`${protocol}://${host}:${port}${token ? "?access_token=***" : ""}`);
|
|
1747
|
+
logger.info(`>>> 正在连接 NapCat 实例: ${wsUrl}`);
|
|
1747
1748
|
const napcat = new NapCat({
|
|
1748
1749
|
token,
|
|
1749
1750
|
protocol,
|
|
@@ -1752,7 +1753,7 @@ async function start(options = {}) {
|
|
|
1752
1753
|
logger
|
|
1753
1754
|
});
|
|
1754
1755
|
napcat.on("ws.close", () => {
|
|
1755
|
-
logger.error("
|
|
1756
|
+
logger.error("WS 连接失败,请确保 token 配置正确且 NapCat 实例正常运行");
|
|
1756
1757
|
process.exit(1);
|
|
1757
1758
|
});
|
|
1758
1759
|
napcat.on("napcat.connected", async ({ user_id, nickname, app_name, app_version }) => {
|