aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/at/hannibal2/skyhanni/config
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/at/hannibal2/skyhanni/config')
-rw-r--r--src/main/java/at/hannibal2/skyhanni/config/commands/Commands.kt12
-rw-r--r--src/main/java/at/hannibal2/skyhanni/config/features/ChatConfig.java5
2 files changed, 17 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>) {
diff --git a/src/main/java/at/hannibal2/skyhanni/config/features/ChatConfig.java b/src/main/java/at/hannibal2/skyhanni/config/features/ChatConfig.java
index 30bba65bd..ee46054f6 100644
--- a/src/main/java/at/hannibal2/skyhanni/config/features/ChatConfig.java
+++ b/src/main/java/at/hannibal2/skyhanni/config/features/ChatConfig.java
@@ -133,4 +133,9 @@ public class ChatConfig {
@ConfigOption(name = "Arachne Hider", desc = "Hide chat messages about the Arachne Fight while outside of §eArachne's Sanctuary§7.")
@ConfigEditorBoolean
public boolean hideArachneMessages = false;
+
+ @Expose
+ @ConfigOption(name = "Translator", desc = "Click on a message to translate it into English. Use /shcopytranslation to get the translation from English. Translation is not guaranteed to be 100% accurate.")
+ @ConfigEditorBoolean
+ public boolean translator = false;
}