Now /updatebot also restarts the bot instead of just updating

This commit is contained in:
Lucas Gabriel 2024-10-06 22:06:09 -03:00
parent fe89660b11
commit 8b1c912520
No known key found for this signature in database
GPG Key ID: D9B075FC6DC93985

View File

@ -20,7 +20,7 @@ function getGitCommitHash() {
function updateBot() { function updateBot() {
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
exec('git pull', (error, stdout, stderr) => { exec('git pull && echo "A" >> restart.txt', (error, stdout, stderr) => {
if (error) { if (error) {
reject(`Error: ${stderr}`); reject(`Error: ${stderr}`);
} else { } else {