Skip to content

Commit

Permalink
权重查询美化 (#560)
Browse files Browse the repository at this point in the history
  • Loading branch information
lianhong2758 authored Jan 16, 2023
1 parent 778b874 commit a029add
Showing 1 changed file with 19 additions and 1 deletion.
20 changes: 19 additions & 1 deletion plugin/quan/quan.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ package quan
import (
"fmt"
"strconv"
"strings"

"github.com/FloatTech/floatbox/web"
ctrl "github.com/FloatTech/zbpctrl"
Expand Down Expand Up @@ -35,6 +36,23 @@ func init() { // 主函数
ctx.SendChain(message.Text("出现错误捏:", err))
return
}
ctx.SendChain(message.Text(str, helper.BytesToString(es))) // 输出结果
if len(helper.BytesToString(es)) <= 24 {
ctx.SendChain(message.Text("网站维护中")) // 输出结果
return
}
f := helper.BytesToString(es)[24:]
_, err = strconv.Atoi(f)
if err != nil {
ctx.SendChain(message.Text("网站维护中")) // 输出结果
return
}
var msg strings.Builder
msg.WriteString("查询账号:")
msg.WriteString(str)
msg.WriteString("\n")
msg.WriteString("查询状态:成功\n")
msg.WriteString("您的权重为:")
msg.WriteString(f)
ctx.SendChain(message.Text(msg.String())) // 输出结果
})
}

0 comments on commit a029add

Please sign in to comment.