2022-08-03 11:02:53 connection.py:_recv_loop:330 INFO The server closed the connection
2022-08-03 11:02:53 mtprotosender.py:_recv_loop:505 INFO Connection closed while receiving data
2022-08-03 11:02:53 mtprotosender.py:_reconnect:345 INFO Closing current connection to begin reconnect...
2022-08-03 11:02:53 mtprotosender.py:_connect:221 INFO Connecting to 149.154.167.51:443/TcpFull...
2022-08-03 11:02:54 mtprotosender.py:_connect:272 INFO Connecting to 149.154.167.51:443/TcpFull complete!
1) Человек подписывается на канал
async def get_keyboard_data():
c.execute("""SELECT * FROM table_name""")
items = c.fetchone()
return items
...
# внутри хендлера
kb = types.ReplyKeyboardMarkup(resize_keyboard=True)
kb_data = await get_keyboard_data()
kb.add(
types.KeyboardButton(f'{kb_data}')
)
if message.chat.photo ... message.chat.photo.big_file_id
А профиль не работает потому что elif у вас идёт после else, а оно так не работает. Это азы языка