Загрузка...

What could be the problem

Thread in Python created by pepeq_inactive2598844 Oct 12, 2019. 118 views

  1. pepeq_inactive2598844
    pepeq_inactive2598844 Topic starter Oct 12, 2019 Banned 16 Aug 31, 2019
    пишу значит такой бота в телеге впервые и не хочу его загружать на хероку, а просто запустить в PyCharm'e
    запускаю значит я такой бота, а оно мне вот это:
    [IMG]
    Code

    C:\Users\pepeq\AppData\Local\Programs\Python\Python37-32\python.exe "C:/Users/pepeq/Documents/python/ pasterson/telebot.py"
    Traceback (most recent call last):
    File "C:/Users/pepeq/Documents/python/ pasterson/telebot.py", line 1, in <module>
    import telebot
    File "C:\Users\pepeq\Documents\python\ pasterson\telebot.py", line 3, in <module>
    bot = telebot.TeleBot('776550937:AAELEr0c3H6dM-9QnlDD-0Q0Fcd65pPyAiM')
    AttributeError: module 'telebot' has no attribute 'TeleBot'

    Process finished with exit code 1
     
  2. pepeq_inactive2598844
    pepeq_inactive2598844 Topic starter Oct 12, 2019 Banned 16 Aug 31, 2019
    сам код бота:
    Code

    import telebot

    bot = telebot.TeleBot('956822116:AAHg1JOCC1VQC47-dVasZXC0WoBJjAwjD8g')

    @bot.message_hadler(commands=['start'])
    def start_message(message):
    bot.send_message(message.chat.id, 'Hello, niga, im pepega kun')

    @bot.message_hadler(content_types=['text'])
    def send_text(message):
    if message.text == 'u gay':
    bot.send_message(message.chat.id, 'hi, gay')
    elif message.text == 'bye':
    bot.send_message(message.chat.id, 'bye, gay')
    elif message.text == 'gay love':
    bot.send_sticker('')


    bot.polling()
     
  3. Help
    Help Oct 12, 2019 469 May 12, 2017
Loading...
Top