Allow private chats use admin commands

This commit is contained in:
nefrace 2023-01-23 11:54:26 +03:00
parent e2ba9565d5
commit b074189d31
1 changed files with 1 additions and 1 deletions

View File

@ -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{