refactor(handlers): reply returns unit

Every one of its call sites discarded the message id (a bare ?; or let _ =),
so the Result carried a value nothing could use.
This commit is contained in:
2026-09-21 17:35:50 +08:00
parent 40ab07882d
commit 7ecb61399d
+3 -2
View File
@@ -32,16 +32,17 @@ use teloxide::utils::command::BotCommands;
use urls::{URL_JOBS, extract_urls};
/// Reply to a message by id, keeping the reply decoration even if the
/// original was already deleted. Returns the reply's message id.
/// original was already deleted.
pub(crate) async fn reply(
sender: &dyn MediaSender,
chat_id: i64,
reply_to: MessageId,
text: impl Into<String>,
) -> Result<i64, RequestError> {
) -> Result<(), RequestError> {
sender
.send_message(ChatId(chat_id), text.into(), Some(reply_to), None)
.await
.map(|_| ())
}
/// Reply to a message by id with HTML parse mode (same reply decoration as