brain damage
This commit is contained in:
@@ -38,7 +38,7 @@ class Assistant(
|
|||||||
val text = json.let { it["text"].asString.orEmpty().trim() }
|
val text = json.let { it["text"].asString.orEmpty().trim() }
|
||||||
|
|
||||||
if(!text.startsWith(name)) return
|
if(!text.startsWith(name)) return
|
||||||
val command = text.replaceFirst(name, text)
|
val command = text.replaceFirst(name, "")
|
||||||
val translated = dict.translate(command.trim())
|
val translated = dict.translate(command.trim())
|
||||||
actions.forEach { it.run(translated) }
|
actions.forEach { it.run(translated) }
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user