Update commands/info.js
This commit is contained in:
parent
8b6ee277cc
commit
f6a2a6bfe7
1 changed files with 9 additions and 8 deletions
|
@ -35,7 +35,7 @@ module.exports = {
|
||||||
const MinecraftProtocolVersion =
|
const MinecraftProtocolVersion =
|
||||||
packageJSON.dependencies["minecraft-protocol"];
|
packageJSON.dependencies["minecraft-protocol"];
|
||||||
|
|
||||||
if(!bot.options.Core.CorelessMode){
|
if(bot.options.Core.CorelessMode){
|
||||||
bot.chat(ChatMessage.fromNotch(`${process.env["buildstring"]}`).toMotd().replaceAll('§', '&'))
|
bot.chat(ChatMessage.fromNotch(`${process.env["buildstring"]}`).toMotd().replaceAll('§', '&'))
|
||||||
await sleep(1000)
|
await sleep(1000)
|
||||||
|
|
||||||
|
@ -123,7 +123,7 @@ await sleep(1000)
|
||||||
);
|
);
|
||||||
break;
|
break;
|
||||||
case "discord":
|
case "discord":
|
||||||
if(!bot.options.Core.CorelessMode){
|
if(bot.options.Core.CorelessMode){
|
||||||
bot.chat(`${bot.options.discord.invite}`)
|
bot.chat(`${bot.options.discord.invite}`)
|
||||||
}else {
|
}else {
|
||||||
source.sendFeedback({
|
source.sendFeedback({
|
||||||
|
@ -148,7 +148,7 @@ await sleep(1000)
|
||||||
break;
|
break;
|
||||||
case "serverinfo":
|
case "serverinfo":
|
||||||
const os = require("os");
|
const os = require("os");
|
||||||
if(!bot.options.Core.CorelessMode){
|
if(bot.options.Core.CorelessMode){
|
||||||
bot.chat(`Hostname: ${os.hostname()}`)
|
bot.chat(`Hostname: ${os.hostname()}`)
|
||||||
await sleep(1000)
|
await sleep(1000)
|
||||||
bot.chat(`Working Directory: ${path.join(__dirname, "..")}`)
|
bot.chat(`Working Directory: ${path.join(__dirname, "..")}`)
|
||||||
|
@ -224,7 +224,7 @@ await sleep(1000)
|
||||||
*/
|
*/
|
||||||
break;
|
break;
|
||||||
case "logininfo":
|
case "logininfo":
|
||||||
if (!bot.options.Core.CorelessMode){
|
if (bot.options.Core.CorelessMode){
|
||||||
bot.chat(`Bot Username: ${bot.username}`)
|
bot.chat(`Bot Username: ${bot.username}`)
|
||||||
await sleep(1000)
|
await sleep(1000)
|
||||||
bot.chat(`Bot uuid "${bot.uuid}"`)
|
bot.chat(`Bot uuid "${bot.uuid}"`)
|
||||||
|
@ -336,7 +336,7 @@ const amonger = bot.bots.map((eachBot) => eachBot.options.host + "\n");
|
||||||
const CommandModules = "./CommandModules";
|
const CommandModules = "./CommandModules";
|
||||||
|
|
||||||
const chat = "./chat";
|
const chat = "./chat";
|
||||||
if (!bot.options.Core.CorelessMode){
|
if (bot.options.Core.CorelessMode){
|
||||||
fs.readdir(util, (err, files) => {
|
fs.readdir(util, (err, files) => {
|
||||||
bot.chat(`Util files loaded: ${files.length}`);
|
bot.chat(`Util files loaded: ${files.length}`);
|
||||||
});
|
});
|
||||||
|
@ -417,7 +417,7 @@ bot.chat(`Command files loaded: ${files.length}`);
|
||||||
}
|
}
|
||||||
|
|
||||||
var uptime = process.uptime();
|
var uptime = process.uptime();
|
||||||
if(!bot.options.Core.CorelessMode){
|
if(bot.options.Core.CorelessMode){
|
||||||
bot.chat(`Bot Uptime: ${format(uptime)}`)
|
bot.chat(`Bot Uptime: ${format(uptime)}`)
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
|
@ -552,11 +552,11 @@ if(!bot.options.Core.CorelessMode){
|
||||||
|
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
if (!bot.options.Core.CorelessMode){
|
if (bot.options.Core.CorelessMode){
|
||||||
bot.chat('&4Invalid action')
|
bot.chat('&4Invalid action')
|
||||||
await sleep(500)
|
await sleep(500)
|
||||||
bot.chat('the usages are version, discord, serverinfo, logininfo, uptime, creators')
|
bot.chat('the usages are version, discord, serverinfo, logininfo, uptime, creators')
|
||||||
}
|
}else{
|
||||||
context.source.sendError([
|
context.source.sendError([
|
||||||
cmd,
|
cmd,
|
||||||
{ text: "Invalid action", color: "dark_red", bold: false },
|
{ text: "Invalid action", color: "dark_red", bold: false },
|
||||||
|
@ -569,6 +569,7 @@ if(!bot.options.Core.CorelessMode){
|
||||||
bold: false,
|
bold: false,
|
||||||
},
|
},
|
||||||
]);
|
]);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in a new issue