aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/at/hannibal2/skyhanni/config/commands
diff options
context:
space:
mode:
authorNetheriteMiner <88792142+NetheriteMiner@users.noreply.github.com>2023-08-28 17:43:25 -0400
committerGitHub <noreply@github.com>2023-08-28 23:43:25 +0200
commit79aa4c9575d9b374af60781265b1dc75e19355e6 (patch)
tree7accfd1a6f3afccea97ec373e99642ba936d84f3 /src/main/java/at/hannibal2/skyhanni/config/commands
parente53b7e6b49244085eed7623fa497988529aa5414 (diff)
downloadskyhanni-79aa4c9575d9b374af60781265b1dc75e19355e6.tar.gz
skyhanni-79aa4c9575d9b374af60781265b1dc75e19355e6.tar.bz2
skyhanni-79aa4c9575d9b374af60781265b1dc75e19355e6.zip
Add Translator (#383)
Co-authored-by: hannibal2 <24389977+hannibal00212@users.noreply.github.com>
Diffstat (limited to 'src/main/java/at/hannibal2/skyhanni/config/commands')
-rw-r--r--src/main/java/at/hannibal2/skyhanni/config/commands/Commands.kt12
1 files changed, 12 insertions, 0 deletions
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",
+ "<language code (2 letters)> <messsage to translate>\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<String>) {