Improve final fields naming
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
2023-01-16 02:31:11 +01:00
parent d62d6bdfdd
commit 94037b252f
5 changed files with 24 additions and 27 deletions

View File

@@ -36,8 +36,8 @@ import java.util.concurrent.TimeUnit;
public class Trivia
{
private static final org.slf4j.Logger LOGGER = LoggerFactory.getLogger(Trivia.class);
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";
private static final String TRIVIA_API_LINK = "https://opentdb.com/api.php?amount=10&type=multiple&category=";
private static final String TRIVIA_API_CATEGORIES_LINK = "https://opentdb.com/api_category.php";
public static List<String> channelsRunningTrivia = new ArrayList<>();
@@ -47,8 +47,8 @@ public class Trivia
// first string is the channelId, the list contain all score records for that channel
public static HashMap<String, LinkedList<TriviaScore>> channelAndScores = new HashMap<>();
public static String getTriviaLink(int categoryId) {return triviaLink + categoryId; }
public static String getCategoriesLink() {return categoriesLink; }
public static String getTriviaLink(int categoryId) {return TRIVIA_API_LINK + categoryId; }
public static String getCategoriesLink() {return TRIVIA_API_CATEGORIES_LINK; }
public static String getNoDMsError() {
return "\uD83D\uDE22 Sorry! Trivia doesn't work in DMs.";

View File

@@ -6,7 +6,6 @@ import net.dv8tion.jda.api.entities.User;
import net.dv8tion.jda.api.events.message.MessageReceivedEvent;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
import wtf.beatrice.hidekobot.Cache;
import wtf.beatrice.hidekobot.HidekoBot;
import wtf.beatrice.hidekobot.commands.base.ProfileImage;
import wtf.beatrice.hidekobot.objects.MessageResponse;
@@ -57,8 +56,6 @@ public class AvatarCommand implements MessageCommand
@Override
public void runCommand(MessageReceivedEvent event, String label, String[] args)
{
int[] acceptedSizes = Cache.getSupportedAvatarResolutions();
User user;
int resolution = -1;