skip to Main Content

python telegram bot "context.bot.send_message" – Telegram API

I am using "python-telegram-bot" library and have been looking at various examples over the internet. I have noticed there are two ways to reply in a conversation: the first: ''' context.bot.send_message(chat_id=update.effective_chat.id, text=msg)''' the second: '''update.message.reply_text(text=msg)''' practically they both work. Should…

VIEW QUESTION

sendDocument via Telegram bot – Telegram API

sendDocument requires multipart/form-data. $path = 'C:file.txt' $userId = 12345 $token = "ABC123" $url = "https://api.telegram.org/-/sendDocument?chat_id=+" [net.servicepointmanager]::securityprotocol = 'ssl3,tls,tls11,tls12' $url = $url.Replace("-",$token).Replace("+",$userId) $Response = Iwr -Uri $url -Method Post -InFile $path -ContentType "multipart/form-data" $Response.Content But i got Error:400. How to properly…

VIEW QUESTION
Back To Top
Search