-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathstart.bat
54 lines (37 loc) · 992 Bytes
/
start.bat
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
@REM configuration options
@echo off
set dirname=%cd%
title Discord Bots Stats
color 0b
echo Checking for Node...
where node.exe >nul 2>&1 && set "node=true" || set "node=false"
if "%node%" == "true" (
for /F %%F in ('node -v') do echo Using node version %%F
) else (
echo Node not installed, quiting...
pause
exit
)
echo Checking for Git
where git.exe >nul 2>&1 && set "git=true" || set "git=false"
if "%git%" == "true" (
for /F %%F in ('git -v') do echo Using git version %%F
) else (
echo Git not installed, quiting...
pause
exit
)
echo Updating to latest git version...
git clone https://github.com/PortalDiscordDevelopment/DiscordBotStats .
echo Finished updating to latest git version.
call npm i
call node ./models/setup.js
:loop
call node .
call node ./models/format.js
set "HH=%time:~0,2%"
set "MM=%time:~3,2%"
set /A "loopTime=(%HH% + 1) %% 24"
echo script finished, running again at %loopTime%:%MM% %date%
timeout /t 3600
goto loop