@karinjs/adapter-qqbot 3.0.7 → 3.0.8

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.
Files changed (2) hide show
  1. package/dist/index.js +1 -2
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -4448,14 +4448,13 @@ const QUICK_DISCONNECT_DELAY_MS = 6e4;
4448
4448
  * 获取网关地址:优先调 /gateway;失败 / 超时 / 限频 → 直接 fallback 到硬编码
4449
4449
  */
4450
4450
  const fetchGateway = async (cfg) => {
4451
- const apiUrl = "https://api.bot.qq.com";
4452
4451
  const accessToken = getBotAccessToken(cfg.appId);
4453
4452
  if (!accessToken) {
4454
4453
  log("warn", `${cfg.appId}: 无 access_token,使用硬编码 WS`);
4455
4454
  return "wss://api.bot.qq.com/websocket";
4456
4455
  }
4457
4456
  try {
4458
- const { data } = await axios.get(path.join(apiUrl, "gateway"), {
4457
+ const { data } = await axios.get(`${QQAPIBASEURL}/gateway`, {
4459
4458
  headers: {
4460
4459
  Authorization: `QQBot ${accessToken}`,
4461
4460
  "User-Agent": getUserAgent()
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@karinjs/adapter-qqbot",
3
- "version": "3.0.7",
3
+ "version": "3.0.8",
4
4
  "description": "karin adapter for QQ Official Bot (2.0)",
5
5
  "homepage": "https://github.com/KarinJS/karin-plugin-adapter-qqbot",
6
6
  "bugs": {