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
Requires
- ext-curl: *
- ext-json: *
- ext-pdo: *
- gabordemooij/redbean: dev-master
- mrmuminov/php-i18n: ^1.0
- telegram-bot/api: ^2.3
This package is auto-updated.
Last update: 2024-11-17 23:28:58 UTC
README
Get start
- Create a new repo using this template or clone this repo
- Install required packages via composer.
composer install
- Copy the
config/example.params.php
file and save it asconfig/params.php
config/params.php
is a configuration file- Configure the database data from
db->sqlite
- Configure the default language from
defaultLanguage
- Configure the default languages list from
languages
. To use multiple languages, I used themrmuminov/php-i18n
package - Type the telgram bot token in the
telegram->token
field. You need to get the token via @BotFather
- Configure the database data from
- To use the bot, configure webhook via
setWebhook
mthod.Docs
setWebhook doc
- Log in to Telegram and send the
/start
command. Finish
Requirements
- PHP version 7.0 or higher
- https://github.com/TelegramBot/Api for telegram bot methods. (
telegram-bot/api
) - https://github.com/gabordemooij/redbean for woking database (
gabordemooij/redbean
) - https://github.com/mrmuminov/php-i18n for internationalization (
mrmuminov/php-i18n
)