Update
This commit is contained in:
parent
b1982c1b78
commit
763bfa9859
1 changed files with 1 additions and 4 deletions
5
bot.js
5
bot.js
|
@ -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) {
|
||||||
|
|
Loading…
Reference in a new issue