This commit is contained in:
parent
0d862da9ec
commit
fb752fb9a9
@ -43,10 +43,10 @@ public class Cache
|
|||||||
private static boolean verbose = false;
|
private static boolean verbose = false;
|
||||||
private static MessageLogger verbosityLogger = null;
|
private static MessageLogger verbosityLogger = null;
|
||||||
private static final long botMaintainerId = 979809420714332260L;
|
private static final long botMaintainerId = 979809420714332260L;
|
||||||
private final static String expiryTimestampFormat = "yy/MM/dd HH:mm:ss";
|
private static final String expiryTimestampFormat = "yy/MM/dd HH:mm:ss";
|
||||||
|
|
||||||
// note: discord sets interactions' expiry time to 15 minutes by default, so we can't go higher than that.
|
// note: discord sets interactions' expiry time to 15 minutes by default, so we can't go higher than that.
|
||||||
private final static long expiryTimeSeconds = 30L;
|
private static final long expiryTimeSeconds = 30L;
|
||||||
|
|
||||||
// used to count e.g. uptime
|
// used to count e.g. uptime
|
||||||
private static LocalDateTime startupTime = null;
|
private static LocalDateTime startupTime = null;
|
||||||
@ -55,16 +55,16 @@ public class Cache
|
|||||||
private static final LocalDateTime botBirthDate = LocalDateTime.of(2022, 8, 25, 21, 50);
|
private static final LocalDateTime botBirthDate = LocalDateTime.of(2022, 8, 25, 21, 50);
|
||||||
|
|
||||||
// the scheduler that should always be used when running a scheduled task.
|
// the scheduler that should always be used when running a scheduled task.
|
||||||
private final static ScheduledExecutorService taskScheduler = Executors.newSingleThreadScheduledExecutor(); // todo: try-with-resources
|
private static final ScheduledExecutorService taskScheduler = Executors.newSingleThreadScheduledExecutor(); // todo: try-with-resources
|
||||||
|
|
||||||
private final static String execPath = System.getProperty("user.dir");
|
private static final String execPath = System.getProperty("user.dir");
|
||||||
private static final String botName = "Hideko";
|
private static final String botName = "Hideko";
|
||||||
|
|
||||||
private static SlashCommandListener slashCommandListener = null;
|
private static SlashCommandListener slashCommandListener = null;
|
||||||
private static SlashCommandCompletionListener slashCommandCompletionListener = null;
|
private static SlashCommandCompletionListener slashCommandCompletionListener = null;
|
||||||
private static MessageCommandListener messageCommandListener = null;
|
private static MessageCommandListener messageCommandListener = null;
|
||||||
|
|
||||||
private final static String defaultInviteLink =
|
private static final String defaultInviteLink =
|
||||||
"https://discord.com/api/oauth2/authorize?client_id=%userid%&scope=bot+applications.commands&permissions=8";
|
"https://discord.com/api/oauth2/authorize?client_id=%userid%&scope=bot+applications.commands&permissions=8";
|
||||||
|
|
||||||
private static String botApplicationId = "";
|
private static String botApplicationId = "";
|
||||||
|
@ -19,7 +19,7 @@ public class MagicBall
|
|||||||
return new LinkedList<>(Arrays.asList("8ball", "8b", "eightball", "magicball"));
|
return new LinkedList<>(Arrays.asList("8ball", "8b", "eightball", "magicball"));
|
||||||
}
|
}
|
||||||
|
|
||||||
private final static List<String> answers = new ArrayList<>(
|
private static final List<String> answers = new ArrayList<>(
|
||||||
Arrays.asList("It is certain.",
|
Arrays.asList("It is certain.",
|
||||||
"It is decidedly so.",
|
"It is decidedly so.",
|
||||||
"Without a doubt.",
|
"Without a doubt.",
|
||||||
|
@ -34,8 +34,8 @@ import java.util.concurrent.TimeUnit;
|
|||||||
|
|
||||||
public class Trivia
|
public class Trivia
|
||||||
{
|
{
|
||||||
private final static String triviaLink = "https://opentdb.com/api.php?amount=10&type=multiple&category=";
|
private static final String triviaLink = "https://opentdb.com/api.php?amount=10&type=multiple&category=";
|
||||||
private final static String categoriesLink = "https://opentdb.com/api_category.php";
|
private static final String categoriesLink = "https://opentdb.com/api_category.php";
|
||||||
|
|
||||||
public static List<String> channelsRunningTrivia = new ArrayList<>();
|
public static List<String> channelsRunningTrivia = new ArrayList<>();
|
||||||
|
|
||||||
|
@ -27,8 +27,8 @@ import java.util.concurrent.TimeUnit;
|
|||||||
public class UserPunishment
|
public class UserPunishment
|
||||||
{
|
{
|
||||||
|
|
||||||
private final static Duration maxTimeoutDuration = Duration.of(28, ChronoUnit.DAYS);
|
private static final Duration maxTimeoutDuration = Duration.of(28, ChronoUnit.DAYS);
|
||||||
private final static Duration minTimeoutDuration = Duration.of(30, ChronoUnit.SECONDS);
|
private static final Duration minTimeoutDuration = Duration.of(30, ChronoUnit.SECONDS);
|
||||||
|
|
||||||
public static void handle(SlashCommandInteractionEvent event, PunishmentType punishmentType)
|
public static void handle(SlashCommandInteractionEvent event, PunishmentType punishmentType)
|
||||||
{
|
{
|
||||||
|
@ -15,7 +15,7 @@ import java.util.List;
|
|||||||
public class DatabaseSource
|
public class DatabaseSource
|
||||||
{
|
{
|
||||||
|
|
||||||
private final static String sqliteURL = "jdbc:sqlite:%path%";
|
private static final String sqliteURL = "jdbc:sqlite:%path%";
|
||||||
private Connection dbConnection = null;
|
private Connection dbConnection = null;
|
||||||
private final String dbPath;
|
private final String dbPath;
|
||||||
private final Logger logger;
|
private final Logger logger;
|
||||||
|
@ -12,8 +12,8 @@ public class MessageLogger extends ListenerAdapter
|
|||||||
{
|
{
|
||||||
// this class only gets loaded as a listener if verbosity is set to true on startup.
|
// this class only gets loaded as a listener if verbosity is set to true on startup.
|
||||||
|
|
||||||
private final static String guildChannelFormat = "[%guild%] [#%channel%] %user%: %message%";
|
private static final String guildChannelFormat = "[%guild%] [#%channel%] %user%: %message%";
|
||||||
private final static String dmFormat = "[DM] %user%: %message%";
|
private static final String dmFormat = "[DM] %user%: %message%";
|
||||||
|
|
||||||
private final Logger logger = new Logger(MessageLogger.class);
|
private final Logger logger = new Logger(MessageLogger.class);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user