koishi-plugin-adapter-onebot-multi 0.0.12 → 0.0.13

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 +6 -2
  2. package/package.json +1 -1
package/lib/index.js CHANGED
@@ -1666,6 +1666,10 @@ var StatusPanel = class {
1666
1666
  }
1667
1667
  try {
1668
1668
  await bot.internal.setQqProfile(nickname, "", "", "", "");
1669
+ const loginInfo = await bot.internal.getLoginInfo();
1670
+ if (loginInfo?.nickname) {
1671
+ bot.user.name = loginInfo.nickname;
1672
+ }
1669
1673
  this.ctx.logger.info(`修改 Bot ${selfId} 昵称为: ${nickname}`);
1670
1674
  ctx.body = { success: true };
1671
1675
  } catch (error) {
@@ -2253,7 +2257,7 @@ var StatusPanel = class {
2253
2257
  const selfIdDisplay = bot.selfId ? ('QQ: ' + bot.selfId) : '等待连接...'
2254
2258
  const uptime = bot.startupTime ? formatUptime(bot.startupTime) : '-'
2255
2259
  const lastMsg = bot.lastMessageTime ? new Date(bot.lastMessageTime * 1000).toLocaleTimeString() : '-'
2256
- const avatarUrl = bot.selfId ? ('http://q.qlogo.cn/headimg_dl?dst_uin=' + bot.selfId + '&spec=640') : ''
2260
+ const avatarUrl = bot.selfId ? ('http://q.qlogo.cn/headimg_dl?dst_uin=' + bot.selfId + '&spec=640&t=' + Date.now()) : ''
2257
2261
 
2258
2262
  return '<div class="bot-card' + (!bot.enabled ? ' disabled' : '') + '">' +
2259
2263
  '<div class="bot-header">' +
@@ -2524,7 +2528,7 @@ var StatusPanel = class {
2524
2528
  return `
2525
2529
  <div class="bot-card">
2526
2530
  <div class="bot-header">
2527
- <img class="bot-avatar" src="http://q.qlogo.cn/headimg_dl?dst_uin=${bot.selfId}&spec=640" alt="avatar">
2531
+ <img class="bot-avatar" src="http://q.qlogo.cn/headimg_dl?dst_uin=${bot.selfId}&spec=640&t=${Date.now()}" alt="avatar">
2528
2532
  <div class="bot-info">
2529
2533
  <div class="bot-id">${displayName}</div>
2530
2534
  <a class="bot-protocol" href="tencent://AddContact/?fromId=45&fromSubId=1&subcmd=all&uin=${bot.selfId}" target="_blank" title="点击添加好友">QQ: ${bot.selfId}</a>
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "koishi-plugin-adapter-onebot-multi",
3
3
  "description": "奶龙bot定制版onebot适配器,支持自动负载均衡,适配器级黑名单/白名单,提供webui,可指定端口",
4
- "version": "0.0.12",
4
+ "version": "0.0.13",
5
5
  "main": "lib/index.js",
6
6
  "typings": "lib/index.d.ts",
7
7
  "files": [