Answer the question
In order to leave comments, you need to log in
How to fix this error. gives error code 409 when run in console?
import telebot
import config
bot = telebot.TeleBot(config.TOKEN)
@bot.message_handler(commands=['start'])
def welcome(message):
sti = open('static/welcome.webp', 'rb')
bot.send_sticker(message.chat.id, sti)
bot.send_message(message.chat.id, "Добро пожаловать, {0.first_name}!\nЯ - <b>{1.first_name}</b>, бот созданный чтобы радовать тебя." .format(message.from_user, bot.get_me()),)
parse_mode='html'
@bot.message_handler(content_types=['text'])
def lalala(message):
bot.send_message(message.chat.id, message.text)
# RUN
bot.polling(none_stop=True)
Answer the question
In order to leave comments, you need to log in
You either launch a bot with a webhook, or you already have it spinning in some process and you launch the second instance, it turns out.
First try https://api.telegram.org/TOKEN/deleteWebhook
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question