mirror of
https://github.com/alireza0/x-ui.git
synced 2026-03-16 14:08:17 +00:00
Fix tgbot: Admin can only search for client
This commit is contained in:
@@ -128,7 +128,11 @@ func (t *Tgbot) answerCommand(message *tgbotapi.Message, chatId int64, isAdmin b
|
||||
case "status":
|
||||
msg = "bot is ok."
|
||||
case "usage":
|
||||
t.searchClient(chatId, message.CommandArguments())
|
||||
if isAdmin {
|
||||
t.searchClient(chatId, message.CommandArguments())
|
||||
} else {
|
||||
msg = "Insufficient privilege"
|
||||
}
|
||||
default:
|
||||
msg = "Unknown command"
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user