GithubHelp home page GithubHelp logo

poolitclub / laravel-telegram-bot Goto Github PK

View Code? Open in Web Editor NEW

This project forked from uziins/laravel-telegram-bot

0.0 0.0 0.0 7.97 MB

Laravel package for PHP Telegram Bot Library

License: Other

PHP 100.00%

laravel-telegram-bot's Introduction

Laravel Telegram Bot

Latest Version on Packagist Total Downloads

Installation

Install this package through Composer. Run this command in your project's terminal:

composer require uziins/laravel-telegram-bot

Usage

For further basic configuration of this Laravel package you do not need to create any configuration files.

Database migration

php artisan migrate

Publish config file

php artisan vendor:publish --tag="telegram-config"

Publish routes file

php artisan vendor:publish --tag="telegram-routes"

Artisan terminal commands for the Webhook usage (remember, that you need an HTTPS server for it):

# Use this method to specify a url and receive incoming updates via an outgoing webhook
php artisan telegram:set-webhook
# List of available options: 
# --d|drop-pending-updates : Drop all pending updates
# --a|all-update-types : Explicitly allow all updates (including "chat_member")
# --allowed-updates= : Define allowed updates (comma-seperated)

# Use this method to remove webhook integration if you decide to switch back to getUpdates
php artisan telegram:delete-webhook
# List of available options:
# --d|drop-pending-updates : Pass to drop all pending updates

Artisan terminal commands for the Telegram getUpdates method:

# Fetches Telegram updates periodically
php artisan telegram:fetch 
# List of available options:
# --a|all-update-types : Explicitly allow all updates (including "chat_member")
# --allowed-updates= : Define allowed updates (comma-seperated)

Artisan terminal command for Telegram Server logging out:

# Sends a logout to the currently registered Telegram Server
php artisan telegram:logout

Artisan terminal command for closing Telegram Server:

# Sends a close to the currently registered Telegram Server
php artisan telegram:close

Artisan terminal command for publishing Telegram command folder structure in your project:

# Publishes folder structure for Telegram Commands
# Default StartCommand class will be created
php artisan telegram:publish

Artisan terminal command for creating new Telegram command class in your project:

# Create a new Telegram Bot Command class
# e.g. php artisan make:telegram-command Menu --> will make User command class MenuCommand 
# e.g. php artisan make:telegram-command Genericmessage --system --> will make System command class GenericmessageCommand
php artisan make:telegram-command
# List of available options:
# name : Name of the Telegram Command
# --a|admin : Generate a AdminCommand
# --s|system : Generate a SystemCommand
# Without admin or system option default User command will be created

Credits

License

Please see the license file for more information.

laravel-telegram-bot's People

Contributors

igormonkey avatar tiifuchs avatar uziins avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.