Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix chess & kfc && optimize lolicon & bilibili #817

Merged
merged 2 commits into from
Nov 12, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions plugin/bilibili/bilibilipush.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,9 @@ func init() {
"- 取消b站直播订阅[uid|name]\n" +
"- b站推送列表\n" +
"- [开启|关闭]艾特全体\n" +
"Tips: 需要配合job一起使用, 全局只需要设置一个, 无视响应状态推送, 下为例子\n" +
"记录在\"@every 5m\"触发的指令)\n" +
"Tips: 需要先在 bilibili 插件中设置cookie\n" +
"需要配合 job 插件一起使用, 全局只需要设置一个, 无视响应状态推送, 下为例子\n" +
"记录在\"@every 5m\"触发的指令\n" +
"拉取b站推送",
PrivateDataFolder: "bilibilipush",
})
Expand Down
4 changes: 2 additions & 2 deletions plugin/chess/core.go
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ func resign(groupCode, senderUin int64) (msg message.Message, err error) {
}

// play 走棋
func play(senderUin int64, groupCode int64, moveStr string) (msg message.Message, err error) {
func play(groupCode, senderUin int64, moveStr string) (msg message.Message, err error) {
msg = message.Message{message.At(senderUin)}
// 检查对局是否存在
room, ok := chessRoomMap.Load(groupCode)
Expand Down Expand Up @@ -343,7 +343,7 @@ func cleanUserRate(senderUin int64) (msg message.Message, err error) {
}

// createGame 创建游戏
func createGame(isBlindfold bool, groupCode int64, senderUin int64, senderName string) (msg message.Message, err error) {
func createGame(isBlindfold bool, groupCode, senderUin int64, senderName string) (msg message.Message, err error) {
room, ok := chessRoomMap.Load(groupCode)
if !ok {
chessRoomMap.Store(groupCode, &chessRoom{
Expand Down
6 changes: 3 additions & 3 deletions plugin/kfccrazythursday/kfccrazythursday.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,16 @@
package kfccrazythursday

import (
"github.com/FloatTech/floatbox/binary"
"github.com/FloatTech/floatbox/web"
ctrl "github.com/FloatTech/zbpctrl"
"github.com/FloatTech/zbputils/control"
"github.com/tidwall/gjson"
zero "github.com/wdvxdr1123/ZeroBot"
"github.com/wdvxdr1123/ZeroBot/message"
)

const (
crazyURL = "https://www.iculture.cc/demo/CrazyThursday/api/kfc.php"
crazyURL = "https://api.jixs.cc/api/wenan-fkxqs/index.php"
)

func init() {
Expand All @@ -26,6 +26,6 @@ func init() {
ctx.SendChain(message.Text("ERROR: ", err))
return
}
ctx.SendChain(message.Text(gjson.ParseBytes(data).Get("@this.0.content").String()))
ctx.SendChain(message.Text(binary.BytesToString(data)))
})
}
2 changes: 1 addition & 1 deletion plugin/lolicon/lolicon.go
Original file line number Diff line number Diff line change
Expand Up @@ -115,5 +115,5 @@ func getimgurl(url string) (string, error) {
if imageurl = json.Get("data.0.urls.original").Str; imageurl == "" {
return "", errors.New("未找到相关内容, 换个tag试试吧")
}
return strings.ReplaceAll(imageurl, "i.pixiv.cat", "i.pixiv.re"), nil
return imageurl, nil
}
Loading