A non-modular, low-perf, no-ML, if-else telegram bot built with Flight PHP.
- Make sure you have
PHP = v7.3.x
andcomposer
installed in your system. - Create a Telegram bot with the help of Botfather and then
start
the bot. - Know your own Telegram ID with the help of a bot like this one.
- Fork this repository.
- Clone it into your local machine.
git clone https://github.com/<YOUR_USERNAME>/amritarepo-bot.git
- Get into the
amritarepo-bot
directory. - Copy
.env.example
and paste it as.env
and fill in necessary credentials. - Run a
composer install
to fetch all dependencies. - Run
composer start
to start the web server. - Use an API testing tool like Postman and send a POST request to
http://localhost:2304/<YOUR_BOT_TOKEN>
with the sample body
{
"message" : {
"text" : "/start",
"from" : {
"id" : "<YOUR_TELEGRAM_ID>",
"first_name" : "<YOUR_FIRST_NAME>",
"username" : "<YOUR_TELEGRAM_USERNAME>"
}
}
}
- If you get an error like
Chat not found
, it usually means that you have not started the bot from your personal Telegram account. Go to the bot and START it. - Tadaa! You'll get the response to your Telegram chat ^_^
- Make your awesome changes, push your changes into a new branch.
- Send in a pull-request :)
- If you run this on your system, question papers module won't work unless you're in Amrita LAN. As a workaround, you can use SonicWall NetExtender (Make sure you choose
NetExtender
in the dropdown before downloading) and create a connection using the below details :
Connection Name : Amrita
Server : 117.240.224.2:4433
Username/Password : Your CMS/Amrita WiFi credentials
Read the license here
Thanks goes to these wonderful people (emoji key):
Rajkumar S 💻 📖 |
Sanjana G 💻 |
Arun Vigesh V G 💻 |
This project follows the all-contributors specification. Contributions of any kind welcome!