Skip to content

Commit

Permalink
add cobalt.tools subtext
Browse files Browse the repository at this point in the history
  • Loading branch information
Jacherr committed Oct 21, 2024
1 parent 0538586 commit 20173a2
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 4 deletions.
5 changes: 3 additions & 2 deletions assyst-core/src/command/services/download.rs
Original file line number Diff line number Diff line change
Expand Up @@ -278,8 +278,9 @@ pub async fn download(ctxt: CommandCtxt<'_>, url: Word, options: DownloadFlags)
ctxt.reply((
result,
&format!(
"Took {}",
format_duration(&ctxt.data.execution_timings.processing_time_start.elapsed())
"Took {}\n{}",
format_duration(&ctxt.data.execution_timings.processing_time_start.elapsed()),
"Downloaded with cobalt.tools".subtext()
)[..],
))
.await?;
Expand Down
2 changes: 0 additions & 2 deletions assyst-core/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -183,8 +183,6 @@ async fn main() {
}
});

let a = assyst.clone();

spawn(async move {
info!("Connecting to assyst-gateway pipe at {}", GATEWAY_PIPE_PATH);
loop {
Expand Down
5 changes: 5 additions & 0 deletions assyst-string-fmt/src/markdown.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ pub trait Markdown {
fn timestamp(seconds: usize, style: TimestampStyle) -> String {
format!("<t:{seconds}:{style}>")
}
fn subtext(&self) -> String;
}

pub enum TimestampStyle {
Expand Down Expand Up @@ -144,6 +145,10 @@ where
}
)
}

fn subtext(&self) -> String {
format!("-# {self}")
}
}

pub fn parse_codeblock(input: String) -> String {
Expand Down

0 comments on commit 20173a2

Please sign in to comment.