aboutsummaryrefslogtreecommitdiff
path: root/commands/util/status.js
diff options
context:
space:
mode:
authorame <[email protected]>2023-10-31 22:49:16 -0500
committerame <[email protected]>2023-10-31 22:49:16 -0500
commitf4e8985ca9aa8c370314566bc46a9e7786b931c5 (patch)
tree77d898b1d20331135af3cec1b2a0397c274f8439 /commands/util/status.js
parentc2fbf3817925d08ca4a57b6a8803fd7b0d10c826 (diff)
better status and cleanup
Diffstat (limited to 'commands/util/status.js')
-rw-r--r--commands/util/status.js7
1 files changed, 5 insertions, 2 deletions
diff --git a/commands/util/status.js b/commands/util/status.js
index 93f4cdc..8f8fc16 100644
--- a/commands/util/status.js
+++ b/commands/util/status.js
@@ -4,12 +4,14 @@ let settings = require("../../src/settings")
let {limit_exp} = require("../../src/util")
const { EmbedBuilder,ActionRowBuilder,ButtonBuilder,ButtonStyle } = require("discord.js");
const {getLastCommit} = require("git-last-commit")
+const { execSync } = require('child_process');
var os = require('os');
let config_loc = __filename+".json"
let config = JSON.parse(fs.readFileSync(config_loc))
module.exports = {
name : "status",
command: ["status","server","uptime","vote","twitter","𝕏"],
+ //
mod_only: false,
config:config,
config_loc:config_loc,
@@ -20,7 +22,8 @@ module.exports = {
this.exec(client,interaction)
},
async exec(client,message){
- getLastCommit((err,commit)=>{
+ getLastCommit(async (err,commit)=>{
+ let changed = execSync('git --no-pager diff --minimal --name-only').toString().split('\n')
let seconds = Math.floor(message.client.uptime / 1000);
let minutes = Math.floor(seconds / 60);
let hours = Math.floor(minutes / 60);
@@ -56,7 +59,7 @@ module.exports = {
.setTitle("Server info")
.setDescription(uptime+"\n"+sys)
.setColor(settings.defaultColor)
- .setFooter({text:"running "+commit.shortHash+" ("+commit.branch+")"})
+ .setFooter({text:"running "+commit.shortHash+" ("+commit.branch+") + " + changed.length + " uncommited files"})
message.reply({embeds:[emoteembed],components:[row]})
})
}