пишу значит такой бота в телеге впервые и не хочу его загружать на хероку, а просто запустить в PyCharm'e запускаю значит я такой бота, а оно мне вот это: 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 Код 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
сам код бота: 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() Код 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()
pepeq_inactive2598844, Ты хоть ошибку пробовал гуглить ? Зачем сразу свой высер сюда кидать ? http://pogugli.com/?344912