mrmuminov/telegram-bot

There is no license information available for the latest version (1.0) of this package.

PHP template for telegram bot

1.0 2021-12-16 20:30 UTC

This package is auto-updated.

Last update: 2024-11-17 23:28:58 UTC


README

Get start

  1. Create a new repo using this template or clone this repo
  2. Install required packages via composer. composer install
  3. Copy the config/example.params.php file and save it as config/params.php
  4. config/params.php is a configuration file
    1. Configure the database data from db->sqlite
    2. Configure the default language from defaultLanguage
    3. Configure the default languages list from languages. To use multiple languages, I used the mrmuminov/php-i18n package
    4. Type the telgram bot token in the telegram->token field. You need to get the token via @BotFather
  5. To use the bot, configure webhook via setWebhook mthod. Docs setWebhook doc
  6. Log in to Telegram and send the /start command. Finish

Requirements