refactor(events): don't return when no Owners

This commit is contained in:
Ryan 2025-03-08 15:59:49 -05:00
parent 74a810b956
commit 97961b0a49
Signed by: ErrorNoInternet
GPG Key ID: 2486BFB7B1E6A4A3

View File

@ -48,7 +48,10 @@ pub async fn handle_event(client: Client, event: Event, state: State) -> anyhow:
}
if is_whisper
&& globals.get::<Vec<String>>("Owners")?.contains(sender)
&& globals
.get::<Vec<String>>("Owners")
.unwrap_or_default()
.contains(sender)
&& let Err(error) = state.commands.execute(
content.clone(),
CommandSource {