1. Go to this page and download the library: Download hitmare/unlockptb library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
$message = $this->getMessage();
$chat_id = $message->getChat()->getId();
$isUnlocked = Unlock::isUnlocked($chat_id);
$lockChat = $this->getConfig('lockChat');
$thisChat = $message->getChat()->getType();
//Check if the lock applys to this Chat Type
if (in_array($thisChat,$lockChat)) {
//Check if Command is unlocked
if (!$isUnlocked) {
$data = ['chat_id' => $chat_id, 'text' => 'This Command is locked inside this Chat'];
return Request::sendMessage($data);
}
}
// Your Code down here