diff --git a/commands/admin/update.js b/commands/admin/update.js index 797944a..7de9db0 100644 --- a/commands/admin/update.js +++ b/commands/admin/update.js @@ -1,5 +1,4 @@ const calculateReloaded = require("../../util/calculateReloaded"); -const executeCommand = require("../../util/executeCommand"); const reloadCommands = require("../../util/reloadCommands"); module.exports = { @@ -28,11 +27,10 @@ module.exports = { let commitCount = stdout.split(/\r\n|\r|\n/).length - 1 sendText = `${sendText}\n\nLatest commits (${commitCount}):\n${stdout}` if(sendText.length >= 2000){ - sendText = sendText.slice(1955) + sendText.slice(1955) sendText = `${sendText}\n... Message is too long to show everything` } message.channel.send(sendText) - client.githash = executeCommand(`git`, ["rev-parse", "--short", "HEAD"]) if (err) console.log(stderr) }) } diff --git a/commands/info/botinfo.js b/commands/info/botinfo.js index f1ebebe..843b465 100644 --- a/commands/info/botinfo.js +++ b/commands/info/botinfo.js @@ -15,8 +15,7 @@ module.exports = { `Total Members: ${guildInfo.totalMembers}`, `Total Commands: ${client.commands.size}`, `Creation Date: ${getCreationDate(client)}`, - `Source: [Click Here](https://github.com/SileNce5k/discord_bot)`, - `Current Version: ${client.githash}` + `Source: [Click Here](https://github.com/SileNce5k/discord_bot)` ] let description = ""; diff --git a/server.js b/server.js index c8f5d8b..871dc93 100644 --- a/server.js +++ b/server.js @@ -1,7 +1,6 @@ const fs = require('fs'); const createInitialConfig = require("./util/createInitialConfig") const convertJSONToSQL = require('./util/timer/convertJSONToSQL'); -const executeCommand = require('./util/executeCommand.js'); const sqlite3 = require('sqlite3').verbose(); if(!fs.existsSync("./data/config.json")) { createInitialConfig(); @@ -56,7 +55,6 @@ createAndLoadWhitelistTable(client.whitelist); client.settings.set("presenceType", presenceType); client.settings.set("presenceText", presenceText); client.settings.set("globalPrefix", globalPrefix); -client.githash = executeCommand(`git`, ["rev-parse", "--short", "HEAD"]) const reloadCommands = require("./util/reloadCommands.js"); const onMessage = require('./server/message');