mirror of
https://github.com/krau/SaveAny-Bot.git
synced 2026-07-09 14:31:25 +08:00
fix: program name
This commit is contained in:
@@ -76,7 +76,7 @@ func registerHandlers(hg *telegohandler.HandlerGroup) {
|
|||||||
msgGroup := hg.Group(telegohandler.AnyMessage())
|
msgGroup := hg.Group(telegohandler.AnyMessage())
|
||||||
msgGroup.Use(func(bot *telego.Bot, update telego.Update, next telegohandler.Handler) {
|
msgGroup.Use(func(bot *telego.Bot, update telego.Update, next telegohandler.Handler) {
|
||||||
if !slice.Contain(config.Cfg.Telegram.Admins, update.Message.From.ID) {
|
if !slice.Contain(config.Cfg.Telegram.Admins, update.Message.From.ID) {
|
||||||
bot.SendMessage(telegoutil.Message(update.Message.Chat.ChatID(), "抱歉, 该 Bot 为个人使用设计, 您可以部署自己的 AnySaveBot 实例: https://github.com/krau/SaveAny-Bot"))
|
bot.SendMessage(telegoutil.Message(update.Message.Chat.ChatID(), "抱歉, 该 Bot 为个人使用设计, 您可以部署自己的 SaveAnyBot 实例: https://github.com/krau/SaveAny-Bot"))
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
next(bot, update)
|
next(bot, update)
|
||||||
|
|||||||
@@ -28,7 +28,7 @@ func Start(ctx context.Context, bot *telego.Bot, message telego.Message) {
|
|||||||
|
|
||||||
func Help(ctx context.Context, bot *telego.Bot, message telego.Message) {
|
func Help(ctx context.Context, bot *telego.Bot, message telego.Message) {
|
||||||
helpText := `
|
helpText := `
|
||||||
AnySave Bot - 转存你的 Telegram 文件
|
SaveAny Bot - 转存你的 Telegram 文件
|
||||||
命令:
|
命令:
|
||||||
/start - 开始使用
|
/start - 开始使用
|
||||||
/help - 显示帮助
|
/help - 显示帮助
|
||||||
|
|||||||
@@ -66,10 +66,10 @@ func Init() {
|
|||||||
viper.SetDefault("temp.cache_ttl", 3600)
|
viper.SetDefault("temp.cache_ttl", 3600)
|
||||||
|
|
||||||
viper.SetDefault("log.level", "INFO")
|
viper.SetDefault("log.level", "INFO")
|
||||||
viper.SetDefault("log.file", "logs/anysave.log")
|
viper.SetDefault("log.file", "logs/saveany.log")
|
||||||
viper.SetDefault("log.backup_count", 7)
|
viper.SetDefault("log.backup_count", 7)
|
||||||
|
|
||||||
viper.SetDefault("db.path", "data/anysave.db")
|
viper.SetDefault("db.path", "data/saveany.db")
|
||||||
|
|
||||||
viper.SetDefault("telegram.api", "https://api.telegram.org")
|
viper.SetDefault("telegram.api", "https://api.telegram.org")
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user