Чтобы config_python импортировался из PWD

This commit is contained in:
lulzette 2022-12-15 19:42:38 +03:00
parent 2aaf0e43eb
commit 4deb7dd49b

15
main.py Normal file → Executable file
View File

@ -1,12 +1,15 @@
#!/usr/bin/python3
import time
import config_python
from twitchAPI.twitch import Twitch
import logging
from logging.handlers import TimedRotatingFileHandler
from termcolor import colored
import os
import sys
import logging
sys.path.append(os.path.abspath(os.path.curdir))
import config_python
from twitchAPI.twitch import Twitch
from logging.handlers import TimedRotatingFileHandler
from termcolor import colored
import telebot
from telebot.types import InputFile
from telebot import types
@ -81,7 +84,7 @@ def stream_message_worker(data: dict):
# Редактируем фотку
edit_msg_media = bot.edit_message_media(media, config_python.tgchat, msgid, reply_markup=keyboard)
# Редактируем текст
edit_msg_caption = bot.edit_message_caption(message,config_python.tgchat,msgid,reply_markup=keyboard,
edit_msg_caption = bot.edit_message_caption(message, config_python.tgchat, msgid, reply_markup=keyboard,
parse_mode='MarkdownV2')
except telebot.apihelper.ApiTelegramException as e:
log.error(e)