https://github.com/m039/m039echobot
https://github.com/m039/m039echobot
bot php telegram-bot
Last synced: 25 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/m039/m039echobot
- Owner: m039
- License: mit
- Created: 2024-02-10T18:23:38.000Z (over 2 years ago)
- Default Branch: master
- Last Pushed: 2024-02-20T23:18:42.000Z (over 2 years ago)
- Last Synced: 2025-02-27T06:50:53.772Z (over 1 year ago)
- Topics: bot, php, telegram-bot
- Language: PHP
- Homepage:
- Size: 30.3 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# m039EchoBot
## About
A very basic Telegram bot that sends back what you've send to it. The purpose of it is to learn how the webhook feature of the Telegram bot API works.
The address of the bot is [@m039EchoBot](https://t.me/m039EchoBot).
The bot uses [Nutgram](https://github.com/nutgram/nutgram) and SQLite.
## Installation
```bash
cd
# Install dependencies.
composer install
# Add configuration parameters.
echo "TOKEN=..." > .config.ini
echo "WEBHOOK_SECRET=..." >> .config.ini
echo "SQLITE_DATABASE=..." >> .config.ini # Absolute paths only
echo "LOGFILE=..." >> .config.ini # Absolute paths only. Can be omitted.
# Set the webhook url.
composer setup-webhook --set "..."
```
# Docker
At the beginning, you should prepare ```.config.ini```. Just take ```.config-template.ini```, fill the empty fields and put it into ```.config.ini```.
Use compose command to run the docker image:
```bash
docker compose up -d
```
The docker image can be run in nginx environment. You only need to add the lines below to ```nginx.conf```.
```nginx
location /echo-bot {
proxy_pass http://localhost:8081/;
}
```