This commit is contained in:
cdle
2021-10-23 14:11:40 +08:00
parent 4a4923bc58
commit a4f175d016
+5 -2
View File
@@ -291,8 +291,11 @@ func (sender *Sender) Reply(msgs ...interface{}) (int, error) {
is := []tb.InputMedia{}
for index, path := range paths {
if strings.Contains(path, "base64") {
sender.Reply(path[0:30])
decodeBytes, _ := base64.StdEncoding.DecodeString(path)
decodeBytes, err := base64.StdEncoding.DecodeString(path)
if err != nil {
sender.Reply(err)
}
i := &tb.Photo{File: tb.FromReader(bytes.NewReader(decodeBytes))}
if index == 0 {
i.Caption = message