-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Description
Please answer these questions before submitting your issue. Thanks!
-
What version of pyTelegramBotAPI are you using? 4.14.0
-
What OS are you using? Windows
-
What version of python are you using? 3.11.4
hi there, i have this code in my main.py :
from telebot import TeleBot
bot = TeleBot(token="my_bot_token", parse_mode="MARKDOWN")
if name == 'main':
bot.infinity_polling()
and i have this code in my start.py :
from main import bot
@bot.message_handler(commands=['start'])
def start(message):
bot.reply_to(message, "Hi, how are you doing?")
for some reason when i run main.py and send /start command to the bot it dosen't response but when i put the main.py and start.py in the same file it works fine
can you explain to me why is this hapening and what is the silultion because i want them seperated