add "Stan is typing" notification, add telegram logging

This commit is contained in:
Rykov7
2022-12-22 07:52:24 +03:00
parent 681b833535
commit 64ee76e7f3
3 changed files with 21 additions and 7 deletions
+5 -2
View File
@@ -1,16 +1,19 @@
import os
import re
import logging
from telebot import TeleBot
from telebot import TeleBot, logger
from dotenv import load_dotenv
logging.basicConfig(level=logging.INFO, format='%(message)s')
logging.warning('>>> PYBOT STARTED!')
logger.setLevel(logging.INFO)
load_dotenv()
TOKEN = os.environ.get('LUTZPYBOT', 'Token not in ENVIRON')
bot = TeleBot(TOKEN, 'HTML', disable_web_page_preview=True, allow_sending_without_reply=True)
bot = TeleBot(TOKEN, 'HTML', disable_web_page_preview=True, allow_sending_without_reply=True,
num_threads=3, colorful_logs=True)
DATA = 'data/chat'