Answer the question
In order to leave comments, you need to log in
Telegram bot in python does not work. What should be done?
Here is the code that I wrote (through the command line it does not give any errors):
import telebot
import config
import random
from telebot import types
bot = telebot.TeleBot(config.TOKEN)
@bot.message_handler(commands=['start'])
def welcome(message):
bot.send_message(message.chat.id, "ТЕКСТ")
bot.polling(none_stop=True)
Answer the question
In order to leave comments, you need to log in
1) Show what pip freeze gives you
2) Do you have a strange tab for the welcome function, do you have indents in your code?
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question