GithubHelp home page GithubHelp logo

korsan-jaime-bot's Introduction

korsan-jaime-bot

This telegram bot's purpose is to keep track of payments and debts among 3 housemates.

Usage

Follow the procedures to install the bot, then type /help.

Requirements

pip3 install -r requirements.txt

Additional Files

There must be two additional files in the same folder with kjbot.py:

balance.txt and config.py

Structure of balance.txt

Just one line will suffice:

0,0,0,

The bot will change the numbers to what they must be as payments take place.

Structure of config.py

chat_id = 123456789

user1_id = "123456789"
user2_id = "123456788"
user3_id = "123456787"

user1_name = "furkan"
user2_name = "albert"
user3_name = "nikola"

# '/paid 100 fa' works the same as '/paid 100 furkan'
user1_nicknames = ['furkan', 'aldemir', 'fa', 'f']
user2_nicknames = ['albert', 'einstein', 'ae', 'e']
user3_nicknames = ['nikola', 'tesla', 'nt', 'n', 't']

token = "OBTAINED_FROM_BOTFATHER"

SECRET = 'TOTALLY_MADE_UP_FOR_FLASK_WEBHOOKS'

URL = 'WHEREVER_THE_BOT_IS_HOSTED'

Obtaining user_id

userinfobot

Obtaining chat_id of the group

Add this bot to your group: Chat ID Echo

Obtaining token

BotFather

Running the bot

From the console: python3 main.py

As a docker compose service: docker compose up -d

korsan-jaime-bot's People

Contributors

dependabot[bot] avatar furkan avatar

Stargazers

 avatar

Watchers

 avatar

korsan-jaime-bot's Issues

Docker

Dockerize the project

Database management

Instead of using a single txt file, this project could use a real database. It's not a must, though, so no rush.

Migrate to FastAPI

Flask was perfect for this project, but let's do the rewrite with FastAPI.

CI/CD

Create GitHub Actions/workflows for automatic lint/type checking and code testing.

Instructions

There should be better instructions for both developers and users.

Bare exceptions

Figure out the specific exception types and stop using bare exceptions where applicable.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.