refactor: only capitalize initial for globals

This commit is contained in:
2025-02-22 15:34:10 -05:00
parent 4e64bc6ac4
commit 164ccd3a7f
4 changed files with 9 additions and 9 deletions

View File

@@ -25,7 +25,7 @@ pub async fn handle_event(client: Client, event: Event, state: State) -> anyhow:
let formatted_message = message.message();
info!("{}", formatted_message.to_ansi());
let owners = globals.get::<Vec<String>>("OWNERS")?;
let owners = globals.get::<Vec<String>>("Owners")?;
if message.is_whisper()
&& let (Some(sender), content) = message.split_sender_and_content()
&& owners.contains(&sender)

View File

@@ -40,11 +40,11 @@ async fn main() -> anyhow::Result<()> {
let globals = lua.globals();
let server = globals
.get::<String>("SERVER")
.expect("SERVER should be in lua globals");
.get::<String>("Server")
.expect("Server should be in lua globals");
let username = globals
.get::<String>("USERNAME")
.expect("USERNAME should be in lua globals");
.get::<String>("Username")
.expect("Username should be in lua globals");
globals.set("script_path", script_path)?;
lua::register_functions(&lua, &globals)?;