Download the PHP package hitmare/unlockptb without Composer

On this page you can find all versions of the php package hitmare/unlockptb. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package unlockptb

unlockPTB

Table of Contents

Introduction

This is unlock Class for the PHP Telegram Bot Libary to lock an unlock the Bot in Private and Group Channels

Instructions

Installation

Install this package through [Composer][composer]. Edit your project's composer.json file to require hitmare/unlockptb.

Edit composer.json file and add hitmare/unlockptb under require

and run composer update

or

run this command in your command line:

You also have to add for every Command what you want to lock a CommandConfig line in the hook.php
eg

Add the Lockstatus Check to your Files

To use the Libary you have to add the Code for checking the Lockstatus in every Command File where you want to include the Lock function. At the Moment it is, as far as i know, the only way to implement this without editing the Main Code of the Bot

To define in wich Type of Chat the Lock should applys, just add or delete the Chat type in the hoop.php

The Lock applys to every Chat that matches the type of the Array above.

How to use

  1. Generate the Authkey

To generate the Authkey there are two ways:
Get the wanted Chat or User ID through the /chats * Command and execute /getAutchkey <id> directly to the Bot

OR

(Only for Group Chats) Execute /getAutchkey inside of the Group Chat and the Bot will send the Botadmin who send the Command the Authkey

  1. Unlock the Bot For Private Chat:
    • Execute /unlock <Authkey> and the Bot will be unlocked. For Group Chats:
    • Execute /unlock <Authkey> as an Bot Admin or as an Channel Owner and the Bot will be unlocked.

To Lock the Bot execute /lock. In Group Chats only the Bot Admin and the Group Chat Owner can use it
To Show the Lockstatus execute /lockstatus. In Group Chats only the Bot Admin and the Group Chat Owner can use it

Aviable Commands

This Library includes four (4) Commands

Installation of the Commands

You can copy all four Commands into your custom Command folder or add the following path to your custom Command array inside of your hook.php to stay up to date with your Commandfiles

/vendor/hitmare/unlockptb/Commands/

eg:

$commands_path = [
__DIR__ . '/Commands/',
__DIR__ . '/vendor/hitmare/unlockptb/Commands/',
];

All versions of unlockptb with dependencies

PHP Build Version
Package Version
Requires php Version ^5.5|^7.0
longman/telegram-bot Version *
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package hitmare/unlockptb contains the following files

Loading the files please wait ....