From 79aa4c9575d9b374af60781265b1dc75e19355e6 Mon Sep 17 00:00:00 2001 From: NetheriteMiner <88792142+NetheriteMiner@users.noreply.github.com> Date: Mon, 28 Aug 2023 17:43:25 -0400 Subject: Add Translator (#383) Co-authored-by: hannibal2 <24389977+hannibal00212@users.noreply.github.com> --- .../java/at/hannibal2/skyhanni/config/commands/Commands.kt | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'src/main/java/at/hannibal2/skyhanni/config/commands') diff --git a/src/main/java/at/hannibal2/skyhanni/config/commands/Commands.kt b/src/main/java/at/hannibal2/skyhanni/config/commands/Commands.kt index 0768e9f65..ab94a1e6d 100644 --- a/src/main/java/at/hannibal2/skyhanni/config/commands/Commands.kt +++ b/src/main/java/at/hannibal2/skyhanni/config/commands/Commands.kt @@ -7,6 +7,7 @@ import at.hannibal2.skyhanni.data.ChatManager import at.hannibal2.skyhanni.data.GuiEditManager import at.hannibal2.skyhanni.features.bingo.BingoCardDisplay import at.hannibal2.skyhanni.features.bingo.BingoNextStepHelper +import at.hannibal2.skyhanni.features.chat.Translator import at.hannibal2.skyhanni.features.event.diana.BurrowWarpHelper import at.hannibal2.skyhanni.features.event.diana.InquisitorWaypointShare import at.hannibal2.skyhanni.features.fame.AccountUpgradeReminder @@ -142,6 +143,13 @@ object Commands { "shfarmingprofile", "Look up the farming profile from yourself or another player on elitebot.dev" ) { FarmingWeightDisplay.lookUpCommand(it) } + registerCommand( + "shcopytranslation", + " \n" + + "Requires the Chat > Translator feature to be enabled.\n" + + "Copies the translation for a given message to your clipboard. " + + "Language codes are at the end of the translation when you click on a message." + ) { Translator.fromEnglish(it) } } private fun usersBugFix() { @@ -237,6 +245,10 @@ object Commands { registerCommand("shstopcityprojectreminder", "") { CityProjectFeatures.disable() } registerCommand("shsendcontests", "") { GardenNextJacobContest.shareContestConfirmed(it) } registerCommand("shstopaccountupgradereminder", "") { AccountUpgradeReminder.disable() } + registerCommand( + "shsendtranslation", + "Respond with a translation of the message that the user clicks" + ) { Translator.toEnglish(it) } } private fun commandHelp(args: Array) { -- cgit