update => message => reply_to_message => text / message_id
идет запрос на вебхук, приходит 500, он делает ретрай этого запроса до тех пор, пока не придет 200?
Если я прав, то можно ли как то отключить это? Если допустим ошибка, то не делать ретрай
$sendToTelegram
$sendToTelegram_chat2 = fopen("https://api.telegram.org/bot{$token}/sendMessage?chat_id={$chat_id_2}&parse_mode=html&text={$lastChars}","r");
if ($sendToTelegram && $sendToTelegram_chat2)
если не существует в базе > добавить
обновляете базу.if user_id in blocklist_db:
return
from_user
->id
All types are defined in types.py. They are all completely in line with the Telegram API's definition of the types, except for the Message's from field, which is renamed to from_user (because from is a Python reserved token).
Как сделать, чтобы он реагировал на присоединения нового пользователя
как можно заставить бота обрабатывать любое сообщение в чате
- /setprivacy
- 'Enable' - your bot will only receive messages that either start with the '/' symbol or mention the bot by username.
'Disable' - your bot will receive all messages that people send to groups.
Current status is: DISABLED
>>> msg = '/cmd ping pong argumenty'
>>> args = msg.split(' ') ## переводим в массив
>>> args
['/cmd', 'ping', 'pong', 'argumenty']
>>> del args[0] ## убираем первый элемент
>>> args = ' '.join(args) ## соединяем обратно
>>> args
'ping pong argumenty'
Где можно посмотреть, в какое количество групп добавлен бот?
как деактивировать бота во всех группах, чтобы он остался только в одной?