Fix
Some checks failed
Build docker image / Build-Docker-Image (push) Has been cancelled

This commit is contained in:
2025-07-05 00:10:12 +02:00
parent a829ba200d
commit 40d000ff69
2 changed files with 5 additions and 19 deletions

View File

@@ -134,25 +134,14 @@ async fn _send_downloaded_file(
.into_async_read() .into_async_read()
.compat(); .compat();
let document: InputFile = InputFile::read(data).file_name(filename.clone()); let document = InputFile::read(data).file_name(filename.clone());
match bot bot.send_document(message.chat().id, document)
.send_document(message.chat().id, document)
.caption(caption) .caption(caption)
.send() .send()
.await .await?;
{
Ok(_) => (),
Err(err) => {
log::error!("Download error: {filename:?} | {err:?}");
return Err(err.into());
}
}
match send_donation_notification(bot, message.clone()).await { send_donation_notification(bot, message.clone()).await?;
Ok(_) => (),
Err(err) => log::error!("{err:?}"),
};
Ok(()) Ok(())
} }

View File

@@ -24,10 +24,7 @@ pub enum RegisterRequestStatus {
async fn get_bot_username(token: &str) -> Option<String> { async fn get_bot_username(token: &str) -> Option<String> {
match Bot::new(token).get_me().send().await { match Bot::new(token).get_me().send().await {
Ok(v) => v.username.clone(), Ok(v) => v.username.clone(),
Err(err) => { Err(_) => None,
log::error!("Bot reg (getting username) error: {err:?}");
None
}
} }
} }