-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathStart.java
38 lines (30 loc) · 1.16 KB
/
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
33
34
35
36
37
38
package src.ctt.GameMlemBot;
import java.io.File;
import src.ctt.GameMlemBot.Logic.GameMlemBotManager.GameMlemBotManager;
import src.ctt.GameMlemBot.Logic.GameMlemBotManager.GameMlemGuildManager;
import src.ctt.GameMlemBot.Logic.Handler.LoadSlashCommands;
import src.ctt.GameMlemBot.Logic.Handler.OsuHandler.CommandHandler.OsuRequest;
import src.ctt.GameMlemBot.Logic.Model.GameMlemData.GameMlemUserDataManager;
import src.ctt.GameMlemBot.Utils.EnviromentGet;
import src.ctt.GameMlemBot.Utils.FilePath;
import java.util.concurrent.locks.ReentrantReadWriteLock;
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();
new LoadSlashCommands();
new DataLooper();
// start bot
GameMlemBotManager.connect(EnviromentGet.DISCORD_BOT_TOKEN());
}
}