Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/MHSanaei/3x-ui.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormhsanaei <ho3ein.sanaei@gmail.com>2024-07-07 12:55:59 +0300
committermhsanaei <ho3ein.sanaei@gmail.com>2024-07-07 13:10:24 +0300
commit7a51d2f2cccbc0add04518808415912a7217bc28 (patch)
treecc4bce27d16caec5361d51de676eecd0c628ad0d /web/service/tgbot.go
parent02ae61fe6beb68ab8e5859a5eaa2b68514c0b454 (diff)
Typo fixed
Diffstat (limited to 'web/service/tgbot.go')
-rw-r--r--web/service/tgbot.go16
1 files changed, 8 insertions, 8 deletions
diff --git a/web/service/tgbot.go b/web/service/tgbot.go
index c1fd79fe..eecea078 100644
--- a/web/service/tgbot.go
+++ b/web/service/tgbot.go
@@ -201,7 +201,7 @@ func (t *Tgbot) OnReceive() {
}, th.AnyCommand())
botHandler.HandleCallbackQuery(func(_ *telego.Bot, query telego.CallbackQuery) {
- t.asnwerCallback(&query, checkAdmin(query.From.ID))
+ t.answerCallback(&query, checkAdmin(query.From.ID))
}, th.AnyCallbackQueryWithMessage())
botHandler.HandleMessage(func(_ *telego.Bot, message telego.Message) {
@@ -286,7 +286,7 @@ func (t *Tgbot) answerCommand(message *telego.Message, chatId int64, isAdmin boo
}
}
-func (t *Tgbot) asnwerCallback(callbackQuery *telego.CallbackQuery, isAdmin bool) {
+func (t *Tgbot) answerCallback(callbackQuery *telego.CallbackQuery, isAdmin bool) {
chatId := callbackQuery.Message.GetChat().ID
if isAdmin {
@@ -964,7 +964,7 @@ func (t *Tgbot) getServerUsage(chatId int64, messageID ...int) string {
return info
}
-// Send server usage without an inline keyborad
+// Send server usage without an inline keyboard
func (t *Tgbot) sendServerUsage() string {
info := t.prepareServerUsageInfo()
return info
@@ -1052,14 +1052,14 @@ func (t *Tgbot) UserLoginNotify(username string, password string, ip string, tim
func (t *Tgbot) getInboundUsages() string {
info := ""
// get traffic
- inbouds, err := t.inboundService.GetAllInbounds()
+ inbounds, err := t.inboundService.GetAllInbounds()
if err != nil {
logger.Warning("GetAllInbounds run failed:", err)
info += t.I18nBot("tgbot.answers.getInboundsFailed")
} else {
// NOTE:If there no any sessions here,need to notify here
// TODO:Sub-node push, automatic conversion format
- for _, inbound := range inbouds {
+ for _, inbound := range inbounds {
info += t.I18nBot("tgbot.messages.inbound", "Remark=="+inbound.Remark)
info += t.I18nBot("tgbot.messages.port", "Port=="+strconv.Itoa(inbound.Port))
info += t.I18nBot("tgbot.messages.traffic", "Total=="+common.FormatTraffic((inbound.Up+inbound.Down)), "Upload=="+common.FormatTraffic(inbound.Up), "Download=="+common.FormatTraffic(inbound.Down))
@@ -1332,20 +1332,20 @@ func (t *Tgbot) searchClient(chatId int64, email string, messageID ...int) {
}
func (t *Tgbot) searchInbound(chatId int64, remark string) {
- inbouds, err := t.inboundService.SearchInbounds(remark)
+ inbounds, err := t.inboundService.SearchInbounds(remark)
if err != nil {
logger.Warning(err)
msg := t.I18nBot("tgbot.wentWrong")
t.SendMsgToTgbot(chatId, msg)
return
}
- if len(inbouds) == 0 {
+ if len(inbounds) == 0 {
msg := t.I18nBot("tgbot.noInbounds")
t.SendMsgToTgbot(chatId, msg)
return
}
- for _, inbound := range inbouds {
+ for _, inbound := range inbounds {
info := ""
info += t.I18nBot("tgbot.messages.inbound", "Remark=="+inbound.Remark)
info += t.I18nBot("tgbot.messages.port", "Port=="+strconv.Itoa(inbound.Port))