Updates to about command

This commit is contained in:
7cc5c4f330d47060 2025-02-21 19:02:14 -05:00
parent 8b4f729025
commit c48f7b9060
Signed by: 7cc5c4f330d47060
SSH key fingerprint: SHA256:e+4tcZut1nBpe10PqjaO+Rvie0Q7W4qIvFzcUw+7riA
3 changed files with 28 additions and 25 deletions

View file

@ -13,6 +13,7 @@ import { readdirSync, readFileSync } from 'node:fs'
import botVersion from '../util/version.js'
import version from '../version.js'
import { bots } from '../index.js'
import settings from '../settings.js'
const aboutBot = c => {
c.reply({
@ -36,34 +37,11 @@ const aboutBot = c => {
})
}
c.reply({ text: '' })
if(version.officialUbot){
if(settings.officialUbot){
c.reply({
text: getMessage(c.lang, 'command.about.license'),
color: c.colors.secondary
})
c.reply({
translate: getMessage(c.lang, 'command.about.sourceCode'),
color: c.colors.secondary,
with: [
{
text: version.sourceURL,
color: c.colors.primary,
clickEvent: {
action: 'open_url',
value: version.sourceURL
},
hoverEvent: {
action: 'show_text',
contents: {
text: getMessage(c.lang, 'command.about.sourceCode.openInBrowser')
},
value: { // Added twice for backwards compatibility
text: getMessage(c.lang, 'command.about.sourceCode.openInBrowser')
}
}
}
]
})
} else {
c.reply({
translate: getMessage(c.lang, 'command.about.fork'),
@ -97,6 +75,31 @@ const aboutBot = c => {
]
})
}
if(version.sourceURL){
c.reply({
translate: getMessage(c.lang, 'command.about.sourceCode'),
color: c.colors.secondary,
with: [
{
text: version.sourceURL,
color: c.colors.primary,
clickEvent: {
action: 'open_url',
value: version.sourceURL
},
hoverEvent: {
action: 'show_text',
contents: {
text: getMessage(c.lang, 'command.about.sourceCode.openInBrowser')
},
value: { // Added twice for backwards compatibility
text: getMessage(c.lang, 'command.about.sourceCode.openInBrowser')
}
}
}
]
})
}
c.reply({ text: '' })
c.reply({
text: getMessage(c.lang, 'command.about.subcommands'),

View file

@ -17,6 +17,7 @@ export default {
'es"',
'd"'
],
officialUbot: false // Used in production to show correct information in about command. If you set this to true, or otherwise remove the check, please ensure that you still comply with the license
servers: [ // Server list
{
host: 'kaboom.pw', // Server address

View file

@ -7,5 +7,4 @@ export default {
originalRepo: 'https://code.chipmunk.land/7cc5c4f330d47060/botv12',
originalName: 'botv12',
originalAuthor: 'owo439895035', //These three fields should only be changed in forks of forks, if the original fork is compliant with MIT
officialUbot: false // Used in production to show correct information in about command. If you set this to true, or otherwise remove the check, please make sure that you still comply with the license
}