Closed alx168 closed 6 years ago
ok so I have this so far:
bot.uploadFile({ to: channelID, file: "file.gif" });
but I'm not sure about the random selection part
So, basically just use fs package from npm and then grab the filenames from the directory. Then just use Math.random to choose three random ones and use the above code to send the three pics.
I have the bot sending messages on my server properly but how do I tell the bot to look in a directory and choose some random pictures and send those to the server?