1
0
mirror of https://github.com/fumiama/NanoBot.git synced 2026-06-05 10:40:24 +08:00

optimize(context): SendImage

This commit is contained in:
源文雨
2023-11-17 00:04:29 +09:00
parent 41dff2d35f
commit c9ba2f7350

View File

@@ -204,7 +204,9 @@ func (ctx *Ctx) SendImage(file string, replytosender bool, caption ...any) (repl
Type: FileTypeImage,
URL: file,
}
_, _ = ctx.SendPlainMessage(replytosender, caption...)
if len(caption) > 0 {
_, _ = ctx.SendPlainMessage(replytosender, caption...)
}
if OnlyQQGroup(ctx) {
reply, err = ctx.PostFileToQQGroup(ctx.Message.ChannelID, fp)
} else if OnlyQQPrivate(ctx) {