This commit is contained in:
7cc5c4f330d47060 2025-02-21 18:49:44 -05:00
parent 539ca480ca
commit b3374aeb13
Signed by: 7cc5c4f330d47060
SSH key fingerprint: SHA256:e+4tcZut1nBpe10PqjaO+Rvie0Q7W4qIvFzcUw+7riA
4 changed files with 65 additions and 27 deletions

View file

@ -29,33 +29,67 @@ const aboutBot = c => {
})
}
c.reply({ text: '' })
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')
if(version.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
},
value: { // Added twice for backwards compatibility
text: getMessage(c.lang, 'command.about.sourceCode.openInBrowser')
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'),
color: c.colors.secondary,
with: [
{
text: version.originalName,
color: c.colors.primary
},
{
text: version.originalAuthor,
color: c.colors.primary
},
{
text: version.originalRepo,
color: c.colors.primary,
clickEvent: {
action: 'open_url',
value: version.originalRepo
},
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

@ -51,6 +51,7 @@ export default {
'command.about.preRelease': "This is a development version - there may be errors, and features may be changed or removed at any time. Please report any errors to the bot's developer.",
'command.about.sourceCode': 'Source code: %s',
'command.about.license': 'This bot is free and open-source software and is available under the terms of the MIT license.',
'command.about.fork': 'This bot is based on %s by %s, which is available at %s under the MIT license.',
'command.about.subcommands': "This command has subcommands to find out more about this bot - try running the commands \"servers\" for a list of Minecraft servers the bot is connected to, or \"serverinfo\" for technical specifications of the bot's server.",
'command.about.sourceCode.openInBrowser': 'Click to open the source code link in your default browser',
'command.cloop.error.tooShort': 'Command loops must have a rate above 20ms.',

View file

@ -2,8 +2,7 @@ export default {
terminalMode: 'blackTerminal_24bit', // Terminal mode. Most modern terminals support 24-bit color
version_mc: '1.21.1', // Minecraft version to connect with
defaultLang: 'en-US', // Default language
keyTrusted: '3e9f13473eec8d64c3eabf6385e3f8585f0af39ed30a8db9a4c8d8bcfa35659d7d06a58b342bfd2db5e3cbb4003a81da8f9d25f7cce1ad26face8e2871c3b217', // Trusted key. It is strongly recommended to change this key before starting the bot for the first time.
keyOwner: '17d2c6c53b8919dc1ec22c42845018ac389824c4d73a68572b7fc57ff1442c6bbf9924d5ee5fa90cb23e384278d469c4e260208265b8ba2e2bc873045d5ed42e', // Owner key. It is strongly recommended to change this key before starting the bot for the first time, as people can get access to your computer through the eval command.
// Insert the trusted key (keyTrusted) and owner key (keyOwner) here. Both of these values should be strings, and they should not be identical. Do not tell anyone the keys unless you trust them, as they can be used to get admin access to the bot, and (in the case of the owner key) access to your computer.
colors: { // All colors the bot uses
primary: '#EECCFF', // Used for primary subjects (e.g. items in lists)
secondary: '#DD99FF', // Used for secondary subjects (e.g. list labels)

View file

@ -3,5 +3,9 @@ export default {
botVersion: '12.0.0-alpha.2', // Version of the bot. This is different from the one in package.json, which has to be updated seperately.
botAuthor: 'owo439895035', // The creator of the bot
isPreRelease: true, // If this version is a pre-release version. Used by the about command to show a warning if set to true.
sourceURL: 'https://code.chipmunk.land/7cc5c4f330d47060/botv12' // Source code repository URL. This is different from the one in package.json.
sourceURL: 'https://code.chipmunk.land/7cc5c4f330d47060/botv12', // Source code repository URL. This is different from the one in package.json.
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
}