This commit is contained in:
ShadowVR 2024-06-01 17:15:16 -04:00
parent b1982c1b78
commit 763bfa9859

5
bot.js
View file

@ -11,12 +11,9 @@ async function updateBotFromGitHub() {
if (!await git.checkIsRepo()) { if (!await git.checkIsRepo()) {
await git.init().addRemote('origin', 'https://git.shadowhosting.xyz/shadowvr/AI_botter.git').fetch(); await git.init().addRemote('origin', 'https://git.shadowhosting.xyz/shadowvr/AI_botter.git').fetch();
} else { } else {
await git.fetch('origin', 'main'); await git.pull('origin', 'main');
} }
// Force update by resetting to the latest commit on the remote main branch
await git.reset(['--hard', 'origin/main']);
console.log('Bot updated from GitHub.'); console.log('Bot updated from GitHub.');
} catch (error) { } catch (error) {