1
I’m trying to create a bot for Twitter/Facebook/Discord that reads a pair of files randomly in a certain folder to post on networks.
Basically in the folder there will be several JPG or PNG images, and for each image there will be a JSON with the same name (and obviously different extension) that will contain some features for posting. Then the script will choose an image randomly, consume the JSON that makes pair with it and so will be posted the image on social networks.
How this function could be done?
An idea to start is to make a vector with the names of the JPG/PNG files programmatically, and then make a function to generate an Rand from 0 to n -1 and then catch the . json of vector image[random]
– IWHKYB
@IWHKYB Good idea, but how could I do it?
– Vico
Was any of the answer helpful? Don’t forget to choose one and mark it so it can be used if someone has a similar question!
– Sorack