TheDiscordian / onebot

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

Extend Message interface to allow embedded images to be extracted #27

Open TheDiscordian opened 1 year ago

TheDiscordian commented 1 year ago

Extend the Message interface (https://github.com/TheDiscordian/onebot/blob/master/onelib/onetype.go#L284) with an Images() []Image method. Image should be an interface that has methods for retrieving data, could be anything but for example:


type Image interface {
    Data() []byte // can only be empty if URL() isn't empty
    URL() string  // can be empty
}
tippi-fifestarr commented 1 year ago

great idea Boris!