Что не так ?
@bot.message_handler(commands=['start'])
def start(message):
sql = sqlite3.connect('C:\\Program1\\bot.telegram\\bazdan.db3')
c = sql.cursor()
c.execute("""CREATE TABLE IF NOT EXISTS user (id INTEGER, name TEXT, race, inventory)""")
sql.commit()
sql.close
@bot.message_handler(content_types=['text'])
def history_now(message):
if message.chat.type == 'private':
user_id=[message.chat.id]
c.execute(f"SELECT race FROM user WHERE id == ?",(user_id))
data=c.fetchone()
if data is not None:
name=message.text
c.execute(f"UPDATE user SET name =? WHERE id=?", (name, user_id))
sql.commit()
sql.close
confirm_name=(f'Имя {name} записано')
bot.send_message(message.chat.id, confirm_name, parse_mode='html')
вот сама ошибка
c.execute(f"UPDATE user SET name =? WHERE id=?", (name, user_id))
sqlite3.InterfaceError: Error binding parameter 1 - probably unsupported type.