mirror of
https://github.com/MHSanaei/3x-ui.git
synced 2025-04-19 21:42:24 +00:00
[tgbot] fix client search
This commit is contained in:
parent
0605221628
commit
bbec13c0da
1 changed files with 7 additions and 3 deletions
|
@ -128,10 +128,14 @@ func (t *Tgbot) answerCommand(message *tgbotapi.Message, chatId int64, isAdmin b
|
||||||
case "status":
|
case "status":
|
||||||
msg = "bot is ok ✅"
|
msg = "bot is ok ✅"
|
||||||
case "usage":
|
case "usage":
|
||||||
if isAdmin {
|
if len(message.CommandArguments()) > 1 {
|
||||||
t.searchClient(chatId, message.CommandArguments())
|
if isAdmin {
|
||||||
|
t.searchClient(chatId, message.CommandArguments())
|
||||||
|
} else {
|
||||||
|
t.searchForClient(chatId, message.CommandArguments())
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
t.searchForClient(chatId, message.CommandArguments())
|
msg = "❗Please provide a text for search!"
|
||||||
}
|
}
|
||||||
default:
|
default:
|
||||||
msg = "❗ Unknown command"
|
msg = "❗ Unknown command"
|
||||||
|
|
Loading…
Reference in a new issue