Skip to content
This repository has been archived by the owner on Feb 8, 2025. It is now read-only.

Commit

Permalink
fix: link pattern err
Browse files Browse the repository at this point in the history
  • Loading branch information
MoYoez committed Apr 16, 2024
1 parent a075b78 commit 7c22516
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions plugin/tools/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -74,12 +74,12 @@ func init() {
engine.OnMessageCommand("qpic").SetBlock(true).Handle(func(ctx *rei.Ctx) {
getLength, List := rei.SplitCommandTo(ctx.Message.Text, 2)
if getLength == 2 {
getDataRaw, err := web.GetData("https://gchat.qpic.cn/gchatpic_new/0/0-0-" + List[1])
getDataRaw, err := web.GetData("https://gchat.qpic.cn/gchatpic_new/0/0-0-" + List[1] + "/0")
if err != nil {
ctx.SendPlainMessage(true, "获取对应图片错误,或许是图片已过期")
return
}
ctx.SendPhoto(tgba.FileBytes{Name: List[1], Bytes: getDataRaw}, true, "Link: "+"https://gchat.qpic.cn/gchatpic_new/0/0-0-"+List[1])
ctx.SendPhoto(tgba.FileBytes{Name: List[1], Bytes: getDataRaw}, true, "Link: "+"https://gchat.qpic.cn/gchatpic_new/0/0-0-"+List[1]+"/0")
} else {
ctx.SendPlainMessage(true, "缺少参数/ 应当是 /qpic <md5> ")
}
Expand Down

0 comments on commit 7c22516

Please sign in to comment.