forked from CaoTrongThang/GameMlemDiscordBot
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathStart.java
32 lines (26 loc) · 943 Bytes
/
Start.java
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
package src.ctt.GameMlemBot;
import java.io.File;
import src.ctt.GameMlemBot.Logic.Data.DataManager;
import src.ctt.GameMlemBot.Logic.GameMlemBotManager.DiscordBotManager;
import src.ctt.GameMlemBot.Logic.Handler.OsuHandler.OsuCommandHandler.OsuRequest;
import src.ctt.GameMlemBot.Utils.EnviromentGet;
import src.ctt.GameMlemBot.Utils.FilePath;
public class Start {
static {
try {
// Run osu calculator server
Runtime runTime = Runtime.getRuntime();
Process process = runTime.exec(FilePath.OSU_PP_CALCULATE_SERVER, null,
new File(FilePath.OSU_PP_CALCULATE_SERVER_DIR));
} catch (Exception e) {
e.printStackTrace();
}
}
public Start() {
// get Osu API Key
OsuRequest.postAccessAPIKey();
DataManager.loadData();
// start bot
DiscordBotManager.connect(EnviromentGet.DISCORD_BOT_TOKEN());
}
}