From cd4a8a45e591aafbc330a797f28a63115536e563 Mon Sep 17 00:00:00 2001 From: Nicholas Stonecipher Date: Tue, 30 Jul 2024 19:41:40 -0400 Subject: [PATCH] Expand lmgtfy command, use site that uses Google --- .../org/openredstone/chad/commands/Command.kt | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/src/main/kotlin/org/openredstone/chad/commands/Command.kt b/src/main/kotlin/org/openredstone/chad/commands/Command.kt index 812f4d6..20107d7 100644 --- a/src/main/kotlin/org/openredstone/chad/commands/Command.kt +++ b/src/main/kotlin/org/openredstone/chad/commands/Command.kt @@ -207,13 +207,18 @@ fun insultCommand(insults: List) = command { } val lmgtfy = command { - val search by required() + val search by vararg() reply { - buildString { - append("https://letmegooglethat.com/?q=") - append(search.split("\\s+").joinToString("+") { - URLEncoder.encode(it, "utf-8") - }) + if (search.isEmpty()) { + "No query provided!" + } else { + buildString { + append("") + } } } }