Skip to content

Commit

Permalink
fix: remove embeded og image
Browse files Browse the repository at this point in the history
  • Loading branch information
SergioRibera committed Jul 23, 2024
1 parent eb23f5f commit 10b005e
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/slash_commands/crate_lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ pub async fn run(client: &Client, options: &[CommandDataOption]) -> String {

fn maskurl(u: String) -> String {
let masked = mask_url(&u);
format!("[{masked}]({u})")
format!("[{masked}](<{u}>)")
}

async fn fetch_crate(
Expand Down Expand Up @@ -215,7 +215,12 @@ async fn fetch_crate(
"@web@",
&format!(
"Página Web: {}",
homepage.map(maskurl).as_deref().unwrap_or("None")
homepage
.map(maskurl)
.as_deref()
.unwrap_or("None")
.replace("<", "")
.replace(">", "")
),
),
TypeSearch::Docs => res
Expand Down

0 comments on commit 10b005e

Please sign in to comment.