mirror of
https://github.com/MHSanaei/3x-ui.git
synced 2025-04-20 05:52:24 +00:00
Update tgbot.go
This commit is contained in:
parent
9432180665
commit
f49ea3ae1f
1 changed files with 9 additions and 3 deletions
|
@ -387,12 +387,18 @@ func (t *Tgbot) getClientUsage(chatId int64, tgUserName string) {
|
||||||
} else {
|
} else {
|
||||||
total = common.FormatTraffic((traffic.Total))
|
total = common.FormatTraffic((traffic.Total))
|
||||||
}
|
}
|
||||||
output := fmt.Sprintf("💡 فعال: %t\r\n📧 نام: %s\r\n🔼 میزان آپلود↑: %s\r\n🔽 میزان دانلود↓: %s\r\n🔄 کل: %s / %s\r\n📅 تاریخ انقضاء: %s\r\n",
|
Enable := ""
|
||||||
traffic.Enable, traffic.Email, common.FormatTraffic(traffic.Up), common.FormatTraffic(traffic.Down), common.FormatTraffic((traffic.Up + traffic.Down)),
|
if traffic.Enable == "true"{
|
||||||
|
Enable = "بله"
|
||||||
|
} else {
|
||||||
|
Enable = "خیر"
|
||||||
|
}
|
||||||
|
output := fmt.Sprintf("💡 فعال: %t\r\n\n📧 نام: %s\r\n\n🔼 میزان آپلود↑: %s\r\n🔽 میزان دانلود↓: %s\r\n🔄 کل: %s / %s\r\n\n📅 تاریخ انقضاء: %s\r\n",
|
||||||
|
Enable, traffic.Email, common.FormatTraffic(traffic.Up), common.FormatTraffic(traffic.Down), common.FormatTraffic((traffic.Up + traffic.Down)),
|
||||||
total, expiryTime)
|
total, expiryTime)
|
||||||
t.SendMsgToTgbot(chatId, output)
|
t.SendMsgToTgbot(chatId, output)
|
||||||
}
|
}
|
||||||
t.SendAnswer(chatId, "Please choose:", false)
|
t.SendAnswer(chatId, "یک گزینه را انتخاب کنید:", false)
|
||||||
}
|
}
|
||||||
|
|
||||||
func (t *Tgbot) searchClient(chatId int64, email string) {
|
func (t *Tgbot) searchClient(chatId int64, email string) {
|
||||||
|
|
Loading…
Reference in a new issue