diff --git a/apps/state.js b/apps/state.js index 15a52c9..79927f8 100644 --- a/apps/state.js +++ b/apps/state.js @@ -1,6 +1,6 @@ import plugin from '../../../lib/plugins/plugin.js' import os from 'os' -import { Config } from '../components/index.js' +import { Config, Version } from '../components/index.js' import { State, common, puppeteer } from '../model/index.js' import { platform, status } from '../constants/other.js' import moment from 'moment' @@ -85,6 +85,8 @@ export class NewState extends plugin { chartData: JSON.stringify(common.checkIfEmpty(State.chartData, ['echarts_theme', 'cpu', 'ram']) ? undefined : State.chartData), // 头像 portrait: e.bot?.avatar ?? `https://q1.qlogo.cn/g?b=qq&s=0&nk=${this.Bot.uin}`, + // 机器人名称 + BotName: Version.name, // 运行时间 runTime: common.formatTime(Date.now() / 1000 - this.Bot.stat?.start_time, 'dd天hh小时mm分', false), // 日历 diff --git a/components/Version.js b/components/Version.js index 9cada20..97d70f7 100644 --- a/components/Version.js +++ b/components/Version.js @@ -1,4 +1,3 @@ - import fs from 'fs' import _ from 'lodash' import cfg from '../../../lib/config/config.js' @@ -92,6 +91,8 @@ if (yunzaiName == 'miao-yunzai') { yunzaiName = 'Miao-Yunzai' } else if (yunzaiName == 'yunzai') { yunzaiName = 'Yunzai-Bot' +} else if (yunzaiName == 'trss-yunzai') { + yunzaiName = 'TRSS-Yunzai' } else { yunzaiName = _.capitalize(yunzaiName) } diff --git a/constants/other.js b/constants/other.js index 9295da5..c5276de 100644 --- a/constants/other.js +++ b/constants/other.js @@ -35,7 +35,7 @@ export const platform = { 3: 'android_Watch', 4: 'macOS', 5: 'iPad', - 6: 'old_Android' + 6: 'Tim' } /** 在线状态 */ diff --git a/resources/state/state.html b/resources/state/state.html index c044c4c..7b716e5 100644 --- a/resources/state/state.html +++ b/resources/state/state.html @@ -17,7 +17,7 @@

{{status}}({{platform}}) | 收{{recv}} | 发{{sent}} | 图片{{screenshot}} | 好友{{friendQuantity}} | 群{{groupQuantity}}

-

Yunzai-Bot 已运行 {{runTime}} | 系统运行 {{systime}}

+

{{BotName}} 已运行 {{runTime}} | 系统运行 {{systime}}

{{calendar}} | Nodejs {{nodeVersion}} | {{osPlatform}}