소스 검색

New structure

foreverpositive 2 년 전
부모
커밋
52d744fb1d
4개의 변경된 파일3개의 추가작업 그리고 3개의 파일을 삭제
  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