diff --git a/plugin/robbery/robbery.go b/plugin/robbery/robbery.go index a4d3ec8c25c..a4e0620a86f 100644 --- a/plugin/robbery/robbery.go +++ b/plugin/robbery/robbery.go @@ -104,6 +104,10 @@ func init() { // 判断打劫是否成功 if rand.Intn(100) > 60 { + if wallet.GetWalletOf(uid) < 1000 { + ctx.SendChain(message.Text("打劫失败,您身上没有钱支付罚款")) + return + } ctx.SendChain(message.Text("打劫失败,罚款1000")) err := wallet.InsertWalletOf(uid, -1000) if err != nil {