curl -v -k -X POST -H "Content-Type: application/json" -H "Cache-Control: no-cache" -d '{
"update_id":10000,
"message":{
"date":1441645532,
"chat":{
"last_name":"Test Lastname",
"id":1111111,
"type": "private",
"first_name":"Test Firstname",
"username":"Testusername"
},
"message_id":1365,
"from":{
"last_name":"Test Lastname",
"id":1111111,
"first_name":"Test Firstname",
"username":"Testusername"
},
"text":"/start"
}
}' "https://YOUR.BOT.URL:YOURPORT/"
меняя на IP-адрес VDS все остается таким же
0.0.0.0
? Первым делом это проверьте WEBAPP_HOST = 'localhost' # or ip
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