mardi 29 juin 2021

Randomly change logo background every time in PIL [closed]

I have written code to make a logo in my Telegram bot.

I want to add a random background when anybody makes a logo. Basically, work like this bot: https://t.me/Yone_Robot (command /logo <text>). But my code is not working. It changes the background every time I redeploy the bot.

My code:

import random

Listimg = ["img1", "img2"]
Randimg = random.choice(Listimg)
D = f".SheebaQueen/img/{Randimg}.jpg"

The bot is written in Python.




Aucun commentaire:

Enregistrer un commentaire