diff --git a/.gitignore b/.gitignore index 5d381cc..34ce529 100644 --- a/.gitignore +++ b/.gitignore @@ -160,3 +160,5 @@ cython_debug/ # option (not recommended) you can uncomment the following to ignore the entire idea folder. #.idea/ +# Configuration file +config.ini diff --git a/main.py b/main.py new file mode 100644 index 0000000..86fc913 --- /dev/null +++ b/main.py @@ -0,0 +1,45 @@ +import telebot +import configparser + + +config = configparser.ConfigParser() +config.read() + +TG_TOKEN = config.get('telebot', 'token') +API_TOKEN = config.get('hotels_api', 'token') +DB_HOST = config.get('database', 'host') +DB_PORT = config.get('database', 'port') +DB_DATABASE = config.get('database', 'database') +DB_USER = config.get('database', 'user') +DB_PASSWORD = config.get('database', 'password') + + +bot = telebot.TeleBot(token=TG_TOKEN) + + +@bot.message_handler(commands=['start', 'help']) +def handle_start(message): + pass # TODO добавить логику обработки команд start и help + + +@bot.message_handler(commands=['low']) +def handle_low(message): + pass # TODO добавить логику обработки команды low + + +@bot.message_handler(commands=['high']) +def handle_high(message): + pass # TODO добавить логику обработки команды high + + +@bot.message_handler(commands=['custom']) +def handle_custom(message): + pass # TODO добавить логику обработки команды custom + + +@bot.message_handler(commands=['history']) +def handle_history(message): + pass # TODO добавить логику обработки команды history + + +bot.polling()