Skip to content

Commit

Permalink
add delete message
Browse files Browse the repository at this point in the history
  • Loading branch information
lmcmicu committed Oct 6, 2024
1 parent b293aa4 commit 228acc3
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -336,6 +336,13 @@ enum DeleteSubcommands {
help = ROW_HELP)]
rows: Vec<u32>,
},

/// TODO: Add docstring
Message {
#[arg(value_name = "MESSAGE_ID", action = ArgAction::Set,
help = "The ID of the message to update")]
message_id: u16,
},
}

#[async_std::main]
Expand Down Expand Up @@ -571,6 +578,12 @@ async fn main() -> Result<()> {
.expect("Could not delete row");
}
}
DeleteSubcommands::Message { message_id } => {
valve
.delete_message(*message_id)
.await
.expect("Could not delete message");
}
};
}
Commands::DropAll {} => {
Expand Down

0 comments on commit 228acc3

Please sign in to comment.