diff --git a/scripts/Latest.bat b/scripts/Latest.bat deleted file mode 100644 index 36c5b3be..00000000 --- a/scripts/Latest.bat +++ /dev/null @@ -1,166 +0,0 @@ -@ECHO off -TITLE Downloading Latest Build of NadekoBot... -::Setting convenient to read variables which don't delete the windows temp folder -SET "root=%~dp0" -CD /D "%root%" -SET "rootdir=%cd%" -SET "build1=%root%NadekoInstall_Temp\NadekoBot\Discord.Net\src\Discord.Net.Core\" -SET "build2=%root%NadekoInstall_Temp\NadekoBot\Discord.Net\src\Discord.Net.Rest\" -SET "build3=%root%NadekoInstall_Temp\NadekoBot\Discord.Net\src\Discord.Net.WebSocket\" -SET "build4=%root%NadekoInstall_Temp\NadekoBot\Discord.Net\src\Discord.Net.Commands\" -SET "build5=%root%NadekoInstall_Temp\NadekoBot\src\NadekoBot\" -SET "installtemp=%root%NadekoInstall_Temp\" -::Deleting traces of last setup for the sake of clean folders, if by some miracle it still exists -IF EXIST "%installtemp%" ( RMDIR "%installtemp%" /S /Q >nul 2>&1) -timeout /t 5 -::Checks that both git and dotnet are installed -dotnet --version >nul 2>&1 || GOTO :dotnet -git --version >nul 2>&1 || GOTO :git -::Creates the install directory to work in and get the current directory because spaces ruins everything otherwise -:start -MKDIR "%root%NadekoInstall_Temp" -CD /D "%installtemp%" -::Downloads the latest version of Nadeko -ECHO Downloading Nadeko... -ECHO. -git clone -b dev --recursive --depth 1 --progress https://github.com/Kwoth/NadekoBot.git >nul -IF %ERRORLEVEL% EQU 128 (GOTO :giterror) -TITLE Installing NadekoBot, please wait... -ECHO. -ECHO Installing Discord.Net(1/4)... -::Building Nadeko -CD /D "%build1%" -dotnet restore >nul 2>&1 -ECHO Installing Discord.Net(2/4)... -CD /D "%build2%" -dotnet restore >nul 2>&1 -ECHO Installing Discord.Net(3/4)... -CD /D "%build3%" -dotnet restore >nul 2>&1 -ECHO Installing Discord.Net(4/4)... -CD /D "%build4%" -dotnet restore >nul 2>&1 -ECHO. -ECHO Discord.Net installation completed successfully... -ECHO. -ECHO Installing NadekoBot... -CD /D "%build5%" -dotnet restore >nul 2>&1 -dotnet build --configuration Release >nul 2>&1 -ECHO. -ECHO NadekoBot installation completed successfully... -::Attempts to backup old files if they currently exist in the same folder as the batch file -IF EXIST "%root%NadekoBot\" (GOTO :backupinstall) ELSE (GOTO :freshinstall) -:freshinstall - ::Moves the NadekoBot folder to keep things tidy - ECHO. - ECHO Moving files, Please wait... - ROBOCOPY "%root%NadekoInstall_Temp" "%rootdir%" /E /MOVE >nul 2>&1 - IF %ERRORLEVEL% GEQ 8 (GOTO :copyerror) - IF EXIST "%PROGRAMFILES(X86)%" (GOTO 64BIT) ELSE (GOTO 32BIT) -:backupinstall - TITLE Backing up old files... - ECHO. - ECHO Moving and Backing up old files... - ::Recursively copies all files and folders from NadekoBot to NadekoBot_Old - ROBOCOPY "%root%NadekoBot" "%root%NadekoBot_Old" /MIR >nul 2>&1 - IF %ERRORLEVEL% GEQ 8 (GOTO :copyerror) - ECHO. - ECHO Old files backed up to NadekoBot_Old... - ::Copies the credentials and database from the backed up data to the new folder - COPY "%root%NadekoBot_Old\src\NadekoBot\credentials.json" "%installtemp%NadekoBot\src\NadekoBot\credentials.json" >nul 2>&1 - IF %ERRORLEVEL% GEQ 8 (GOTO :copyerror) - ECHO. - ECHO credentials.json copied... - ROBOCOPY "%root%NadekoBot_Old\src\NadekoBot\bin" "%installtemp%NadekoBot\src\NadekoBot\bin" /E >nul 2>&1 - IF %ERRORLEVEL% GEQ 8 (GOTO :copyerror) - ECHO. - ECHO bin folder copied... - RD /S /Q "%root%NadekoBot_Old\src\NadekoBot\data\musicdata" - ECHO. - ECHO music cache cleared... - ROBOCOPY "%root%NadekoBot_Old\src\NadekoBot\data" "%installtemp%NadekoBot\src\NadekoBot\data" /E >nul 2>&1 - IF %ERRORLEVEL% GEQ 8 (GOTO :copyerror) - ECHO. - ECHO Old data folder copied... - ::Moves the setup Nadeko folder - RMDIR "%root%NadekoBot\" /S /Q >nul 2>&1 - ROBOCOPY "%root%NadekoInstall_Temp" "%rootdir%" /E /MOVE >nul 2>&1 - IF %ERRORLEVEL% GEQ 8 (GOTO :copyerror) - IF EXIST "%PROGRAMFILES(X86)%" (GOTO 64BIT) ELSE (GOTO 32BIT) -:dotnet - ::Terminates the batch script if it can't run dotnet --version - TITLE Error! - ECHO dotnet not found, make sure it's been installed as per the guides instructions! - ECHO Press any key to exit. - PAUSE >nul 2>&1 - CD /D "%root%" - GOTO :EOF -:git - ::Terminates the batch script if it can't run git --version - TITLE Error! - ECHO git not found, make sure it's been installed as per the guides instructions! - ECHO Press any key to exit. - PAUSE >nul 2>&1 - CD /D "%root%" - GOTO :EOF -:giterror - ECHO. - ECHO Git clone failed, trying again - RMDIR "%installtemp%" /S /Q >nul 2>&1 - GOTO :start -:copyerror - ::If at any point a copy error is encountered - TITLE Error! - ECHO. - ECHO An error in copying data has been encountered, returning an exit code of %ERRORLEVEL% - ECHO. - ECHO Make sure to close any files, such as `NadekoBot.db` before continuing or try running the installer as an Administrator - PAUSE >nul 2>&1 - CD /D "%root%" - GOTO :EOF -:64BIT -ECHO. -ECHO Your System Architecture is 64bit... -GOTO end -:32BIT -ECHO. -ECHO Your System Architecture is 32bit... -timeout /t 5 -ECHO. -ECHO Getting 32bit libsodium.dll and opus.dll... -IF EXIST "%root%NadekoBot\src\NadekoBot\_libs\32\libsodium.dll" (GOTO copysodium) ELSE (GOTO downloadsodium) -:copysodium -del "%root%NadekoBot\src\NadekoBot\libsodium.dll" -copy "%root%NadekoBot\src\NadekoBot\_libs\32\libsodium.dll" "%root%NadekoBot\src\NadekoBot\libsodium.dll" -ECHO libsodium.dll copied. -ECHO. -timeout /t 5 -IF EXIST "%root%NadekoBot\src\NadekoBot\_libs\32\opus.dll" (GOTO copyopus) ELSE (GOTO downloadopus) -:downloadsodium -SET "FILENAME=%~dp0\NadekoBot\src\NadekoBot\libsodium.dll" -powershell -Command "Invoke-WebRequest https://github.com/Kwoth/NadekoBot/raw/dev/src/NadekoBot/_libs/32/libsodium.dll -OutFile '%FILENAME%'" -ECHO libsodium.dll downloaded. -ECHO. -timeout /t 5 -IF EXIST "%root%NadekoBot\src\NadekoBot\_libs\32\opus.dll" (GOTO copyopus) ELSE (GOTO downloadopus) -:copyopus -del "%root%NadekoBot\src\NadekoBot\opus.dll" -copy "%root%NadekoBot\src\NadekoBot\_libs\32\opus.dll" "%root%NadekoBot\src\NadekoBot\opus.dll" -ECHO opus.dll copied. -GOTO end -:downloadopus -SET "FILENAME=%~dp0\NadekoBot\src\NadekoBot\opus.dll" -powershell -Command "Invoke-WebRequest https://github.com/Kwoth/NadekoBot/raw/dev/src/NadekoBot/_libs/32/opus.dll -OutFile '%FILENAME%'" -ECHO opus.dll downloaded. -GOTO end -:end - ::Normal execution of end of script - TITLE NadekoBot Installation complete! - CD /D "%root%" - RMDIR /S /Q "%installtemp%" >nul 2>&1 - ECHO. - ECHO Installation complete! - ECHO. - timeout /t 5 - del Latest.bat diff --git a/scripts/NadekoAutoRun.bat b/scripts/NadekoAutoRun.bat deleted file mode 100644 index 4441e25b..00000000 --- a/scripts/NadekoAutoRun.bat +++ /dev/null @@ -1,65 +0,0 @@ -@ECHO off -@TITLE NadekoBot - - -SET "root=%~dp0" -CD /D "%root%" - -CLS -ECHO Welcome to NadekoBot Auto Restart and Update! -ECHO -------------------------------------------- -ECHO 1.Auto Restart and Update with Dev Build (latest) -ECHO 2.Auto Restart and Update with Stable Build -ECHO 3.Run Auto Restart normally without Updating (will restart faster) -ECHO 4.To exit -ECHO. - -CHOICE /C 1234 /M "Enter your choice:" - -:: Note - list ERRORLEVELS in decreasing order -IF ERRORLEVEL 4 GOTO exit -IF ERRORLEVEL 3 GOTO autorun -IF ERRORLEVEL 2 GOTO stablear -IF ERRORLEVEL 1 GOTO latestar - -:latestar -ECHO Auto Restart and Update with Dev Build (latest) -ECHO Bot will auto update on every restart! -CD /D "%~dp0NadekoBot\src\NadekoBot" -dotnet run --configuration Release -ECHO Updating... -SET "FILENAME=%~dp0\Latest.bat" -powershell -Command "Invoke-WebRequest https://github.com/Kwoth/NadekoBot/raw/dev/scripts/Latest.bat -OutFile '%FILENAME%'" -ECHO NadekoBot Dev Build (latest) downloaded. -SET "root=%~dp0" -CD /D "%root%" -CALL Latest.bat -GOTO latestar - -:stablear -ECHO Auto Restart and Update with Stable Build -ECHO Bot will auto update on every restart! -CD /D "%~dp0NadekoBot\src\NadekoBot" -dotnet run --configuration Release -ECHO Updating... -SET "FILENAME=%~dp0\Stable.bat" -powershell -Command "Invoke-WebRequest https://github.com/Kwoth/NadekoBot/raw/dev/scripts/Stable.bat -OutFile '%FILENAME%'" -ECHO NadekoBot Stable build downloaded. -SET "root=%~dp0" -CD /D "%root%" -CALL Stable.bat -GOTO stablear - -:autorun -ECHO Normal Auto Restart -ECHO Bot will not auto update on every restart! -timeout /t 3 -CD /D "%~dp0NadekoBot\src\NadekoBot" -dotnet run --configuration Release -goto autorun - -:Exit -SET "root=%~dp0" -CD /D "%root%" -del NadekoAutoRun.bat -CALL NadekoInstaller.bat diff --git a/scripts/NadekoRun.bat b/scripts/NadekoRun.bat deleted file mode 100644 index 73c66b17..00000000 --- a/scripts/NadekoRun.bat +++ /dev/null @@ -1,9 +0,0 @@ -@ECHO off -@TITLE NadekoBot -CD /D "%~dp0NadekoBot\src\NadekoBot" -dotnet run --configuration Release -ECHO NadekoBot has been succesfully stopped, press any key to close this window. -TITLE NadekoBot - Stopped -CD /D "%~dp0" -PAUSE >nul 2>&1 -del NadekoRunNormal.bat diff --git a/scripts/Stable.bat b/scripts/Stable.bat deleted file mode 100644 index 43f8cf23..00000000 --- a/scripts/Stable.bat +++ /dev/null @@ -1,166 +0,0 @@ -@ECHO off -TITLE Downloading Stable Build of NadekoBot... -::Setting convenient to read variables which don't delete the windows temp folder -SET "root=%~dp0" -CD /D "%root%" -SET "rootdir=%cd%" -SET "build1=%root%NadekoInstall_Temp\NadekoBot\Discord.Net\src\Discord.Net.Core\" -SET "build2=%root%NadekoInstall_Temp\NadekoBot\Discord.Net\src\Discord.Net.Rest\" -SET "build3=%root%NadekoInstall_Temp\NadekoBot\Discord.Net\src\Discord.Net.WebSocket\" -SET "build4=%root%NadekoInstall_Temp\NadekoBot\Discord.Net\src\Discord.Net.Commands\" -SET "build5=%root%NadekoInstall_Temp\NadekoBot\src\NadekoBot\" -SET "installtemp=%root%NadekoInstall_Temp\" -::Deleting traces of last setup for the sake of clean folders, if by some miracle it still exists -IF EXIST "%installtemp%" ( RMDIR "%installtemp%" /S /Q >nul 2>&1) -timeout /t 5 -::Checks that both git and dotnet are installed -dotnet --version >nul 2>&1 || GOTO :dotnet -git --version >nul 2>&1 || GOTO :git -::Creates the install directory to work in and get the current directory because spaces ruins everything otherwise -:start -MKDIR "%root%NadekoInstall_Temp" -CD /D "%installtemp%" -::Downloads the latest version of Nadeko -ECHO Downloading Nadeko... -ECHO. -git clone -b master --recursive --depth 1 --progress https://github.com/Kwoth/NadekoBot.git >nul -IF %ERRORLEVEL% EQU 128 (GOTO :giterror) -TITLE Installing NadekoBot, please wait... -ECHO. -ECHO Installing Discord.Net(1/4)... -::Building Nadeko -CD /D "%build1%" -dotnet restore >nul 2>&1 -ECHO Installing Discord.Net(2/4)... -CD /D "%build2%" -dotnet restore >nul 2>&1 -ECHO Installing Discord.Net(3/4)... -CD /D "%build3%" -dotnet restore >nul 2>&1 -ECHO Installing Discord.Net(4/4)... -CD /D "%build4%" -dotnet restore >nul 2>&1 -ECHO. -ECHO Discord.Net installation completed successfully... -ECHO. -ECHO Installing NadekoBot... -CD /D "%build5%" -dotnet restore >nul 2>&1 -dotnet build --configuration Release >nul 2>&1 -ECHO. -ECHO NadekoBot installation completed successfully... -::Attempts to backup old files if they currently exist in the same folder as the batch file -IF EXIST "%root%NadekoBot\" (GOTO :backupinstall) ELSE (GOTO :freshinstall) -:freshinstall - ::Moves the NadekoBot folder to keep things tidy - ECHO. - ECHO Moving files, Please wait... - ROBOCOPY "%root%NadekoInstall_Temp" "%rootdir%" /E /MOVE >nul 2>&1 - IF %ERRORLEVEL% GEQ 8 (GOTO :copyerror) - IF EXIST "%PROGRAMFILES(X86)%" (GOTO 64BIT) ELSE (GOTO 32BIT) -:backupinstall - TITLE Backing up old files... - ECHO. - ECHO Moving and Backing up old files... - ::Recursively copies all files and folders from NadekoBot to NadekoBot_Old - ROBOCOPY "%root%NadekoBot" "%root%NadekoBot_Old" /MIR >nul 2>&1 - IF %ERRORLEVEL% GEQ 8 (GOTO :copyerror) - ECHO. - ECHO Old files backed up to NadekoBot_Old... - ::Copies the credentials and database from the backed up data to the new folder - COPY "%root%NadekoBot_Old\src\NadekoBot\credentials.json" "%installtemp%NadekoBot\src\NadekoBot\credentials.json" >nul 2>&1 - IF %ERRORLEVEL% GEQ 8 (GOTO :copyerror) - ECHO. - ECHO credentials.json copied... - ROBOCOPY "%root%NadekoBot_Old\src\NadekoBot\bin" "%installtemp%NadekoBot\src\NadekoBot\bin" /E >nul 2>&1 - IF %ERRORLEVEL% GEQ 8 (GOTO :copyerror) - ECHO. - ECHO bin folder copied... - RD /S /Q "%root%NadekoBot_Old\src\NadekoBot\data\musicdata" - ECHO. - ECHO music cache cleared... - ROBOCOPY "%root%NadekoBot_Old\src\NadekoBot\data" "%installtemp%NadekoBot\src\NadekoBot\data" /E >nul 2>&1 - IF %ERRORLEVEL% GEQ 8 (GOTO :copyerror) - ECHO. - ECHO Old data folder copied... - ::Moves the setup Nadeko folder - RMDIR "%root%NadekoBot\" /S /Q >nul 2>&1 - ROBOCOPY "%root%NadekoInstall_Temp" "%rootdir%" /E /MOVE >nul 2>&1 - IF %ERRORLEVEL% GEQ 8 (GOTO :copyerror) - IF EXIST "%PROGRAMFILES(X86)%" (GOTO 64BIT) ELSE (GOTO 32BIT) -:dotnet - ::Terminates the batch script if it can't run dotnet --version - TITLE Error! - ECHO dotnet not found, make sure it's been installed as per the guides instructions! - ECHO Press any key to exit. - PAUSE >nul 2>&1 - CD /D "%root%" - GOTO :EOF -:git - ::Terminates the batch script if it can't run git --version - TITLE Error! - ECHO git not found, make sure it's been installed as per the guides instructions! - ECHO Press any key to exit. - PAUSE >nul 2>&1 - CD /D "%root%" - GOTO :EOF -:giterror - ECHO. - ECHO Git clone failed, trying again - RMDIR "%installtemp%" /S /Q >nul 2>&1 - GOTO :start -:copyerror - ::If at any point a copy error is encountered - TITLE Error! - ECHO. - ECHO An error in copying data has been encountered, returning an exit code of %ERRORLEVEL% - ECHO. - ECHO Make sure to close any files, such as `NadekoBot.db` before continuing or try running the installer as an Administrator - PAUSE >nul 2>&1 - CD /D "%root%" - GOTO :EOF -:64BIT -ECHO. -ECHO Your System Architecture is 64bit... -GOTO end -:32BIT -ECHO. -ECHO Your System Architecture is 32bit... -timeout /t 5 -ECHO. -ECHO Getting 32bit libsodium.dll and opus.dll... -IF EXIST "%root%NadekoBot\src\NadekoBot\_libs\32\libsodium.dll" (GOTO copysodium) ELSE (GOTO downloadsodium) -:copysodium -del "%root%NadekoBot\src\NadekoBot\libsodium.dll" -copy "%root%NadekoBot\src\NadekoBot\_libs\32\libsodium.dll" "%root%NadekoBot\src\NadekoBot\libsodium.dll" -ECHO libsodium.dll copied. -ECHO. -timeout /t 5 -IF EXIST "%root%NadekoBot\src\NadekoBot\_libs\32\opus.dll" (GOTO copyopus) ELSE (GOTO downloadopus) -:downloadsodium -SET "FILENAME=%~dp0\NadekoBot\src\NadekoBot\libsodium.dll" -powershell -Command "Invoke-WebRequest https://github.com/Kwoth/NadekoBot/raw/dev/src/NadekoBot/_libs/32/libsodium.dll -OutFile '%FILENAME%'" -ECHO libsodium.dll downloaded. -ECHO. -timeout /t 5 -IF EXIST "%root%NadekoBot\src\NadekoBot\_libs\32\opus.dll" (GOTO copyopus) ELSE (GOTO downloadopus) -:copyopus -del "%root%NadekoBot\src\NadekoBot\opus.dll" -copy "%root%NadekoBot\src\NadekoBot\_libs\32\opus.dll" "%root%NadekoBot\src\NadekoBot\opus.dll" -ECHO opus.dll copied. -GOTO end -:downloadopus -SET "FILENAME=%~dp0\NadekoBot\src\NadekoBot\opus.dll" -powershell -Command "Invoke-WebRequest https://github.com/Kwoth/NadekoBot/raw/dev/src/NadekoBot/_libs/32/opus.dll -OutFile '%FILENAME%'" -ECHO opus.dll downloaded. -GOTO end -:end - ::Normal execution of end of script - TITLE NadekoBot Installation complete! - CD /D "%root%" - RMDIR /S /Q "%installtemp%" >nul 2>&1 - ECHO. - ECHO Installation complete! - ECHO. - timeout /t 5 - del Stable.bat diff --git a/src/NadekoBot/Services/Impl/StatsService.cs b/src/NadekoBot/Services/Impl/StatsService.cs index bf300162..a14ac4bb 100644 --- a/src/NadekoBot/Services/Impl/StatsService.cs +++ b/src/NadekoBot/Services/Impl/StatsService.cs @@ -17,7 +17,7 @@ namespace NadekoBot.Services.Impl private readonly IBotCredentials _creds; private readonly DateTime _started; - public const string BotVersion = "1.41-beta"; + public const string BotVersion = "1.41-beta2"; public string Author => "Kwoth#2560"; public string Library => "Discord.Net";