K
K
kdyatlov992021-10-05 23:26:10
Bots
kdyatlov99, 2021-10-05 23:26:10

Telebot doesn't work in Python?

I made a Telegram bot in python, the pyTelegramBotAPI module is installed, there is no telebot, but an error is displayed:

Traceback (most recent call last):
File "C:/Users/User/progt/main.py", line 1, in
import telebot
ModuleNotFoundError: No module named 'telebot'

Code:

import telebot

from telebot import types

bot = telebot.Telebot("1926292672:AAFQJkrPzjgyOGDnkO2MRSjk1VZiZ7OuRCw")

@bot.message_handler(content_types = ['text'])
def lala(message):
if message.chat.type == 'private':
if message.text == "/start":
bot.send_message(message.from_user.id, "Welcome. My name is Reir and I'm a bot,designed to be a guinea pig.")

if __name__ == '__main__':
bot.polling(none_Stop=True)

Answer the question

In order to leave comments, you need to log in

1 answer(s)
I
InternetMaster, 2021-10-07
@InternetMaster

You may be using a Python version lower than 3.6.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question