Skip to content

pretzelhands/basic-telegram-bot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

4 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸ€– Telegram Base Bot in PHP

This bot demonstrates how to implement a basic Telegram chat bot in PHP, as described in this article.

πŸ“¦ Requirements

To fully take advantage of this repository, the following dependencies should be met

πŸ‘©β€πŸ’» Getting started

To get started, adjust composer.json and add a --subdomain=<YOUR_SUBDOMAIN> option to the dev script.

Second, update the WEBHOOK_URL variable in .env to correspond to <YOUR_SUBDOMAIN>.sharedwithexpose.com.

Once that is settled, please gather a Telegram token from @Botfather on Telegram and add it to the provided .env file. Then, your own Telegram chat ID using @RawDataBot and insert it as well.

Finally, run the following things:

$ composer install
$ php setup.php
$ composer run dev

After running these commands you should have received a message from your bot stating that your webhook has been set up correctly. You can now begin adding commands to your bot!

πŸ₯¨ Learn more

If you'd like to see more repositories and tutorials like this, consider following me on Twitter or subscribing to my newsletter.

Releases

No releases published

Packages

No packages published

Languages