send morj as photo

This commit is contained in:
bakatrouble 2019-09-06 16:22:32 +03:00
parent 5fb5c36369
commit f832148537

View File

@ -239,7 +239,7 @@ def morj(bot: Bot, update: Update):
text = update.effective_message.text[6:] text = update.effective_message.text[6:]
fname = '/tmp/morj{}.png'.format(uuid4()) fname = '/tmp/morj{}.png'.format(uuid4())
draw_morj(text, fname) draw_morj(text, fname)
update.effective_message.reply_document(open(fname, 'rb')) update.effective_message.reply_photo(open(fname, 'rb'))
os.unlink(fname) os.unlink(fname)