mirror of
https://github.com/FloatTech/ZeroBot-Plugin.git
synced 2025-12-21 15:30:09 +08:00
修复单身技能会报错问题 (#237)
This commit is contained in:
parent
3c22aaf99d
commit
fda69793a5
@ -345,22 +345,18 @@ func checkdog(ctx *zero.Ctx) bool {
|
||||
ctx.SendChain(message.Text("额,你的target好像不存在?"))
|
||||
return false
|
||||
}
|
||||
uid := ctx.Event.UserID
|
||||
if uid == fiancee {
|
||||
ctx.SendChain(message.Text("今日获得成就:自恋狂"))
|
||||
return false
|
||||
}
|
||||
// 获取用户信息
|
||||
uid := ctx.Event.UserID
|
||||
uidtarget, uidstatus, ok1 := 民政局.查户口(gid, uid)
|
||||
_, fianceestatus, ok2 := 民政局.查户口(gid, fiancee)
|
||||
if !ok1 && !ok2 { // 必须是两个单身
|
||||
return true
|
||||
}
|
||||
if ok1 {
|
||||
if uidtarget.target == fiancee { // 如果本就是一块
|
||||
ctx.SendChain(message.Text("笨蛋~你们明明已经在一起了啊w"))
|
||||
return false
|
||||
}
|
||||
if ok1 {
|
||||
switch uidstatus {
|
||||
case 0: // 如果如为攻
|
||||
ctx.SendChain(message.Text("笨蛋~你家里还有个吃白饭的w"))
|
||||
|
||||
Loading…
Reference in New Issue
Block a user