Archived
1
0
Fork 0
This commit is contained in:
多羅狼 2023-03-14 20:37:04 +08:00 committed by GitHub
parent 0475a4bcbb
commit 479204be3d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 3 additions and 11 deletions

View file

@ -39,7 +39,7 @@
"core.module.message.reload.base": "Failed: \"${module}\" is a base module, thus cannot be reloaded.",
"core.module.message.reload.confirm": "This action will reload the following modules at the same time: \n${modules}\nContinue?",
"core.module.message.reload.permission.denied": "Failed: You don't have permission to reload modules.",
"core.module.message.recommends": "It is recommended to enable the following module(s) at the same time\n${msgs}\nProceed?",
"core.module.message.recommends": "It is recommended to enable the following module(s) at the same time: \n${msgs}\nProceed?",
"core.module.message.help.support_regex": "This module supports regular expressions, the message will match with the following: ",
"core.module.message.help.regex.detail": "(${msg})",
"core.module.message.help.regex.no_information": "No description",

View file

@ -98,7 +98,7 @@
"core.version.help": "查看机器人的版本号。",
"core.version.message": "当前机器人版本号:${version_tag}${commit}",
"core.ping.help": "获取机器人状态。",
"core.ping.message.detail": "系统启动时间:${system_boot_time}\n机器人已运行${bot_running_time}\nPython版本:${python_version}\n处理器型号${cpu_brand}\n当前处理器使用率${cpu_usage}%\n物理内存${ram}M 使用率:${ram_percent}%\nSwap内存${swap}M 使用率:${swap_percent}%\n磁盘容量${disk_space}G/${disk_space_total}G",
"core.ping.message.detail": "系统启动时间:${system_boot_time}\n机器人已运行${bot_running_time}\nPython 版本:${python_version}\n处理器型号${cpu_brand}\n当前处理器使用率${cpu_usage}%\n物理内存${ram}M 使用率:${ram_percent}%\nSwap 内存:${swap}M 使用率:${swap_percent}%\n磁盘容量${disk_space}G/${disk_space_total}G",
"core.ping.failed": "无法获取。",
"core.admin.help": "一些群聊管理员可使用的命令。",
"core.admin.help.add": "设置成员为机器人管理员,实现不设置成员为群聊管理员的情况下管理机器人的功能。已是群聊管理员无需设置此项目。",

View file

@ -62,15 +62,7 @@ async def _(msg: Bot.MessageSession):
except Exception:
FriendList = msg.locale.t('core.ping.failed')
"""
result += (f"\n系统启动时间:{Boot_Start}"
+ f"\n机器人已运行:{timediff}"
+ f"\nPython版本{platform.python_version()}"
+ f"\n处理器型号:{get_cpu_info()['brand_raw']}"
+ f"\n当前处理器使用率:{Cpu_usage}%"
+ f"\n物理内存:{RAM}M 使用率:{RAM_percent}%"
+ f"\nSwap内存{Swap}M 使用率:{Swap_percent}%"
+ f"\n磁盘容量:{Disk}G/{DiskTotal}G"
)
result += msg.locale.t("core.ping.message.detail", system_boot_time=Boot_Start, bot_running_time=timediff, python_version=platform.python_version(), cpu_brand=get_cpu_info()['brand_raw'], cpu_usage=Cpu_usage, ram=RAM, ram_percent=RAM_percent, swap=Swap, swap_percent=Swap_percent, disk_space=disk, disk_space_total=DiskTotal)
await msg.finish(result)