From 6f0dad508c823af16e76544544c2b530fc721095 Mon Sep 17 00:00:00 2001 From: ChomeNS <95471003+ChomeNS@users.noreply.github.com> Date: Fri, 18 Oct 2024 14:27:56 +0700 Subject: [PATCH] whoops i meant redirects not normalized --- .../me/chayapak1/chomens_bot/commands/WikipediaCommand.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main/java/me/chayapak1/chomens_bot/commands/WikipediaCommand.java b/src/main/java/me/chayapak1/chomens_bot/commands/WikipediaCommand.java index 3406aa6..c9c3c22 100644 --- a/src/main/java/me/chayapak1/chomens_bot/commands/WikipediaCommand.java +++ b/src/main/java/me/chayapak1/chomens_bot/commands/WikipediaCommand.java @@ -52,9 +52,9 @@ public class WikipediaCommand extends Command { final JsonObject query = pageIDJsonOutput.getAsJsonObject("query"); - final JsonElement normalizedElement = query.get("normalized"); - if (normalizedElement != null) { - final JsonArray normalized = normalizedElement.getAsJsonArray(); + final JsonElement redirectsElement = query.get("redirects"); + if (redirectsElement != null) { + final JsonArray normalized = redirectsElement.getAsJsonArray(); for (JsonElement element : normalized) { final JsonObject redirect = element.getAsJsonObject();