Many of you may already know that I am trying to make a command in @wasteof_bot to post graphs.
Recently I realized that to update the graphs, I need to delete the previous ones(if I don’t, imgbb might get mad since I am doing this for free), then upload new images.
The problem is that when I upload new ones, they get different links. So all the posts containing the previous images that are deleted will not be having the image anymore.
How do I fix this? I am using imgbb API since wasteof only supports 2 external hosts and cubeupload doesn’t have a public API.
I thought of replacing images but that isn’t available in the API docs. I’m stuck now
When you get the URL for your image, edit the post and replace the old URL with a new one. You can probably do this with a simple Regexp.
This isnt an ideal solution. The command isn’t out so you didn’t consider this:
The graph command is probably going to be @wasteof_bot graph
When people use this, it will post their graph in a reply. I can’t possibly edit each and every reply to update its url every week! So… this won’t work.
Thanks for trying though!
I mean that the bot is going to comment the same URL in 100000 places. I can’t go and edit all of those posts