|
|
@ -31,6 +31,9 @@ import java.io.*; |
|
|
|
import java.util.*; |
|
|
|
import java.util.*; |
|
|
|
import java.util.regex.Pattern; |
|
|
|
import java.util.regex.Pattern; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
import static discord.ChatChannel.ADMINLOG; |
|
|
|
|
|
|
|
import static discord.ChatChannel.SEPTIC; |
|
|
|
|
|
|
|
|
|
|
|
/* |
|
|
|
/* |
|
|
|
* MagicBot is many things to Magicbane... |
|
|
|
* MagicBot is many things to Magicbane... |
|
|
|
* |
|
|
|
* |
|
|
@ -119,11 +122,7 @@ public class MagicBot extends ListenerAdapter { |
|
|
|
|
|
|
|
|
|
|
|
Logger.info("***MAGICBOT IS RUNNING***"); |
|
|
|
Logger.info("***MAGICBOT IS RUNNING***"); |
|
|
|
|
|
|
|
|
|
|
|
HashMap<Integer, String> adminEvents = database.getAdminEvents(); |
|
|
|
SendAdminLogUpdates(); |
|
|
|
|
|
|
|
|
|
|
|
for (String adminEvent : adminEvents.values()) { |
|
|
|
|
|
|
|
Logger.info(adminEvent); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
@ -363,7 +362,8 @@ public class MagicBot extends ListenerAdapter { |
|
|
|
Writer fileWriter; |
|
|
|
Writer fileWriter; |
|
|
|
|
|
|
|
|
|
|
|
if (inString == null) |
|
|
|
if (inString == null) |
|
|
|
return;; |
|
|
|
return; |
|
|
|
|
|
|
|
; |
|
|
|
|
|
|
|
|
|
|
|
outString = command + String.join(" ", inString); |
|
|
|
outString = command + String.join(" ", inString); |
|
|
|
outString += "\n"; |
|
|
|
outString += "\n"; |
|
|
@ -376,4 +376,18 @@ public class MagicBot extends ListenerAdapter { |
|
|
|
e.printStackTrace(); |
|
|
|
e.printStackTrace(); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private static void SendAdminLogUpdates() { |
|
|
|
|
|
|
|
HashMap<Integer, String> adminEvents = database.getAdminEvents(); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
for (String adminEvent : adminEvents.values()) { |
|
|
|
|
|
|
|
String outString = |
|
|
|
|
|
|
|
"```\n" + "Hello Players \n\n" + |
|
|
|
|
|
|
|
adminEvent + "\n\n" + |
|
|
|
|
|
|
|
RobotSpeak.getRobotSpeak() + "\n```"; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (ADMINLOG.textChannel.canTalk()) |
|
|
|
|
|
|
|
ADMINLOG.textChannel.sendMessage(outString).queue(); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|