Skip to content

Commit

Permalink
fix(message): Image 变参错误打印 (#80)
Browse files Browse the repository at this point in the history
  • Loading branch information
Miuzarte committed May 9, 2024
1 parent 562ffeb commit cc39bb3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions message/message.go
Original file line number Diff line number Diff line change
Expand Up @@ -204,15 +204,15 @@ func File(file, name string) MessageSegment {
// https://llonebot.github.io/zh-CN/develop/extends_api
//
// summary: LLOneBot的扩展字段:图片预览文字
func Image(file string, summary ...string) MessageSegment {
func Image(file string, summary ...interface{}) MessageSegment {
m := MessageSegment{
Type: "image",
Data: map[string]string{
"file": file,
},
}
if len(summary) > 0 {
m.Data["summary"] = fmt.Sprint(summary)
m.Data["summary"] = fmt.Sprint(summary...)
}
return m
}
Expand Down

0 comments on commit cc39bb3

Please sign in to comment.