Add update command
Uses git pull to update to latest commit
This commit is contained in:
parent
29d5d81edc
commit
73b0b5f4ed
3 changed files with 34 additions and 19 deletions
|
@ -1,3 +1,4 @@
|
|||
const calculateReloaded = require("../util/calculateReloaded.js");
|
||||
const reloadNetModules = require("../util/reloadNetModules.js");
|
||||
|
||||
module.exports = {
|
||||
|
@ -8,24 +9,9 @@ module.exports = {
|
|||
|
||||
let reloadCommands = require("../util/reloadCommands.js")
|
||||
let beforeSize = client.commands.size;
|
||||
let sendText;
|
||||
reloadNetModules(client)
|
||||
reloadCommands(client)
|
||||
if (beforeSize > client.commands.size) {
|
||||
let difference = beforeSize - client.commands.size;
|
||||
if (difference == 1)
|
||||
sendText = `${client.commands.size} modules were reloaded after ${difference} module was deleted.`
|
||||
else
|
||||
sendText = `${client.commands.size} modules were reloaded after ${difference} were disabled.`
|
||||
} else if (beforeSize < client.commands.size) {
|
||||
let difference = client.commands.size - beforeSize;
|
||||
if (difference == 1)
|
||||
sendText = `${difference} module was added, and a total of ${client.commands.size} were reloaded.`
|
||||
else
|
||||
sendText = `${difference} module were added, and a total of ${client.commands.size} were reloaded.`
|
||||
} else if (beforeSize === client.commands.size) {
|
||||
sendText = `${client.commands.size} modules were reloaded.`
|
||||
}
|
||||
let sendText = calculateReloaded(beforeSize, client)
|
||||
message.channel.send(sendText)
|
||||
}
|
||||
};
|
Loading…
Add table
Add a link
Reference in a new issue