From b0ac19e9fc41698acfb0dfc205be73f8d36a872e Mon Sep 17 00:00:00 2001 From: ChomeNS <95471003+ChomeNS@users.noreply.github.com> Date: Sat, 10 Jun 2023 18:58:46 +0700 Subject: [PATCH] i forgor that i .submit() exists --- .../chayapak/chomens_bot/commands/TranslateCommand.java | 2 +- .../chipmunk/chayapak/chomens_bot/commands/UrbanCommand.java | 2 +- .../chayapak/chomens_bot/commands/WikipediaCommand.java | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main/java/land/chipmunk/chayapak/chomens_bot/commands/TranslateCommand.java b/src/main/java/land/chipmunk/chayapak/chomens_bot/commands/TranslateCommand.java index b19da45..1a5edcd 100644 --- a/src/main/java/land/chipmunk/chayapak/chomens_bot/commands/TranslateCommand.java +++ b/src/main/java/land/chipmunk/chayapak/chomens_bot/commands/TranslateCommand.java @@ -53,7 +53,7 @@ public class TranslateCommand implements Command { final Gson gson = new Gson(); - bot.executorService().execute(() -> { + bot.executorService().submit(() -> { try { final URL url = new URL("https://translate.google.com/translate_a/single?client=at&dt=t&dt=rm&dj=1"); diff --git a/src/main/java/land/chipmunk/chayapak/chomens_bot/commands/UrbanCommand.java b/src/main/java/land/chipmunk/chayapak/chomens_bot/commands/UrbanCommand.java index 8df83c8..8b3e9d8 100644 --- a/src/main/java/land/chipmunk/chayapak/chomens_bot/commands/UrbanCommand.java +++ b/src/main/java/land/chipmunk/chayapak/chomens_bot/commands/UrbanCommand.java @@ -49,7 +49,7 @@ public class UrbanCommand implements Command { final Gson gson = new Gson(); - bot.executorService().execute(() -> { + bot.executorService().submit(() -> { try { final URL url = new URL( "https://api.urbandictionary.com/v0/define?term=" + diff --git a/src/main/java/land/chipmunk/chayapak/chomens_bot/commands/WikipediaCommand.java b/src/main/java/land/chipmunk/chayapak/chomens_bot/commands/WikipediaCommand.java index 365c8a1..cdcff65 100644 --- a/src/main/java/land/chipmunk/chayapak/chomens_bot/commands/WikipediaCommand.java +++ b/src/main/java/land/chipmunk/chayapak/chomens_bot/commands/WikipediaCommand.java @@ -48,7 +48,7 @@ public class WikipediaCommand implements Command { final Gson gson = new Gson(); - bot.executorService().execute(() -> { + bot.executorService().submit(() -> { try { final URL url = new URL( "https://en.wikipedia.org/api/rest_v1/page/summary/" +