def incodetype1(message):
code = message.text
conn = sqlite3.connect("users.db", check_same_thread=False)
cursor = conn.cursor()
cursor.execute('SELECT message FROM bdmes WHERE keyaccess = ?', [code])
for message in cursor.fetchall():
bot.send_message(message.chat.id, 'Сообщение: ' + str(message))
bot.send_message(message.chat.id, 'Сообщение: ' + str(message))
AttributeError: 'tuple' object has no attribute 'chat'