quantum-codes — 9/1/2022, 1:25:04 PM

Problem with graph images

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

♥ 2 ↩ 1 💬 8 comments

comments

lily:

edit the post to use a different src="" url

9/1/2022, 3:15:10 PM
quantum-codes:

https://beta.wasteof.money/posts/6310b2b0fe80db9e6e81b0c4/comments/6310b7d9fe80db9e6e81b0cc

9/1/2022, 3:20:51 PM
grippins:

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.

9/1/2022, 1:42:45 PM
quantum-codes:

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!

9/1/2022, 1:47:05 PM
grippins:

make 1 image for

9/1/2022, 2:23:52 PM
grippins:

each individual

9/1/2022, 2:24:00 PM
quantum-codes:

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

9/1/2022, 2:29:56 PM
grippins:

???

9/1/2022, 2:32:34 PM