Seperate kernel version from command.about.serverInfo.os

This commit is contained in:
7cc5c4f330d47060 2024-08-18 13:17:52 -04:00
parent 4eea38cca7
commit c1ec0799b9
Signed by: 7cc5c4f330d47060
SSH key fingerprint: SHA256:e+4tcZut1nBpe10PqjaO+Rvie0Q7W4qIvFzcUw+7riA
2 changed files with 12 additions and 6 deletions

View file

@ -56,7 +56,7 @@ const aboutBot = function (c) {
const os2 = function (o2, l) {
switch (o2) {
case 'win32':
return `${os.version()} (${os.release})`
return `${os.version()}`
case 'android':{
try {
const version = cp.execSync('getprop ro.build.version.release').toString('UTF-8').split('\n')[0]
@ -78,12 +78,12 @@ const os2 = function (o2, l) {
}
if (osrelease2.PRETTY_NAME) {
return getMessage(l, '%s %s', [osrelease2.PRETTY_NAME, os.release()])
return getMessage(l, '%s', [osrelease2.PRETTY_NAME])
} else {
return getMessage(l, `command.about.serverInfo.os.${o2}`, [os.release()])
return getMessage(l, `command.about.serverInfo.os.${o2}`)
}
} else {
return getMessage(l, `command.about.serverInfo.os.${o2}`, [os.release()])
return getMessage(l, `command.about.serverInfo.os.${o2}`)
}
}
default:
@ -121,6 +121,11 @@ const aboutServer = function (c) {
return os2(process.platform, c.lang)
})
// Kernel version: os.release()
displayInfo('command.about.serverInfo.kernelVer', () => {
return os.release()
})
// Processor
if (os.cpus()[0]) {
displayInfo('command.about.serverInfo.processor', () => {

View file

@ -86,11 +86,12 @@
"command.test.colorSecondary": "Secondary color",
"command.about.serverInfo.os.android": "Android %s",
"command.about.serverInfo.os.android.noVersion": "Android",
"command.about.serverInfo.os.freebsd": "FreeBSD %s",
"command.about.serverInfo.os.linux": "Linux %s",
"command.about.serverInfo.os.freebsd": "FreeBSD",
"command.about.serverInfo.os.linux": "Linux",
"command.about.serverInfo.os.macos": "macOS",
"command.about.serverInfo.os.macos_old": "OS X",
"command.about.serverInfo.os": "Operating system",
"command.about.serverInfo.kernelVer": "Kernel version",
"command.about.serverInfo.processor": "CPU",
"command.about.serverInfo.arch": "Architecture",
"command.about.serverInfo.osUsername": "Username",