Skip to content

This Telegram bot is designed to maintain financial accounting for a given period. It can be used to calculate a daily budget, which also varies depending on expenses and income. The bot allows you to record all transactions during a given period and also receive them for user analysis.

Notifications You must be signed in to change notification settings

ivangavrilov-viii/financier_bot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

@Manual_Financier_Bot

Created by Ivan Gavrilov


Task Description:

This Telegram bot is designed to maintain financial accounting for a given period. It can be used to calculate a daily budget, which also varies depending on expenses and income. The bot allows you to record all transactions during a given period and also receive them for user analysis.


Requirements

Python version 3.8 or higher and the following modules are required for the bot to work correctly:

certifi==2023.7.22
charset-normalizer==3.3.0
colorama==0.4.6
idna==3.4
loguru==0.7.2
pyTelegramBotAPI==4.14.0
python-decouple==3.6
requests==2.31.0
telebot==0.0.5
urllib3==2.0.7
win32-setctime==1.1.0

Bot's file composition

The bot uses polling technology, so no additional server configuration is required.
The following files are used in the bot:

  • main.py - main file for bot's work
  • messages.py - file containing functions for outputting various bot messages
  • keyboards.py - file with functions for creating keyboards for working with the bot
  • db_funcs.py - file containing functions for CRUD concept of working with SQLite3 database
  • .env - file containing the token for connecting the bot to Telegram servers and link for payment. This file should be created manually and the token obtained with @BotFather should be added to it.
  • requirements.txt - list of required modules and dependencies
  • utils.py - file containing different utils for work
  • budgets.json - formatted example model of budget

Preparing for start bot

For the bot to function, you first need to register the bot in Telegram using @BotFather.
The received tokens should be located in the ".env" file:

  • key_bot = 'token received from @BotFather in Telegram'
  • admin_1 = 'chat id in TG for first admin'
  • db_name = 'db name file'

Start bot

  1. Virtual environment creation:
python -m venv venv  
  1. Virtual environment activation on Windows:
source venv/bin/activate
  1. Installing requirements:
pip install -r requirements.txt    
  1. Starting bot:
python main.py  

After the start, the bot will start working in Telegram under the name Manual_Financier_Bot


Bot's command list:

  • /help - Help with bot commands
  • /balance - View the status of your account
  • /period_history - List of expenses in the current period
  • /add_expense - Add expense in today
  • /add_profit - Add profit in today
  • /update_budget - Calculate and update the daily budget
  • /set_budget - Set the budget for the selected period and start the bot's work
  • /clean_history - Delete user history

For administrators:

  • in development...

If you have any questions about the bot you can write to me @gavril_23


About

This Telegram bot is designed to maintain financial accounting for a given period. It can be used to calculate a daily budget, which also varies depending on expenses and income. The bot allows you to record all transactions during a given period and also receive them for user analysis.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages