@@ -132,7 +132,7 @@ func init() {
132132 }
133133 game := newWordleGame (target )
134134 _ , img , _ := game ("" )
135- _ , err = ctx .SendImage ( "base64://" + nano . BytesToString ( img ) , true , "你有" , class + 1 , "次机会猜出单词,单词长度为" , class , ",请发送单词" )
135+ _ , err = ctx .SendImageBytes ( img , true , "你有" , class + 1 , "次机会猜出单词,单词长度为" , class , ",请发送单词" )
136136 if err != nil {
137137 _ , _ = ctx .SendPlainMessage (false , "ERROR: " , err )
138138 return
@@ -172,7 +172,7 @@ func init() {
172172 case win :
173173 tick .Stop ()
174174 after .Stop ()
175- _ , err := ctx .SendImage ( "base64://" + nano . BytesToString ( img ) , true , "太棒了,你猜出来了!答案是: " , target , "(" , tt , ")" )
175+ _ , err := ctx .SendImageBytes ( img , true , "太棒了,你猜出来了!答案是: " , target , "(" , tt , ")" )
176176 if err != nil {
177177 _ , _ = ctx .SendPlainMessage (false , "ERROR: " , err )
178178 }
@@ -198,7 +198,7 @@ func init() {
198198 return
199199 }
200200 default :
201- _ , err := ctx .SendImage ( "base64://" + nano . BytesToString ( img ) , true )
201+ _ , err := ctx .SendImageBytes ( img , true )
202202 if err != nil {
203203 _ , _ = ctx .SendPlainMessage (false , "ERROR: " , err )
204204 return
@@ -262,7 +262,7 @@ func newWordleGame(target string) func(string) (bool, []byte, error) {
262262 }
263263 }
264264 }
265- data , err = imgfactory .ToBase64 (ctx .Image ())
265+ data , err = imgfactory .ToBytes (ctx .Image ())
266266 return
267267 }
268268}
0 commit comments