๐Ÿ“ฆ furkan / korsan-jaime-bot

Telegram Bot for debt tracking in the house

โ˜… 1 stars โ‘‚ 0 forks ๐Ÿ‘ 1 watching
๐Ÿ“ฅ Clone https://github.com/furkan/korsan-jaime-bot.git
HTTPS git clone https://github.com/furkan/korsan-jaime-bot.git
SSH git clone git@github.com:furkan/korsan-jaime-bot.git
CLI gh repo clone furkan/korsan-jaime-bot
dependabot[bot] dependabot[bot] Bump flask from 2.1.3 to 2.3.2 (#17) 90868f6 2 years ago ๐Ÿ“ History
๐Ÿ“‚ master View all commits โ†’
๐Ÿ“ .github
๐Ÿ“„ .flaskenv
๐Ÿ“„ .gitignore
๐Ÿ“„ docker-compose.yml
๐Ÿ“„ Dockerfile
๐Ÿ“„ kjbot.py
๐Ÿ“„ main.py
๐Ÿ“„ pyproject.toml
๐Ÿ“„ README.md
๐Ÿ“„ replies.py
๐Ÿ“„ requirements.txt
๐Ÿ“„ README.md

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