Seperate version number from settings

This commit is contained in:
7cc5c4f330d47060 2024-07-22 12:34:31 -04:00
parent 140e0e3a96
commit 19c9974492
4 changed files with 7 additions and 4 deletions

View file

@ -1,11 +1,11 @@
// This is not C source code
//const settings = require('../settings.json')
const settings = require("../../settings.json")
const version = require("../../version.json")
module.exports = {
execute: function (c) {
c.reply('{"text":"'+settings.name+' - a minecraft bot made by 77c8f4699b732c11 / a5a06d596f15c7db"}');
c.reply('{"text":""}');
c.reply('{"text":"Version '+settings.version+'"}');
c.reply('{"text":"Version '+version.bot+'"}');
c.reply('{"text":""}');
c.reply('{"text":"To view system information, run the command \\"serverinfo\\"."}')
},

View file

@ -2,6 +2,7 @@ const os = require('os')
const cp = require('child_process')
const settings = require('../../settings.json')
const timeformat = require('../../util/timeformat.js')
const version = require("../../version.json")
const fs=require("fs")
const gr = function (text, value, color) {
if (!color) color = 'white'
@ -80,7 +81,7 @@ module.exports = {
c.reply(gr('Device model', dBrand+dModel, 'green'))
}
c.reply(gr('Bot name', settings.name, 'yellow'))
c.reply(gr('Bot version', settings.version, 'yellow'))
c.reply(gr('Bot version', version.bot, 'yellow'))
},
desc: 'Get system/bot info (ported from V9). Not complete.',
usage: ''

View file

@ -1,7 +1,6 @@
{
"secret":"./settings_s.json",
"name": "Minecraft Bot",
"version": "1.0.0",
"version_mc": "1.20.4",
"prefix":[
"ubot:",

3
version.json Normal file
View file

@ -0,0 +1,3 @@
{
"bot": "10.0.0-alpha.8"
}