Skip to content

Commit 339cffc

Browse files
authored
修改牛牛商店的循环条件为商品变量的长度
1 parent edceba7 commit 339cffc

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

plugin/niuniu/main.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@ func init() {
150150

151151
var messages message.Message
152152
messages = append(messages, ctxext.FakeSenderForwardNode(ctx, message.Text("牛牛商店当前售卖的物品如下")))
153-
for id := 1; id <= 5; id++ {
153+
for id := 1; id <= len(propMap); id++ {
154154
product := propMap[id]
155155
productInfo := fmt.Sprintf("商品%d\n商品名: %s\n商品价格: %dATRI币\n商品作用域: %s\n商品描述: %s\n使用次数:%d",
156156
id, product.name, product.cost, product.scope, product.description, product.count)

0 commit comments

Comments
 (0)