TheDiscordian / onebot

One bot to rule them all...
BSD 3-Clause "New" or "Revised" License
14 stars 1 forks source link

Extend IPFS plugin to support uploading image to web3.storage from embedded image #28

Open TheDiscordian opened 1 year ago

TheDiscordian commented 1 year ago

Extend the IPFS plugin (https://github.com/TheDiscordian/onebot/blob/master/plugins/ipfs.go) to support uploading an image which was embedded in the message (#27). We could reuse the web3-store command and change it from web3-store <cid> to web3-store [cid]. If not CID is supplied, we'll check the message object for images, if there are some, we can upload them to web3.storage (ideal solution is all at once in a directory). If there are no images, we can display the help text like we do now.