mirror of
https://github.com/MHSanaei/3x-ui.git
synced 2025-04-19 13:32: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":
|
||||
msg = "bot is ok ✅"
|
||||
case "usage":
|
||||
if isAdmin {
|
||||
t.searchClient(chatId, message.CommandArguments())
|
||||
if len(message.CommandArguments()) > 1 {
|
||||
if isAdmin {
|
||||
t.searchClient(chatId, message.CommandArguments())
|
||||
} else {
|
||||
t.searchForClient(chatId, message.CommandArguments())
|
||||
}
|
||||
} else {
|
||||
t.searchForClient(chatId, message.CommandArguments())
|
||||
msg = "❗Please provide a text for search!"
|
||||
}
|
||||
default:
|
||||
msg = "❗ Unknown command"
|
||||
|
|
Loading…
Reference in a new issue