Skip to content

Rails app that lets you interact with telegram users in behalf of a telegram bot.

Notifications You must be signed in to change notification settings

nin9/telegram-bot-app

Repository files navigation

Telegram Bot App

Setup

1- Copy .env.example to .env and add telegram bot token.

cp .env.example .env

2- Put the telegram bot token in the .env file.

3- Start the services.

docker-compose up

4- Create the databases.

docker-compose exec rails_app bundle exec rake db:create

5- Run the migrations.

docker-compose exec rails_app bundle exec rake db:migrate

6- Run the specs.

docker-compose exec rails_app bundle exec rspec

Documentation

This app is run using docker in 2 modes rails server and telegram:bot:poller using this gem (similar to sidekiq).

The TelegramWebhooksController acts as a listener for bot.getUpdates using polling, and message method is called each time a user sends a message to the bot.

Action cable is used to make messages appear in realtime.

About

Rails app that lets you interact with telegram users in behalf of a telegram bot.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published