From b074189d314b87ffdaf4ea69a5d69bcddc22ded3 Mon Sep 17 00:00:00 2001 From: nefrace Date: Mon, 23 Jan 2023 11:54:26 +0300 Subject: [PATCH] Allow private chats use admin commands --- dispatcher.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dispatcher.go b/dispatcher.go index f7a34b9..a811e8a 100644 --- a/dispatcher.go +++ b/dispatcher.go @@ -31,7 +31,7 @@ func (d *Dispatcher) HandleCommand(command *Command, handler commandHandler) *Di if !strings.HasPrefix(u.Text(), command.String()) { return false, nil } - if command.IsAdminOnly && !u.IsUserAdmin() { + if command.IsAdminOnly && !u.IsUserAdmin() && u.ChatID() < 0 { return false, nil } upd := &UpdateCommand{