File tree Expand file tree Collapse file tree 1 file changed +10
-7
lines changed Expand file tree Collapse file tree 1 file changed +10
-7
lines changed Original file line number Diff line number Diff line change @@ -4,6 +4,7 @@ use std::str::FromStr;
4
4
5
5
use poise:: serenity_prelude:: GatewayIntents ;
6
6
use poise:: { async_trait, CreateReply } ;
7
+ use protocol:: VersionResponse ;
7
8
use rusqlite:: { named_params, Connection , OpenFlags } ;
8
9
use serenity:: builder:: { CreateAllowedMentions , CreateAttachment } ;
9
10
use tokio:: join;
@@ -448,13 +449,15 @@ async fn version(ctx: Context<'_>) -> Result<(), PoiseError> {
448
449
let res = pool. lock ( ) . await . version ( ) . await ;
449
450
450
451
match res {
451
- Ok ( typst_version) => {
452
- let message = format ! (
453
- "The bot was built from git hash `{}`\n The bot is using Typst version {}, git hash `{}`" ,
454
- env!( "BUILD_SHA" ) ,
455
- typst_version. version,
456
- typst_version. git_hash,
457
- ) ;
452
+ Ok ( VersionResponse {
453
+ git_hash : typst_hash,
454
+ version : typst_version,
455
+ } ) => {
456
+ let bot_hash = env ! ( "BUILD_SHA" ) ;
457
+ let message = format ! ( "\
458
+ The bot was built from git hash [`{bot_hash}`](<https://github.com/mattfbacon/typst-bot/tree/{bot_hash}>)
459
+ The bot is using Typst version **{typst_version}**, git hash [`{typst_hash}`](<https://github.com/typst/typst/tree/{typst_hash}>)\
460
+ ") ;
458
461
ctx. reply ( message) . await ?;
459
462
}
460
463
Err ( error) => {
You can’t perform that action at this time.
0 commit comments