refactor: move version to config package

This commit is contained in:
krau
2025-08-23 16:10:02 +08:00
parent c023fd869d
commit 94f796d0e8
6 changed files with 23 additions and 22 deletions

View File

@@ -5,7 +5,7 @@ import (
"github.com/celestix/gotgproto/dispatcher"
"github.com/celestix/gotgproto/ext"
"github.com/krau/SaveAny-Bot/pkg/consts"
"github.com/krau/SaveAny-Bot/config"
)
func handleHelpCmd(ctx *ext.Context, update *ext.Update) error {
@@ -24,10 +24,10 @@ Save Any Bot - 转存你的 Telegram 文件
使用帮助: https://sabot.unv.app/usage/
`
shortHash := consts.GitCommit
shortHash := config.GitCommit
if len(shortHash) > 7 {
shortHash = shortHash[:7]
}
ctx.Reply(update, ext.ReplyTextString(fmt.Sprintf(helpText, consts.Version, shortHash)), nil)
ctx.Reply(update, ext.ReplyTextString(fmt.Sprintf(helpText, config.Version, shortHash)), nil)
return dispatcher.EndGroups
}