I'm wondering if it's possible to make a script ha...
# scripting
z
I'm wondering if it's possible to make a script have access to the current runtime variables?
i
I'm not sure I understand, what you mean. There is the JSR-223 support though, it allows you to embed a scripting/repl engine and pass references to the current runtime objects to your scripts. See e.g. some examples here - https://github.com/Kotlin/kotlin-script-examples/blob/master/jvm/jsr223/jsr223-simple/src/test/kotlin/org/jetbrains/kotlin/script/examples/jvm/jsr223/simple/test/simpleJsr223Test.kt Maybe it will answer your question.
p
you can also without scriptengine
z
@PixelHamster perfect, im also using kotlin scripting in my kotlin discord bot
p
Glad I could help