Seperate kernel version from command.about.serverInfo.os
This commit is contained in:
parent
4eea38cca7
commit
c1ec0799b9
2 changed files with 12 additions and 6 deletions
|
@ -56,7 +56,7 @@ const aboutBot = function (c) {
|
||||||
const os2 = function (o2, l) {
|
const os2 = function (o2, l) {
|
||||||
switch (o2) {
|
switch (o2) {
|
||||||
case 'win32':
|
case 'win32':
|
||||||
return `${os.version()} (${os.release})`
|
return `${os.version()}`
|
||||||
case 'android':{
|
case 'android':{
|
||||||
try {
|
try {
|
||||||
const version = cp.execSync('getprop ro.build.version.release').toString('UTF-8').split('\n')[0]
|
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) {
|
if (osrelease2.PRETTY_NAME) {
|
||||||
return getMessage(l, '%s %s', [osrelease2.PRETTY_NAME, os.release()])
|
return getMessage(l, '%s', [osrelease2.PRETTY_NAME])
|
||||||
} else {
|
} else {
|
||||||
return getMessage(l, `command.about.serverInfo.os.${o2}`, [os.release()])
|
return getMessage(l, `command.about.serverInfo.os.${o2}`)
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
return getMessage(l, `command.about.serverInfo.os.${o2}`, [os.release()])
|
return getMessage(l, `command.about.serverInfo.os.${o2}`)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
default:
|
default:
|
||||||
|
@ -121,6 +121,11 @@ const aboutServer = function (c) {
|
||||||
return os2(process.platform, c.lang)
|
return os2(process.platform, c.lang)
|
||||||
})
|
})
|
||||||
|
|
||||||
|
// Kernel version: os.release()
|
||||||
|
displayInfo('command.about.serverInfo.kernelVer', () => {
|
||||||
|
return os.release()
|
||||||
|
})
|
||||||
|
|
||||||
// Processor
|
// Processor
|
||||||
if (os.cpus()[0]) {
|
if (os.cpus()[0]) {
|
||||||
displayInfo('command.about.serverInfo.processor', () => {
|
displayInfo('command.about.serverInfo.processor', () => {
|
||||||
|
|
|
@ -86,11 +86,12 @@
|
||||||
"command.test.colorSecondary": "Secondary color",
|
"command.test.colorSecondary": "Secondary color",
|
||||||
"command.about.serverInfo.os.android": "Android %s",
|
"command.about.serverInfo.os.android": "Android %s",
|
||||||
"command.about.serverInfo.os.android.noVersion": "Android",
|
"command.about.serverInfo.os.android.noVersion": "Android",
|
||||||
"command.about.serverInfo.os.freebsd": "FreeBSD %s",
|
"command.about.serverInfo.os.freebsd": "FreeBSD",
|
||||||
"command.about.serverInfo.os.linux": "Linux %s",
|
"command.about.serverInfo.os.linux": "Linux",
|
||||||
"command.about.serverInfo.os.macos": "macOS",
|
"command.about.serverInfo.os.macos": "macOS",
|
||||||
"command.about.serverInfo.os.macos_old": "OS X",
|
"command.about.serverInfo.os.macos_old": "OS X",
|
||||||
"command.about.serverInfo.os": "Operating system",
|
"command.about.serverInfo.os": "Operating system",
|
||||||
|
"command.about.serverInfo.kernelVer": "Kernel version",
|
||||||
"command.about.serverInfo.processor": "CPU",
|
"command.about.serverInfo.processor": "CPU",
|
||||||
"command.about.serverInfo.arch": "Architecture",
|
"command.about.serverInfo.arch": "Architecture",
|
||||||
"command.about.serverInfo.osUsername": "Username",
|
"command.about.serverInfo.osUsername": "Username",
|
||||||
|
|
Loading…
Reference in a new issue