Struct tts_external_api::messages::MessageExecute
source · Expand description
Executes a lua script and returns the value in a AnswerReturn
message.
Using a guid of “-1” runs the script globally.
Fields§
§return_id: u64
Return Id of the execute message
guid: String
The guid the message gets executed on
script: String
The script that gets executed
Implementations§
source§impl MessageExecute
impl MessageExecute
sourcepub fn new(script: String) -> Self
pub fn new(script: String) -> Self
Constructs a new Execute Lua Code Message that executes code globally
sourcepub fn new_object(script: String, guid: String) -> Self
pub fn new_object(script: String, guid: String) -> Self
Constructs a new Execute Lua Code Message that executes code on an object
sourcepub fn as_message(self) -> Message
pub fn as_message(self) -> Message
Returns self as Message::MessageExectute