Add warning if server.js or message.js is updated

This commit is contained in:
SileNce5k 2021-07-09 17:58:44 +02:00
parent ca1bf59c5e
commit 7b069ad429
No known key found for this signature in database
GPG key ID: C507260E7F2583AD

View file

@ -16,6 +16,9 @@ module.exports = {
let beforeSize = client.commands.size;
reloadCommands(client)
let sendText = `${stdout}\nBot updated, and\n${calculateReloaded(beforeSize, client)}`
if(stdout.includes("server.js") || stdout.includes("message.js")){
sendText = sendText + "\nServer.js OR message.js has been updated.\nThis requires the bot to be restarted."
}
message.channel.send(sendText).then(function(msg){
let regex = /(.{0,7}\.\..{0,7})/
let commits = stdout.match(regex)[0]