-
Notifications
You must be signed in to change notification settings - Fork 0
/
start.bat
57 lines (44 loc) · 1.09 KB
/
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
@echo off
Setlocal EnableDelayedExpansion
set "file_path=exports.ts"
rem check if field exists
set "JS_FILE=exports.ts"
findstr /C:"const yandexToken" "%JS_FILE%"
if %errorlevel% equ 0 (
echo yandexToken found.
) else (
echo yandexToken not found.
)
findstr /C:"const discordClientToken" "%JS_FILE%"
if %errorlevel% equ 0 (
echo discordClientToken found.
) else (
echo discordClientToken not found.
)
echo Enter 1 to add yandexToken
echo Enter 2 to add discordClientToken
echo Enter start to initiate programm
@REM set /p input=Type what do u wanna do:
set /p UserInput=Type what do u wanna do:
if %UserInput%==1 goto 1
if %UserInput%==2 goto 2
if %UserInput%==start goto 3
echo "%UserInput%"
:1
cls
echo setting yandex token
set /p "yandexToken=Set yandex token: "
echo "%yandexToken%"
echo const yandexToken = "%yandexToken%"; >> %file_path%
exit
:2
cls
echo setting discord token
set /p "discordToken=Set discord client token: "
echo "%discordToken%"
echo const discordClientToken = "%discordToken%"; >> %file_path%
exit
:3
echo Initiating proggram.
ts-node src/index.ts RPC
exit