Answer the question
In order to leave comments, you need to log in
What to do with such an error - "NameError: name 'telebot' is not defined"?
Hello! I ran into a rather trivial problem. I searched the Internet for solutions, but they did not help. I also reinstalled the telebot library. In general, here is a piece of code.
token = telebot.TeleBot('токен')
CHANNEL_ID = *********
admin_id = *******
bot_login = '******'
ref_percent = 5
QIWI_NUMBER = '********'
QIWI_TOKEN = '***********'
text_purchase = '❕ Вы выбрали: ' \
'{name}\n\n' \
'{info}\n\n' \
' Цена: {price} рублей\n' \
' Кол-во товара: {amount}' \
# инфа
info = '''❗️ Информация:\n'''
# Пополнение баланса
replenish_balance = '⚠️ Пополнение баланса\n\n' \
' Оплата киви: \n\n' \
' Номер {number}\n' \
' Коментарий {code}\n' \
' Сумма от 1 до 14999 рублей'
# Профиль
profile = ' Профиль\n\n' \
'❕ Ваш id - {id}\n' \
'❕ Ваш логин - {login}\n' \
'❕ Дата регистрации - {data}\n\n' \
' Ваш баланс - {balance} рублей'
Traceback (most recent call last):
File "C:\Users\HomePC\Desktop\Shop\settings.py", line 5, in
token = TeleBot("****") # bot token
NameError: name 'TeleBot' is not defined
Process returned 1 (0x1) execution time : 0.036 s
Press any key to continue . . .
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question