Random GIF

Hello I saw a post asking for random arrays for GIF’s and I did see that illusionaryOne did reply showing how todo this.

Is there a way to almost set categories? or add extra folders?

For instance !funny the “funny” folder might have 30 gifs of people lauhging or whatever and another folder called “fails” that would pop up a random gif with !fail

Is this possible?

So I figured this out I had a really huge brain fart. Illusionary already touched base on this but Im just going to rewrite it for other thickheads like me.

1.)If you want random gifs you need to make a folder in your addons folder call this whatever you want!
for the sake of this Im going to call it GIFS.

2.) Create a new text Doc in that GIFS folder and name it random.txt

3.) inside phantombot/config/gif-alerts folder place all the gifs you want to use for instance “funny.gif”,
“funny2.gif”, “funny3.gif”

4.) inside random.txt. on each line write your gifs like this each on a new line. I assume you can also add the text and everything to the commands here and customs css/ times etc at the end of the .gif
(alert funny.gif)
(alert funny2.gif)
(alert funny3.gif)

5.) in your stream or console or wherever you make your new commands type “!addcom !gifs
(readfilerand ./GIFS/random.txt)”

This will pick a random line from that text file! (you can do this will all sorts of things it seems!)

Hope this helps anyone in the future!! Big fan oh Phantom Bot so far and hope this helps someone

I will be using this with categories… So I will have a funny.txt with scare.txt, poggers.txt, rekt.txt with corresponding gifs!

GLHF everyone!

Very nice idea, thanks for sharing this. :+1:

1 Like