Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

python telegram bot send image

If you have local image path:

bot.send_photo(chat_id, photo=open('path', 'rb'))
If you have url of image from internet:

bot.send_photo(chat_id, 'your URl')
Comment

reply_photo bot telegram python

# al usar un bot mediante telegram.ext, creamos un metodo que reciba el Update
# para poder responderle con una foto
def echo(update:Update, context:CallbackContext):
	update.message.reply_photo(photo=open('ruta_foto', 'rb'))
Comment

PREVIOUS NEXT
Code Example
Python :: db connection string timeout 
Python :: session in django 
Python :: condition python 
Python :: import matplotlib pyplot as plt 
Python :: python how to convert a list of floats to a list of strings 
Python :: nth root of a number python 
Python :: python string starts with any char of list 
Python :: numpy randomly swap lines 
Python :: pygame scroll event 
Python :: django queryset multiple filters 
Python :: python write into a file 
Python :: histogram for categorical data with plotly 
Python :: difference between set and list in python 
Python :: torch.from_numpy 
Python :: create tuples python 
Python :: pandas compare two columns of different dataframe 
Python :: how to set global variable in python function 
Python :: try for loop python 
Python :: python program to find sum of natural numbers using recursion 
Python :: python regex match until first occurrence 
Python :: python type annotations list of possible values 
Python :: python line number 
Python :: get type name python 
Python :: tkinter change button color smoothly 
Python :: roc auc score 
Python :: convert number to reversed array of digits python 
Python :: ord python3 
Python :: No installed app with label 
Python :: django content type for model 
Python :: python flatten one liner 
ADD CONTENT
Topic
Content
Source link
Name
4+2 =