mirror of
https://github.com/TheFunny/TelegramTwitterMediaBot.git
synced 2026-09-25 23:52:04 +00:00
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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user