Random Image posting link w/collections

I have read and understood the Cogboard Bounty rules

Bounty Request Format:

AgentExeider#4027

Random image posting cog or a “Meme Cog”.

I would like to have a cog that can post a random image from an online folder and post it in discord. The cog will kind of resemble how the custom cog functions kind of work but with a few caveats. Specifically, it needs to be able to pull a random image without needing the explicit file name. So for example it will pull an image from the web folder at: www.domain(.)com/imagesfolder as opposed to www.domain(.)com/imagesfolder/imagename.jpg

the web host it will be pulling from will be one that I own, so don’t worry that the cog will be used for leaching purposes. The reason I want it to work this way is simplicity on the cog’s part. My first attempt with this has the cog trying to keep track and manage collections and post the correct image from the correct category and not mix them up. IE. you invoke !cute and it posts an image from !serious category. Or you want to add new images and the cog doesn’t see them. Or worse you remove images and the cog keeps trying to use the old links. (In short, it was a mess.)

What I want is the cog to be able to pull randomly from an online folder, and the ability to make several copies of the same command mapped to different folders, and thus create different collections that I can manage from the web host. I can manage what images are available by managing them on my web host and that way takes the complexity away from the cog and less stress on the cog maker.

V3

If the cog maker who takes this on has any suggestions, I am open to hearing them. Feel free to be open with me as to any ideas that could make this cog a better one.

Thank you for your time.

So I probably wont take this bounty. But I think this needs a better explanation.

First you want a command that creates a command (like customcom does) that is pointed at a certain domain and category-folder like follows:

  • !custommeme create <command> <url>
  • !custommeme create cute https://www.domain.com/cute

and you probably wanna have a alias like cm for custommeme so that you could also say:

  • !cm create serious https://www.domain.com/serious

This eventually created the commands !cute and !serious. Once one of those command is called it will post a randomly image from it’s corresponding category. Do you also wanna make sure that it wont post the same image one after another?
You saying you also wanna add different folders to a existing command. I guess you could do that as follow:

  • !cm add cute https://www.domain.com/cute_cats

This will add another url to custom meme command. And to delete a certain url from the command by doing as follow:

  • !cm del cute https://www.domain.com/cute_cats

or something like that.
for deleting the custom meme command you probably wanna do it as follow:

  • !cm remove cute

Handling old images and updating new images can be done in multiple ways. You probably wanna check if image url is still valid (still response with status code 200) before posting. and updating a list of image url once every 5 min or on every command call.

Am I understanding you correctly?