diff --git a/src/main.rs b/src/main.rs index f547c31..18db7c7 100644 --- a/src/main.rs +++ b/src/main.rs @@ -190,11 +190,11 @@ async fn parse_message(event: SyncRoomMessageEvent, room: Joined) -> Result<()> if let Some(message) = message.strip_prefix('!') { let (command, args) = message.split_once(' ').unwrap_or((message, "")); - match BotCommand::from_str(command).ok() { - Some(BotCommand::Source) => source(room).await?, - Some(BotCommand::Uwu) => uwuify(room, args).await?, - Some(BotCommand::Ping) => ping(room).await?, - Some(BotCommand::Help) => help(room).await?, + match BotCommand::from_str(command) { + Ok(BotCommand::Source) => source(room).await?, + Ok(BotCommand::Uwu) => uwuify(room, args).await?, + Ok(BotCommand::Ping) => ping(room).await?, + Ok(BotCommand::Help) => help(room).await?, _ => unsupported_command(event, room, command).await?, } }