Skip to content

abdoulfataoh/telegram-transactional-chatbot

Repository files navigation

Telegram Transactionl Chatbot

In this project, we proposed a transactional telegram chatbot for exchanging money between mobile money operators and other digital currencies.

cover

Create a new telegram bot

  1. Fist, search @botfarther on telegram to create a bot.
  2. Request @botfather for the new bot access management token

Config

  1. Install poetry for virtual env management if it not already done
sudo apt-get update
sudo apt-get install poetry
  1. Install projet dependencies from projet root folder type
poetry installl
  1. Enable virtual env
poetry shell
  1. Export bot access token
export BOT_API_TOKEN='access management token'

Start the project

python3 start.py

Start the project with Docker

  1. skip steps 1, 2, 3 of config section
  2. launch project with docker-compose
docker-compose up

How to add a Message Handler

A handler is an update event: for example a new text incoming message, a new voice incoming message, etc. The list below enumerate some message handlers:

For the complete list see this link

  1. add a new function on this app/telegram/handlers.py module

that function must have one parameter to take an Application object. the code below is an example to add to add CommandHandler

# app/telegram/handlers.py

from telegram.ext import CommandHandler
from telegram.ext import Application


def new_command_handler(app: Application) -> None
    handler = CommandHandler(command='health', callback=callback)
    app.add_handler(handler)
    

About

A fintech telegram chatbot for mobile money management

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published