Answer the question
In order to leave comments, you need to log in
Doesn't exit function and continue Python code?
New in the Telegram bot development environment and stuck in a simple place :)
The problem is that my code after the function is not executed.
Source:
groups = ['Группа','группа','Аудитория','аудитория']
hellos = ["Привет","привет","Здарова","Дарова","Ку","ку","Хай","Хелло","Хеллоу","дарова","Начать"]
@bot.message_handler(content_types=["text"])
def nachalo(message):
for element in hellos:
if message.text == element:
bot.send_message(message.from_user.id, "Привет студент, хорошо что лешил сюда заглянуть, я тебе помогу в твой студентческой жизни")
bot.send_message(message.from_user.id, "Я уверен что ты во мне не разочаруешься! :)")
return
pass;
@bot.message_handler(content_types=["text"])
def group(message):
for element in groups:
if message.text == element:
bot.send_message(message.from_user.id, "Выберите вашу группу")
bot.polling(none_stop = True)
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question