Answer the question
In order to leave comments, you need to log in
The bot does not send a message to telegram, there are no errors in the code, why does it not work?
import telebot
token = "токен"
bot = telebot.TeleBot(token)
bot.send_message(ид,'mq')
print('mqmqmqmq')
certifi 2021.10.8
charset-normalizer 2.0.6
idna 3.2
pip 21.2.4
pyTelegramBotAPI 4.1.1
requests 2.26.0
setuptools 57.4.0
telebot 0.0.4
urllib3 1.26.7
Answer the question
In order to leave comments, you need to log in
Delete the extra telebot
pip uninstall telebot
And fix the token. Polling is useless
import telebot
from telebot import types
token = "ваш токен"
bot = telebot.TeleBot(token)
@bot.message_handler(content_types=['text'])
def test(message):
bot.send_message(message.chat.id, 'mq')
print('mqmqmqmq')
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question