mioki 0.6.0 → 0.6.2
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.cjs +15 -5
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +4 -0
- package/dist/index.d.mts +4 -0
- package/dist/index.mjs +15 -5
- package/dist/index.mjs.map +1 -1
- package/package.json +2 -2
- package/readme.md +4 -4
package/dist/index.cjs
CHANGED
|
@@ -937,7 +937,7 @@ function getMiokiLogger(level) {
|
|
|
937
937
|
|
|
938
938
|
//#endregion
|
|
939
939
|
//#region package.json
|
|
940
|
-
var version = "0.6.
|
|
940
|
+
var version = "0.6.2";
|
|
941
941
|
|
|
942
942
|
//#endregion
|
|
943
943
|
//#region src/actions.ts
|
|
@@ -1339,10 +1339,12 @@ async function getMiokiStatus(bot) {
|
|
|
1339
1339
|
const osArch = node_os.default.arch();
|
|
1340
1340
|
const isInUnix = ["Linux", "Darwin"].includes(osType);
|
|
1341
1341
|
const arch = ArchMap[osArch] || osArch;
|
|
1342
|
-
const [osInfo, localPlugins, versionInfo] = await Promise.all([
|
|
1342
|
+
const [osInfo, localPlugins, versionInfo, friendList, groupList] = await Promise.all([
|
|
1343
1343
|
systeminformation.default.osInfo(),
|
|
1344
1344
|
findLocalPlugins(),
|
|
1345
|
-
bot.getVersionInfo()
|
|
1345
|
+
bot.getVersionInfo(),
|
|
1346
|
+
bot.getFriendList(),
|
|
1347
|
+
bot.getGroupList()
|
|
1346
1348
|
]);
|
|
1347
1349
|
const pluginCount = localPlugins.length + BUILTIN_PLUGINS.length;
|
|
1348
1350
|
const system = isInUnix ? {
|
|
@@ -1360,13 +1362,19 @@ async function getMiokiStatus(bot) {
|
|
|
1360
1362
|
return {
|
|
1361
1363
|
bot: {
|
|
1362
1364
|
uin: bot.uin,
|
|
1363
|
-
nickname: bot.nickname
|
|
1365
|
+
nickname: bot.nickname,
|
|
1366
|
+
friends: friendList.length,
|
|
1367
|
+
groups: groupList.length
|
|
1364
1368
|
},
|
|
1365
1369
|
plugins: {
|
|
1366
1370
|
enabled: runtimePlugins.size,
|
|
1367
1371
|
total: pluginCount
|
|
1368
1372
|
},
|
|
1369
|
-
stats: {
|
|
1373
|
+
stats: {
|
|
1374
|
+
uptime: process.uptime() * 1e3,
|
|
1375
|
+
send: bot.stat.send.group + bot.stat.send.private,
|
|
1376
|
+
receive: bot.stat.recv.group + bot.stat.recv.private
|
|
1377
|
+
},
|
|
1370
1378
|
versions: {
|
|
1371
1379
|
node: nodeVersion,
|
|
1372
1380
|
mioki: version,
|
|
@@ -1407,7 +1415,9 @@ async function getMiokiStatusStr(client) {
|
|
|
1407
1415
|
return `
|
|
1408
1416
|
👤 ${bot.nickname}
|
|
1409
1417
|
🆔 ${bot.uin}
|
|
1418
|
+
📋 ${localNum(bot.friends)} 好友 / ${localNum(bot.groups)} 群
|
|
1410
1419
|
🧩 启用了 ${localNum(plugins.enabled)} 个插件,共 ${localNum(plugins.total)} 个
|
|
1420
|
+
📮 收 ${localNum(stats.receive)} 条,发 ${localNum(stats.send)} 条
|
|
1411
1421
|
🚀 ${(0, filesize.filesize)(memory.rss.used, { round: 1 })}/${memory.percent}%
|
|
1412
1422
|
⏳ 已运行 ${(0, pretty_ms.default)(stats.uptime, {
|
|
1413
1423
|
hideYear: true,
|