Skip to content

m039/m039EchoBot

Repository files navigation

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.

The bot uses Nutgram and SQLite.

Installation

cd <project-directory>

# 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:

docker compose up -d

The docker image can be run in nginx environment. You only need to add the lines below to nginx.conf.

location /echo-bot {
    proxy_pass http://localhost:8081/;
}

About

No description or website provided.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published