@karinjs/adapter-qqbot 3.0.1 → 3.0.3

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.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import { l as basename, n as config, r as getConfig, s as pkg, t as bindHandlers } from "./config-D1_LqrcJ.js";
2
2
  import { t as log } from "./logger-sza6kuy3.js";
3
- import { i as random, n as fakeEvent, r as getImageSize, t as QQAPIBASEURL } from "./utils-lb9ZdWay.js";
3
+ import { i as random, n as fakeEvent, r as getImageSize, t as QQAPIBASEURL } from "./utils-QpIUJhxK.js";
4
4
  import { t as getMessageStore } from "./message-CVJVFAGR.js";
5
5
  import karin, { AdapterBase, app, buttonHandle, common, createDirectMessage, createFriendDecreaseNotice, createFriendIncreaseNotice, createFriendMessage, createGroupApplyRequest, createGroupInviteRequest, createGroupMemberAddNotice, createGroupMemberDelNotice, createGroupMessage, createGuildMessage, fileToUrl, fileToUrlHandlerKey, handler, karin as karin$1, karinToQQBot, logger, registerBot, segment, senderGroup, unregisterBot } from "node-karin";
6
6
  import path from "path";
@@ -8,7 +8,7 @@ import "@karinjs/geturls";
8
8
 
9
9
  //#region src/utils/common.ts
10
10
  /** QQBot统一API地址 */
11
- const QQAPIBASEURL = "https://api.bot.q.qq.com";
11
+ const QQAPIBASEURL = "https://api.bot.qq.com";
12
12
  /** 随机数 */
13
13
  const random = (min, max) => lodash.random(min, max);
14
14
  /**
@@ -1,6 +1,6 @@
1
1
  import { a as readConfigFile, n as config, o as writeConfig, s as pkg } from "./config-D1_LqrcJ.js";
2
- import "./utils-lb9ZdWay.js";
3
- import { components, defineConfig } from "node-karin";
2
+ import "./utils-QpIUJhxK.js";
3
+ import karin, { components, defineConfig } from "node-karin";
4
4
 
5
5
  //#region src/web.config.ts
6
6
  const unwrapValue = (value) => {
@@ -56,7 +56,13 @@ var web_config_default = defineConfig({
56
56
  const data = [];
57
57
  config().forEach((item) => {
58
58
  data.push({
59
- title: item.appId,
59
+ title: (() => {
60
+ try {
61
+ const bot = karin.getBot(item.appId);
62
+ if (bot) return bot.account.name;
63
+ } catch {}
64
+ return item.appId;
65
+ })(),
60
66
  subtitle: item.appId,
61
67
  appId: item.appId,
62
68
  secret: item.secret,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@karinjs/adapter-qqbot",
3
- "version": "3.0.1",
3
+ "version": "3.0.3",
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": {