Update githash properly
All checks were successful
CI / CI (push) Successful in 22s

This commit is contained in:
SileNce5k 2025-06-24 03:46:17 +02:00
parent e79d2a7a7e
commit a891b37a31
Signed by: SileNce
GPG key ID: B0A142BB4291B204
2 changed files with 5 additions and 2 deletions

View file

@ -32,7 +32,8 @@ module.exports = {
sendText = `${sendText}\n... Message is too long to show everything` sendText = `${sendText}\n... Message is too long to show everything`
} }
message.channel.send(sendText) message.channel.send(sendText)
client.githash = executeCommand(`git`, ["rev-parse", "--short", "HEAD"]) const githash = executeCommand(`git`, ["rev-parse", "--short", "HEAD"]);
client.githash = githash.error ? "N/A" : githash.output;
if (err) console.log(stderr) if (err) console.log(stderr)
}) })
} }

View file

@ -56,7 +56,9 @@ createAndLoadWhitelistTable(client.whitelist);
client.settings.set("presenceType", presenceType); client.settings.set("presenceType", presenceType);
client.settings.set("presenceText", presenceText); client.settings.set("presenceText", presenceText);
client.settings.set("globalPrefix", globalPrefix); client.settings.set("globalPrefix", globalPrefix);
client.githash = executeCommand(`git`, ["rev-parse", "--short", "HEAD"])
const githash = executeCommand(`git`, ["rev-parse", "--short", "HEAD"]);
client.githash = githash.error ? "N/A" : githash.output;
const reloadCommands = require("./util/reloadCommands.js"); const reloadCommands = require("./util/reloadCommands.js");
const onMessage = require('./server/message'); const onMessage = require('./server/message');