-
Notifications
You must be signed in to change notification settings - Fork 1
/
C'Man.bat
216 lines (164 loc) · 4.58 KB
/
C'Man.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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
@echo off
title C'Man %DATE%
if exist "%~dp0\settings\lang.cfg" set /p lang=<"%~dp0\settings\lang.cfg"
if not exist "%~dp0\settings\lang.cfg" (
md "%~dp0\settings"
echo en>"%~dp0\settings\lang.cfg"
)
if exist "%~dp0\settings\start.cfg" set /p start=<"%~dp0\settings\start.cfg"
if not exist "%~dp0\settings\start.cfg" (
echo pm2>"%~dp0\settings\start.cfg"
)
REM Commands
:init
cls
color 1e
echo C'Man BETA
echo _______________________
if "%lang%"=="en" echo Type 'help' for a list of commands, and 'start' to start the bot:
if "%lang%"=="de" echo Gib 'hilfe' ein fr eine Befehlsliste, und 'start' um den Bot zu starten:
REM Commands
:cmd
set /p exec= "> "
if "%lang%"=="en" (
if "%exec%"=="restart" goto restart
if "%exec%"=="help" goto help
if "%exec%"=="lang" goto lang
if "%exec%"=="mode" goto mode
if "%exec%"=="credits" goto credits
)
if "%lang%"=="de" (
if "%exec%"=="neustart" goto restart
if "%exec%"=="hilfe" goto help
if "%exec%"=="sprache" goto lang
if "%exec%"=="modus" goto mode
if "%exec%"=="danksagung" goto credits
)
if "%exec%"=="start" goto start
if "%exec%"=="bot" goto start
if "%exec%"=="tool" goto tool
if "%exec%"=="install" goto install
goto cmd
REM Normal bot
:start
if "%start%"=="pm2" start pm2 start %~dp0\bot.js --name="bot" --log=%~dp0\settings\log.txt
if "%start%"=="forever" start forever -l "%~dp0\settings\log.txt" -a start bot.js
if "%start%"=="node" start node bot
if "%start%"=="nodemon" start nodemon bot
if "%lang%"=="en" echo Script started!
if "%lang%"=="de" echo Skript erfolgreich ausgefhrt!
goto cmd
REM Restart
:restart
if "%start%"=="pm2" start pm2 restart all
if "%start%"=="forever" start forever restartall
if "%lang%"=="en" echo Script restarted!
if "%lang%"=="de" echo Skript wurde neugestartet!
goto cmd
REM Tool bot
:tool
start nodemon %~dp0tools\BOT-DEV.js
if "%lang%"=="en" echo Tool-Bot started!
if "%lang%"=="de" echo Tool-Bot erfolgreich ausgefhrt!
goto cmd
REM Installing
:install
start npm install discord.js
if "%lang%"=="en" echo Installing Discord.js
if "%lang%"=="de" echo Installiere Discord.js
goto cmd
REM Help
:help
if "%lang%"=="en" (
echo Command list
echo _______________________
echo ³ start - starts the bot
echo ³ restart - restarts the bot
echo ³ install - installs discord.js
echo ³ tool - starts tool bot
echo ³ lang - changes language
echo ³ mode - changes start mode
echo ³ credits - displays credits
)
if "%lang%"=="de" (
echo Befehlsliste
echo _______________________
echo ³ start - startet den Bot
echo ³ neustart - startet den Bot neu
echo ³ install - installiert discord.js
echo ³ tool - startet den Tool-Bot
echo ³ sprache - „ndert Sprache
echo ³ modus - „ndert Startmodus
echo ³ danksagung - zeigt Danksagung an
)
goto cmd
REM List of languages
:lang
cls
if "%lang%"=="en" echo Language List:
if "%lang%"=="de" echo Sprachliste:
echo _______________________
echo [en] - English
echo [de] - Deutsch
set /p inp=
if "%inp%"=="en" goto enLang
if "%inp%"=="de" goto deLang
REM English language
:enLang
set lang=en
echo en>"%~dp0\settings\lang.cfg"
goto init
REM German language
:deLang
set lang=de
echo de>"%~dp0\settings\lang.cfg"
goto init
REM Startmode
:mode
cls
if "%lang%"=="en" echo Startup Modes:
if "%lang%"=="de" echo Ausfhrungsmodi:
echo _______________________
echo [pm2] - PM2
echo [node] - Node.js
echo [nodemon] - Nodemon
echo [forever] - Forever
set /p inp=
if "%inp%"=="pm2" goto pm2
if "%inp%"=="node" goto node
if "%inp%"=="nodemon" goto nodemon
if "%inp%"=="forever" goto forever
REM Pm2
:pm2
set start=pm2
echo pm2>"%~dp0\settings\start.cfg"
goto init
REM forever start mode
:forever
set start=forever
echo forever>"%~dp0\settings\start.cfg"
goto init
REM Node.js
:node
set start=node
echo node>"%~dp0\settings\start.cfg"
goto init
REM Nodemon
:nodemon
set start=nodemon
echo nodemon>"%~dp0\settings\start.cfg"
goto init
REM Credits
:credits
cls
color 4b
echo Weegeebot (2017 - )
if "%lang%"=="en" echo Developers:
if "%lang%"=="de" echo Entwickler:
echo _______________________
echo HoubkneghteS - Adam Simons
echo Fniux - Till Diegeler
echo JamesTheDemSoc - James Hyun
echo _______________________
pause
goto init