2024-07-28 02:37:31 -04:00
|
|
|
const version = require('../../version.json')
|
2024-07-27 02:39:18 -04:00
|
|
|
const settings = require('../../settings.json')
|
|
|
|
const getMessage = require('../../util/lang.js')
|
|
|
|
const cp = require('child_process')
|
|
|
|
module.exports = {
|
|
|
|
execute: function (c) {
|
|
|
|
c.reply({
|
2024-07-28 02:37:31 -04:00
|
|
|
translate: getMessage(c.lang, 'command.about.author'),
|
2024-07-27 02:39:18 -04:00
|
|
|
color: c.colors.secondary,
|
2024-07-28 02:37:31 -04:00
|
|
|
with: [
|
2024-07-27 02:39:18 -04:00
|
|
|
{
|
2024-07-28 02:37:31 -04:00
|
|
|
text: settings.name,
|
2024-07-27 02:39:18 -04:00
|
|
|
color: c.colors.primary
|
|
|
|
}
|
|
|
|
]
|
2024-07-28 02:37:31 -04:00
|
|
|
})
|
|
|
|
c.reply({ text: '' })
|
|
|
|
const botVersion = version.bot
|
|
|
|
let gitCommit
|
2024-07-27 02:39:18 -04:00
|
|
|
try {
|
2024-07-28 02:37:31 -04:00
|
|
|
gitCommit = cp.execSync('git rev-parse --short HEAD').toString('UTF-8').split('\n')[0]
|
|
|
|
} catch (e) {
|
2024-07-27 02:39:18 -04:00
|
|
|
gitCommit = false
|
|
|
|
}
|
2024-07-28 02:37:31 -04:00
|
|
|
if (gitCommit) {
|
2024-07-27 02:39:18 -04:00
|
|
|
c.reply({
|
2024-07-28 02:37:31 -04:00
|
|
|
translate: getMessage(c.lang, 'command.about.version'),
|
2024-07-27 02:39:18 -04:00
|
|
|
color: c.colors.secondary,
|
2024-07-28 02:37:31 -04:00
|
|
|
with: [
|
2024-07-27 02:39:18 -04:00
|
|
|
[
|
|
|
|
{
|
2024-07-28 02:37:31 -04:00
|
|
|
text: botVersion,
|
2024-07-27 02:39:18 -04:00
|
|
|
color: c.colors.primary
|
|
|
|
},
|
|
|
|
{
|
2024-07-28 02:37:31 -04:00
|
|
|
translate: ' (%s)',
|
|
|
|
color: 'white',
|
|
|
|
with: [
|
2024-07-27 02:39:18 -04:00
|
|
|
{
|
2024-07-28 02:37:31 -04:00
|
|
|
text: gitCommit,
|
2024-07-27 02:39:18 -04:00
|
|
|
color: c.colors.primary
|
|
|
|
}
|
|
|
|
]
|
|
|
|
}
|
|
|
|
]
|
|
|
|
]
|
2024-07-28 02:37:31 -04:00
|
|
|
})
|
2024-07-27 02:39:18 -04:00
|
|
|
} else {
|
|
|
|
c.reply({
|
2024-07-28 02:37:31 -04:00
|
|
|
translate: getMessage(c.lang, 'command.about.version'),
|
2024-07-27 02:39:18 -04:00
|
|
|
color: c.colors.secondary,
|
2024-07-28 02:37:31 -04:00
|
|
|
with: [
|
2024-07-27 02:39:18 -04:00
|
|
|
{
|
2024-07-28 02:37:31 -04:00
|
|
|
text: botVersion,
|
2024-07-27 02:39:18 -04:00
|
|
|
color: c.colors.primary
|
|
|
|
}
|
|
|
|
]
|
2024-07-28 02:37:31 -04:00
|
|
|
})
|
2024-07-27 02:39:18 -04:00
|
|
|
}
|
2024-07-28 02:37:31 -04:00
|
|
|
c.reply({ text: '' })
|
2024-07-27 02:39:18 -04:00
|
|
|
c.reply({
|
2024-07-28 02:37:31 -04:00
|
|
|
translate: getMessage(c.lang, 'command.about.serverinfo'),
|
2024-07-27 02:39:18 -04:00
|
|
|
color: c.colors.secondary,
|
|
|
|
with: [
|
|
|
|
{
|
2024-07-28 02:37:31 -04:00
|
|
|
translate: '"%s"',
|
|
|
|
color: 'white',
|
2024-07-27 02:39:18 -04:00
|
|
|
with: [
|
|
|
|
{
|
2024-07-28 02:37:31 -04:00
|
|
|
text: 'serverinfo',
|
2024-07-27 02:39:18 -04:00
|
|
|
color: c.colors.primary
|
|
|
|
}
|
|
|
|
]
|
|
|
|
}
|
|
|
|
]
|
|
|
|
})
|
|
|
|
},
|
2024-07-28 02:37:31 -04:00
|
|
|
aliases: ['info']
|
2024-07-27 02:39:18 -04:00
|
|
|
}
|