teamtalk 6.0.0

TeamTalk SDK for Rust
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#[cfg(feature = "scripts")]
use teamtalk::Client;
#[cfg(feature = "scripts")]
fn main() -> Result<(), Box<dyn std::error::Error>> {
    let client = Client::new()?;
    client.enable_scripts();
    client.scripts_mut(|scripts| {
        let _ = scripts.load_script("events", "crates/teamtalk/examples/scripts/events.lua");
    });
    Ok(())
}

#[cfg(not(feature = "scripts"))]
fn main() {
    eprintln!("Enable scripts feature: cargo run --example lua_script_events --features scripts");
}