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.
- package/lib/index.js +8 -0
- 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}`,
|