Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if ll == 2:
- with open(picture_path, encoding="utf8") as file:
- pictures = file.read().splitlines()
- rndpic = random.choice(pictures)
- p = requests.get(rndpic)
- out = open(random_filename, "wb")
- out.write(p.content)
- out.close()
- rndpic = random.choice(pictures)
- photo1 = Image.open("10.jpg")
- user_img = Image.open(random_filename).convert("RGBA").resize((175, 108))
- photo1.paste(user_img, (118, 10))
- photo1.save(dem_filename)
- photo2 = Image.open("10.jpg")
- user_img2 = Image.open(random_filename).convert("RGBA").resize((175, 108))
- photo2.paste(user_img2, (118, 122))
- photo2.save(dem_filename)
- photo = await photo_uploader.upload_message_photo(dem_filename)
- await message(attachment=photo)
- os.remove(dem_filename)
- os.remove(random_filename)
- dialogs[message.peer_id] = time.time() + 15
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement