Api for backup Telegram (#468)

This commit is contained in:
Mahdi Nemati
2023-05-19 00:31:05 +03:30
committed by GitHub
parent 2fbfc88bc1
commit 334b28cddc
2 changed files with 18 additions and 2 deletions
+7
View File
@@ -13,6 +13,7 @@ import (
"x-ui/util/common"
"x-ui/xray"
"github.com/gin-gonic/gin"
"github.com/mymmrac/telego"
th "github.com/mymmrac/telego/telegohandler"
tu "github.com/mymmrac/telego/telegoutil"
@@ -500,6 +501,12 @@ func (t *Tgbot) SendReport() {
}
}
func (t *Tgbot) SendBackUP(c *gin.Context) {
for _, adminId := range adminIds {
t.sendBackup(int64(adminId))
}
}
func (t *Tgbot) getServerUsage() string {
var info string
//get hostname