koishi-plugin-cat-raising 1.3.4 → 1.3.5

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/lib/index.js +8 -0
  2. package/package.json +1 -1
package/lib/index.js CHANGED
@@ -323,6 +323,14 @@ async function fetchBilibiliInfo(ctx, roomId) {
323
323
  anchorName = infoByRoom2?.data?.anchor_info?.base_info?.uname || infoByRoom2?.data?.anchor_info?.uname || anchorName;
324
324
  } catch {
325
325
  }
326
+ try {
327
+ const anchorInRoom = await ctx.http.get(
328
+ `https://api.live.bilibili.com/live_user/v1/guard/get_anchor_in_room?roomid=${roomId}`,
329
+ { headers: commonHeaders }
330
+ );
331
+ anchorName = anchorInRoom?.data?.info?.uname || anchorName;
332
+ } catch {
333
+ }
326
334
  try {
327
335
  const anchorInfo2 = await ctx.http.get(
328
336
  `https://api.bilibili.com/x/space/acc/info?mid=${uid}`,
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "koishi-plugin-cat-raising",
3
3
  "description": "",
4
- "version": "1.3.4",
4
+ "version": "1.3.5",
5
5
  "main": "lib/index.js",
6
6
  "typings": "lib/index.d.ts",
7
7
  "files": [