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/index.mjs CHANGED
@@ -1,5 +1,5 @@
1
1
  import { t as __export } from "./chunk-DYZpOiH0.mjs";
2
- import { t as version } from "./package-BbEBqdaV.mjs";
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 = 6700, host = "localhost", token } = botConfig.napcat || {};
1746
- logger.info(`>>> 正在连接 NapCat 实例: ${colors$1.green(`${protocol}://${host}:${port}`)}`);
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("连接已关闭,请确保 NapCat 实例正常运行及 token 配置正确");
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 }) => {