Fix code style error
continuous-integration/drone/push Build is passing Details

This commit is contained in:
Bea 2023-01-15 00:40:19 +01:00
parent 0d862da9ec
commit fb752fb9a9
6 changed files with 13 additions and 13 deletions

View File

@ -43,10 +43,10 @@ public class Cache
private static boolean verbose = false;
private static MessageLogger verbosityLogger = null;
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.
private final static long expiryTimeSeconds = 30L;
private static final long expiryTimeSeconds = 30L;
// used to count e.g. uptime
private static LocalDateTime startupTime = null;
@ -55,16 +55,16 @@ public class Cache
private static final LocalDateTime botBirthDate = LocalDateTime.of(2022, 8, 25, 21, 50);
// 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 SlashCommandListener slashCommandListener = null;
private static SlashCommandCompletionListener slashCommandCompletionListener = 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";
private static String botApplicationId = "";

View File

@ -19,7 +19,7 @@ public class 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.",
"It is decidedly so.",
"Without a doubt.",

View File

@ -34,8 +34,8 @@ import java.util.concurrent.TimeUnit;
public class Trivia
{
private final static 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 triviaLink = "https://opentdb.com/api.php?amount=10&type=multiple&category=";
private static final String categoriesLink = "https://opentdb.com/api_category.php";
public static List<String> channelsRunningTrivia = new ArrayList<>();

View File

@ -27,8 +27,8 @@ import java.util.concurrent.TimeUnit;
public class UserPunishment
{
private final static Duration maxTimeoutDuration = Duration.of(28, ChronoUnit.DAYS);
private final static Duration minTimeoutDuration = Duration.of(30, ChronoUnit.SECONDS);
private static final Duration maxTimeoutDuration = Duration.of(28, ChronoUnit.DAYS);
private static final Duration minTimeoutDuration = Duration.of(30, ChronoUnit.SECONDS);
public static void handle(SlashCommandInteractionEvent event, PunishmentType punishmentType)
{

View File

@ -15,7 +15,7 @@ import java.util.List;
public class DatabaseSource
{
private final static String sqliteURL = "jdbc:sqlite:%path%";
private static final String sqliteURL = "jdbc:sqlite:%path%";
private Connection dbConnection = null;
private final String dbPath;
private final Logger logger;

View File

@ -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.
private final static String guildChannelFormat = "[%guild%] [#%channel%] %user%: %message%";
private final static String dmFormat = "[DM] %user%: %message%";
private static final String guildChannelFormat = "[%guild%] [#%channel%] %user%: %message%";
private static final String dmFormat = "[DM] %user%: %message%";
private final Logger logger = new Logger(MessageLogger.class);