Skip to content

Commit

Permalink
[+] add magic
Browse files Browse the repository at this point in the history
  • Loading branch information
MoYoez committed Jan 21, 2024
1 parent 2194f6b commit 8db9d7e
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions plugin/mai/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,24 @@ func init() {
SetUserDefaultPlateToDatabase(ctx, getSplitStringList[2])
case getSplitStringList[1] == "switch":
MaimaiSwitcherService(ctx)
case getSplitStringList[1] == "ticket":
if getSplitLength == 2 {
ctx.SendPlainMessage(true, "缺少参数哦~ qwq")
return
}
getID, _ := toolchain.GetChatUserInfoID(ctx)
getMaiID := GetUserIDFromDatabase(getID)
if getMaiID.Userid == "" {
ctx.SendPlainMessage(true, "没有绑定~ 绑定方式: /mai userbind <maiTempID>")
return
}
ticketToFormatNum, err := strconv.ParseInt(getSplitStringList[2], 10, 64)
if err != nil {
ctx.SendPlainMessage(true, "传输的数据不合法~")
return
}
TicketTransformerPackage(getMaiID.Userid, ticketToFormatNum, ctx)

Check failure on line 112 in plugin/mai/main.go

View workflow job for this annotation

GitHub Actions / Build binary CI (linux, amd64)

undefined: TicketTransformerPackage

Check failure on line 112 in plugin/mai/main.go

View workflow job for this annotation

GitHub Actions / Build binary CI (linux, arm64)

undefined: TicketTransformerPackage

Check failure on line 112 in plugin/mai/main.go

View workflow job for this annotation

GitHub Actions / Build binary CI (windows, amd64)

undefined: TicketTransformerPackage

Check failure on line 112 in plugin/mai/main.go

View workflow job for this annotation

GitHub Actions / Build binary CI (windows, 386)

undefined: TicketTransformerPackage

Check failure on line 112 in plugin/mai/main.go

View workflow job for this annotation

GitHub Actions / Build binary CI (linux, 386)

undefined: TicketTransformerPackage

Check failure on line 112 in plugin/mai/main.go

View workflow job for this annotation

GitHub Actions / Build binary CI (linux, arm)

undefined: TicketTransformerPackage

Check failure on line 112 in plugin/mai/main.go

View workflow job for this annotation

GitHub Actions / lint

undefined: TicketTransformerPackage

Check failure on line 112 in plugin/mai/main.go

View workflow job for this annotation

GitHub Actions / lint

undefined: TicketTransformerPackage

default:
ctx.SendPlainMessage(true, "未知的指令或者指令出现错误~")
}
Expand Down

0 comments on commit 8db9d7e

Please sign in to comment.