When enabling my code, the console doesnt return anything, thus not injecting my code into the bot. #1929
Replies: 1 comment 2 replies
-
Just start here. https://github.com/eternnoir/pyTelegramBotAPI/blob/master/examples/echo_bot.py |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Ive tried many tutorials, although none made a difference.
import telebot
bot_token = '6233021641:AAEJl1Bv6FqU4wfxb4p-BV9WQShdlTLPpbU'
bot = telebot.TeleBot(token=bot_token)
@bot.message_handler(content_types=['text'])
def get_text_messages(message):
if message.text == "Привет":
bot.send_message(message.from_user.id, "Привет.")
elif message.text == "/help":
bot.send_message(message.from_user.id, "Напиши Привет")
else:
bot.send_message(message.from_user.id, "Я тебя не понимаю. Напиши /help.")
im using a virtual environtment setting for this code.
thanks in advance.
Beta Was this translation helpful? Give feedback.
All reactions