Browse Source

New structure

foreverpositive 2 years ago
parent
commit
52d744fb1d
4 changed files with 3 additions and 3 deletions
  1. 1 1
      README.md
  2. 2 2
      bot.py
  3. 0 0
      src/instruction.jpg
  4. 0 0
      src/phrases.csv

+ 1 - 1
README.md

@@ -14,7 +14,7 @@ To activate the bot, please do this:
 python -m venv venv
 . venv/bin/activate
 pip install -r requirements.txt
-python main.py
+python bot.py
 ```
 
 Licensed under GNU General Public License v3.0.

+ 2 - 2
main.py → bot.py

@@ -15,7 +15,7 @@ bot = telebot.TeleBot(TOKEN, parse_mode=None)
 LANG = "English"
 
 phrases = {}
-with open('phrases.csv', 'r', encoding='utf-8') as phrases_file:
+with open('src/phrases.csv', 'r', encoding='utf-8') as phrases_file:
     reader = csv.reader(phrases_file)
     for row in reader:
         phrases[row[0]] = {'English': row[1], 'Русский': row[2]}
@@ -72,7 +72,7 @@ def send_instructions(message, language=LANG):
     chat_id = message.chat.id
     user_id = message.from_user.id
 
-    with open('instruction.jpg', 'rb') as instr_pic_file:
+    with open('src/instruction.jpg', 'rb') as instr_pic_file:
         instruction_pic = instr_pic_file.read()
 
     bot.send_photo(chat_id, instruction_pic)

+ 0 - 0
instruction.jpg → src/instruction.jpg


+ 0 - 0
phrases.csv → src/phrases.csv