From 36c903becef3b703d19dee45d639087db11fcb21 Mon Sep 17 00:00:00 2001 From: MoeMagicMango Date: Sat, 12 Feb 2022 20:23:01 +0800 Subject: [PATCH 01/19] Create purechat.go --- plugin_purechat/purechat.go | 38 +++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 plugin_purechat/purechat.go diff --git a/plugin_purechat/purechat.go b/plugin_purechat/purechat.go new file mode 100644 index 0000000000..23f05455c4 --- /dev/null +++ b/plugin_purechat/purechat.go @@ -0,0 +1,38 @@ +// Package purechat 修改过的单纯回复插件 +package purechat + +import ( + "math/rand" + + control "github.com/FloatTech/zbputils/control" + zero "github.com/wdvxdr1123/ZeroBot" + "github.com/wdvxdr1123/ZeroBot/message" + + "github.com/FloatTech/ZeroBot-Plugin/order" +) + +const ( + dbpath = "data/Purechat/" + dbfile = dbpath + "kimoi_clear.json" +) + +var ( + engine = control.Register("purechat", order.PrioPureChat, &control.Options{ + DisableOnDefault: false, + Help: "purechat\n- 稍微干净一点的chat回复 删掉了一些有点ex的w((", + }) + kimogomap = make(kimogo, 256) + chatList = make([]string, 0, 256) +) + +func init() { + initPureChatList(func() { + engine.OnFullMatchGroup(chatList, zero.OnlyToMe).SetBlock(true).Handle( + func(ctx *zero.Ctx) { + key := ctx.MessageString() + val := *kimogomap[key] + text := val[rand.Intn(len(val))] + ctx.SendChain(message.Reply(ctx.Event.MessageID), message.Text(text)) + }) + }) +} From e7630b59048a82f6696dcb834481ea7e8a8bf1ea Mon Sep 17 00:00:00 2001 From: MoeMagicMango Date: Sat, 12 Feb 2022 20:24:32 +0800 Subject: [PATCH 02/19] Update purechat.go --- plugin_purechat/purechat.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugin_purechat/purechat.go b/plugin_purechat/purechat.go index 23f05455c4..ff7c2b97f3 100644 --- a/plugin_purechat/purechat.go +++ b/plugin_purechat/purechat.go @@ -18,7 +18,7 @@ const ( var ( engine = control.Register("purechat", order.PrioPureChat, &control.Options{ - DisableOnDefault: false, + DisableOnDefault: ture, Help: "purechat\n- 稍微干净一点的chat回复 删掉了一些有点ex的w((", }) kimogomap = make(kimogo, 256) From 6bbcdfcd5825e4a5aa5bb8f70690694d20bcae7a Mon Sep 17 00:00:00 2001 From: MoeMagicMango Date: Sat, 12 Feb 2022 20:24:54 +0800 Subject: [PATCH 03/19] Add files via upload --- plugin_purechat/data.go | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 plugin_purechat/data.go diff --git a/plugin_purechat/data.go b/plugin_purechat/data.go new file mode 100644 index 0000000000..0226ab282e --- /dev/null +++ b/plugin_purechat/data.go @@ -0,0 +1,36 @@ +package purechat + +import ( + "encoding/json" + "os" + + "github.com/sirupsen/logrus" + + "github.com/FloatTech/zbputils/file" + "github.com/FloatTech/zbputils/process" + + "github.com/FloatTech/ZeroBot-Plugin/order" +) + +type kimogo = map[string]*[]string + +func initPureChatList(postinit func()) { + go func() { + defer order.DoneOnExit()() + process.SleepAbout1sTo2s() + _ = os.MkdirAll(dbpath, 0755) + data, err := file.GetLazyData(dbfile, true, true) + if err != nil { + panic(err) + } + err = json.Unmarshal(data, &kimogomap) + if err != nil { + panic(err) + } + for k := range kimogomap { + chatList = append(chatList, k) + } + logrus.Infoln("[purechat]加载", len(chatList), "条kimoi") + postinit() + }() +} From b046d45435ac47a595b8e375b86f0eaa8846b90e Mon Sep 17 00:00:00 2001 From: MoeMagicMango Date: Sat, 12 Feb 2022 20:25:23 +0800 Subject: [PATCH 04/19] Rename purechat.go to chat.go --- plugin_purechat/{purechat.go => chat.go} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename plugin_purechat/{purechat.go => chat.go} (100%) diff --git a/plugin_purechat/purechat.go b/plugin_purechat/chat.go similarity index 100% rename from plugin_purechat/purechat.go rename to plugin_purechat/chat.go From 5ac3b7a7900bbc4d05659e111e817302a9061330 Mon Sep 17 00:00:00 2001 From: MoeMagicMango Date: Sat, 12 Feb 2022 20:28:48 +0800 Subject: [PATCH 05/19] Update chat.go --- plugin_purechat/chat.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugin_purechat/chat.go b/plugin_purechat/chat.go index ff7c2b97f3..8ed60d9a04 100644 --- a/plugin_purechat/chat.go +++ b/plugin_purechat/chat.go @@ -17,7 +17,7 @@ const ( ) var ( - engine = control.Register("purechat", order.PrioPureChat, &control.Options{ + engine = control.Register("purechat", order.AcquirePrio(), &control.Options{ DisableOnDefault: ture, Help: "purechat\n- 稍微干净一点的chat回复 删掉了一些有点ex的w((", }) From faf198289f7e13e9d7302c673797eb281ab3c131 Mon Sep 17 00:00:00 2001 From: MoeMagicMango Date: Sat, 12 Feb 2022 20:29:59 +0800 Subject: [PATCH 06/19] Update main.go --- main.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/main.go b/main.go index 96769e79ce..058cd1f8c4 100644 --- a/main.go +++ b/main.go @@ -29,6 +29,8 @@ import ( _ "github.com/FloatTech/ZeroBot-Plugin/plugin_atri" // ATRI词库 _ "github.com/FloatTech/ZeroBot-Plugin/plugin_manager" // 群管 + + _ "github.com/FloatTech/ZeroBot-Plugin/plugin_wordbank" // 不是很ex的基础词库 // ^^^^ // // ^^^^^^^^^^^^^^ // From aa08eb012085cb3c78708857f5c0e7e06e6eaa41 Mon Sep 17 00:00:00 2001 From: MoeMagicMango Date: Sat, 12 Feb 2022 20:38:19 +0800 Subject: [PATCH 07/19] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E8=BF=87=E7=9A=84?= =?UTF-8?q?=E5=9B=9E=E5=A4=8D=20=E5=88=A0=E6=8E=89=E4=BA=86=E4=B8=80?= =?UTF-8?q?=E4=BA=9Bex=E7=9A=84=E8=AF=8D=E6=B1=87?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- plugin_thesaurus/chat.go | 38 ++++++++++++++++++++++++++++++++++++++ plugin_thesaurus/data.go | 36 ++++++++++++++++++++++++++++++++++++ 2 files changed, 74 insertions(+) create mode 100644 plugin_thesaurus/chat.go create mode 100644 plugin_thesaurus/data.go diff --git a/plugin_thesaurus/chat.go b/plugin_thesaurus/chat.go new file mode 100644 index 0000000000..8aa68634b8 --- /dev/null +++ b/plugin_thesaurus/chat.go @@ -0,0 +1,38 @@ +// Package thesaurus 修改过的单纯回复插件 +package thesaurus + +import ( + "math/rand" + + control "github.com/FloatTech/zbputils/control" + zero "github.com/wdvxdr1123/ZeroBot" + "github.com/wdvxdr1123/ZeroBot/message" + + "github.com/FloatTech/ZeroBot-Plugin/order" +) + +const ( + dbpath = "data/Purechat/" + dbfile = dbpath + "kimoi_clear.json" +) + +var ( + engine = control.Register("thesaurus", order.AcquirePrio(), &control.Options{ + DisableOnDefault: ture, + Help: "thesaurus\n- 稍微干净一点的chat回复 删掉了一些有点ex的w((", + }) + kimogomap = make(kimogo, 256) + chatList = make([]string, 0, 256) +) + +func init() { + initPureChatList(func() { + engine.OnFullMatchGroup(chatList, zero.OnlyToMe).SetBlock(true).Handle( + func(ctx *zero.Ctx) { + key := ctx.MessageString() + val := *kimogomap[key] + text := val[rand.Intn(len(val))] + ctx.SendChain(message.Reply(ctx.Event.MessageID), message.Text(text)) // 来自于 https://github.com/Kyomotoi/AnimeThesaurus 的回复 经过二次修改 + }) + }) +} \ No newline at end of file diff --git a/plugin_thesaurus/data.go b/plugin_thesaurus/data.go new file mode 100644 index 0000000000..c64985c712 --- /dev/null +++ b/plugin_thesaurus/data.go @@ -0,0 +1,36 @@ +package thesaurus + +import ( + "encoding/json" + "os" + + "github.com/sirupsen/logrus" + + "github.com/FloatTech/zbputils/file" + "github.com/FloatTech/zbputils/process" + + "github.com/FloatTech/ZeroBot-Plugin/order" +) + +type kimogo = map[string]*[]string + +func initPureChatList(postinit func()) { + go func() { + defer order.DoneOnExit()() + process.SleepAbout1sTo2s() + _ = os.MkdirAll(dbpath, 0755) + data, err := file.GetLazyData(dbfile, true, true) + if err != nil { + panic(err) + } + err = json.Unmarshal(data, &kimogomap) + if err != nil { + panic(err) + } + for k := range kimogomap { + chatList = append(chatList, k) + } + logrus.Infoln("[purechat]加载", len(chatList), "条kimoi") + postinit() + }() +} From 34ed8c89fd87def3e76f03444ae6461563449348 Mon Sep 17 00:00:00 2001 From: MoeMagicMango Date: Sat, 12 Feb 2022 20:38:46 +0800 Subject: [PATCH 08/19] Update main.go --- main.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main.go b/main.go index 058cd1f8c4..c0f76d9c11 100644 --- a/main.go +++ b/main.go @@ -30,7 +30,7 @@ import ( _ "github.com/FloatTech/ZeroBot-Plugin/plugin_manager" // 群管 - _ "github.com/FloatTech/ZeroBot-Plugin/plugin_wordbank" // 不是很ex的基础词库 + _ "github.com/FloatTech/ZeroBot-Plugin/plugin_thesaurus" // 不是很ex的基础词库 // ^^^^ // // ^^^^^^^^^^^^^^ // From 1da3486d00a26ae287bffbb89b09096d5f064605 Mon Sep 17 00:00:00 2001 From: MoeMagicMango Date: Sat, 12 Feb 2022 20:46:34 +0800 Subject: [PATCH 09/19] Add files via upload --- plugin_thesaurus/chat.go | 4 ++-- plugin_thesaurus/data.go | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/plugin_thesaurus/chat.go b/plugin_thesaurus/chat.go index 8aa68634b8..a71dc0035b 100644 --- a/plugin_thesaurus/chat.go +++ b/plugin_thesaurus/chat.go @@ -12,7 +12,7 @@ import ( ) const ( - dbpath = "data/Purechat/" + dbpath = "data/thesaurus/" dbfile = dbpath + "kimoi_clear.json" ) @@ -26,7 +26,7 @@ var ( ) func init() { - initPureChatList(func() { + initthesaurusList(func() { engine.OnFullMatchGroup(chatList, zero.OnlyToMe).SetBlock(true).Handle( func(ctx *zero.Ctx) { key := ctx.MessageString() diff --git a/plugin_thesaurus/data.go b/plugin_thesaurus/data.go index c64985c712..dac34412ef 100644 --- a/plugin_thesaurus/data.go +++ b/plugin_thesaurus/data.go @@ -14,7 +14,7 @@ import ( type kimogo = map[string]*[]string -func initPureChatList(postinit func()) { +func initthesaurusList(postinit func()) { go func() { defer order.DoneOnExit()() process.SleepAbout1sTo2s() @@ -30,7 +30,7 @@ func initPureChatList(postinit func()) { for k := range kimogomap { chatList = append(chatList, k) } - logrus.Infoln("[purechat]加载", len(chatList), "条kimoi") + logrus.Infoln("[thesaurus]加载", len(chatList), "条kimoi") postinit() }() } From c3550503f0e2c55a3f1c9735722bc4efc94fb54a Mon Sep 17 00:00:00 2001 From: MoeMagicMango Date: Sat, 12 Feb 2022 20:47:47 +0800 Subject: [PATCH 10/19] Delete plugin_purechat directory --- plugin_purechat/chat.go | 38 -------------------------------------- plugin_purechat/data.go | 36 ------------------------------------ 2 files changed, 74 deletions(-) delete mode 100644 plugin_purechat/chat.go delete mode 100644 plugin_purechat/data.go diff --git a/plugin_purechat/chat.go b/plugin_purechat/chat.go deleted file mode 100644 index 8ed60d9a04..0000000000 --- a/plugin_purechat/chat.go +++ /dev/null @@ -1,38 +0,0 @@ -// Package purechat 修改过的单纯回复插件 -package purechat - -import ( - "math/rand" - - control "github.com/FloatTech/zbputils/control" - zero "github.com/wdvxdr1123/ZeroBot" - "github.com/wdvxdr1123/ZeroBot/message" - - "github.com/FloatTech/ZeroBot-Plugin/order" -) - -const ( - dbpath = "data/Purechat/" - dbfile = dbpath + "kimoi_clear.json" -) - -var ( - engine = control.Register("purechat", order.AcquirePrio(), &control.Options{ - DisableOnDefault: ture, - Help: "purechat\n- 稍微干净一点的chat回复 删掉了一些有点ex的w((", - }) - kimogomap = make(kimogo, 256) - chatList = make([]string, 0, 256) -) - -func init() { - initPureChatList(func() { - engine.OnFullMatchGroup(chatList, zero.OnlyToMe).SetBlock(true).Handle( - func(ctx *zero.Ctx) { - key := ctx.MessageString() - val := *kimogomap[key] - text := val[rand.Intn(len(val))] - ctx.SendChain(message.Reply(ctx.Event.MessageID), message.Text(text)) - }) - }) -} diff --git a/plugin_purechat/data.go b/plugin_purechat/data.go deleted file mode 100644 index 0226ab282e..0000000000 --- a/plugin_purechat/data.go +++ /dev/null @@ -1,36 +0,0 @@ -package purechat - -import ( - "encoding/json" - "os" - - "github.com/sirupsen/logrus" - - "github.com/FloatTech/zbputils/file" - "github.com/FloatTech/zbputils/process" - - "github.com/FloatTech/ZeroBot-Plugin/order" -) - -type kimogo = map[string]*[]string - -func initPureChatList(postinit func()) { - go func() { - defer order.DoneOnExit()() - process.SleepAbout1sTo2s() - _ = os.MkdirAll(dbpath, 0755) - data, err := file.GetLazyData(dbfile, true, true) - if err != nil { - panic(err) - } - err = json.Unmarshal(data, &kimogomap) - if err != nil { - panic(err) - } - for k := range kimogomap { - chatList = append(chatList, k) - } - logrus.Infoln("[purechat]加载", len(chatList), "条kimoi") - postinit() - }() -} From ecf641906507a84d0df8e09bba4e18034e170668 Mon Sep 17 00:00:00 2001 From: MoeMagicMango Date: Sat, 12 Feb 2022 20:48:14 +0800 Subject: [PATCH 11/19] Update chat.go --- plugin_thesaurus/chat.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugin_thesaurus/chat.go b/plugin_thesaurus/chat.go index a71dc0035b..243d6284e4 100644 --- a/plugin_thesaurus/chat.go +++ b/plugin_thesaurus/chat.go @@ -8,7 +8,7 @@ import ( zero "github.com/wdvxdr1123/ZeroBot" "github.com/wdvxdr1123/ZeroBot/message" - "github.com/FloatTech/ZeroBot-Plugin/order" + "github.com/FloatTech/zbputils/control/order" ) const ( @@ -35,4 +35,4 @@ func init() { ctx.SendChain(message.Reply(ctx.Event.MessageID), message.Text(text)) // 来自于 https://github.com/Kyomotoi/AnimeThesaurus 的回复 经过二次修改 }) }) -} \ No newline at end of file +} From 87501f601124528bf3016745edf25d2abca1f6b3 Mon Sep 17 00:00:00 2001 From: MoeMagicMango Date: Sat, 12 Feb 2022 20:49:08 +0800 Subject: [PATCH 12/19] Update data.go --- plugin_thesaurus/data.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugin_thesaurus/data.go b/plugin_thesaurus/data.go index dac34412ef..2bc7b3988a 100644 --- a/plugin_thesaurus/data.go +++ b/plugin_thesaurus/data.go @@ -9,7 +9,7 @@ import ( "github.com/FloatTech/zbputils/file" "github.com/FloatTech/zbputils/process" - "github.com/FloatTech/ZeroBot-Plugin/order" + "github.com/FloatTech/zbputils/control/order" ) type kimogo = map[string]*[]string From a233586dfe4d3ef00fa7c23ec52f27653e51fc70 Mon Sep 17 00:00:00 2001 From: MoeMagicMango Date: Sat, 12 Feb 2022 20:50:21 +0800 Subject: [PATCH 13/19] Update chat.go --- plugin_thesaurus/chat.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugin_thesaurus/chat.go b/plugin_thesaurus/chat.go index 243d6284e4..47f3c8768a 100644 --- a/plugin_thesaurus/chat.go +++ b/plugin_thesaurus/chat.go @@ -18,7 +18,7 @@ const ( var ( engine = control.Register("thesaurus", order.AcquirePrio(), &control.Options{ - DisableOnDefault: ture, + DisableOnDefault: true, Help: "thesaurus\n- 稍微干净一点的chat回复 删掉了一些有点ex的w((", }) kimogomap = make(kimogo, 256) From c8b4827e9184f211c9bee9ab252a3b4e1f23f2dd Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Sat, 12 Feb 2022 12:50:57 +0000 Subject: [PATCH 14/19] =?UTF-8?q?=F0=9F=8E=A8=20=E6=94=B9=E8=BF=9B?= =?UTF-8?q?=E4=BB=A3=E7=A0=81=E6=A0=B7=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- main.go | 2 +- plugin_thesaurus/chat.go | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/main.go b/main.go index c0f76d9c11..73b4c64236 100644 --- a/main.go +++ b/main.go @@ -29,7 +29,7 @@ import ( _ "github.com/FloatTech/ZeroBot-Plugin/plugin_atri" // ATRI词库 _ "github.com/FloatTech/ZeroBot-Plugin/plugin_manager" // 群管 - + _ "github.com/FloatTech/ZeroBot-Plugin/plugin_thesaurus" // 不是很ex的基础词库 // ^^^^ // diff --git a/plugin_thesaurus/chat.go b/plugin_thesaurus/chat.go index 47f3c8768a..fe9ab7c437 100644 --- a/plugin_thesaurus/chat.go +++ b/plugin_thesaurus/chat.go @@ -21,11 +21,11 @@ var ( DisableOnDefault: true, Help: "thesaurus\n- 稍微干净一点的chat回复 删掉了一些有点ex的w((", }) - kimogomap = make(kimogo, 256) - chatList = make([]string, 0, 256) + kimogomap = make(kimogo, 256) + chatList = make([]string, 0, 256) ) -func init() { +func init() { initthesaurusList(func() { engine.OnFullMatchGroup(chatList, zero.OnlyToMe).SetBlock(true).Handle( func(ctx *zero.Ctx) { From 70172f4d8bd0fb513680e5ff4c4333eba227cd4d Mon Sep 17 00:00:00 2001 From: MoeMagicMango Date: Sat, 12 Feb 2022 20:53:10 +0800 Subject: [PATCH 15/19] =?UTF-8?q?=E6=8D=A2=E4=BA=86=E4=B8=AA=E7=BD=91?= =?UTF-8?q?=E6=98=93=E4=BA=91=E9=9F=B3=E4=B9=90=E7=83=AD=E8=AF=84=E7=9A=84?= =?UTF-8?q?API?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- plugin_wangyiyun/main.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugin_wangyiyun/main.go b/plugin_wangyiyun/main.go index 2209a65f57..23f570d7b8 100644 --- a/plugin_wangyiyun/main.go +++ b/plugin_wangyiyun/main.go @@ -13,8 +13,8 @@ import ( ) const ( - wangyiyunURL = "http://ovooa.com/API/wyrp/api.php?type=text" - wangyiyunReferer = "http://ovooa.com/" + wangyiyunURL = "https://api.gmit.vip/Api/HotComments?format=text" + wangyiyunReferer = "https://api.gmit.vip/" ua = "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/96.0.4664.110 Safari/537.36" ) From c445c61da52ab55eedf9c3f71481891f66799850 Mon Sep 17 00:00:00 2001 From: MoeMagicMango Date: Sat, 12 Feb 2022 20:58:57 +0800 Subject: [PATCH 16/19] Delete data.go --- plugin_chat/data.go | 36 ------------------------------------ 1 file changed, 36 deletions(-) delete mode 100644 plugin_chat/data.go diff --git a/plugin_chat/data.go b/plugin_chat/data.go deleted file mode 100644 index 4095aa2415..0000000000 --- a/plugin_chat/data.go +++ /dev/null @@ -1,36 +0,0 @@ -package chat - -import ( - "encoding/json" - "os" - - "github.com/sirupsen/logrus" - - "github.com/FloatTech/zbputils/file" - "github.com/FloatTech/zbputils/process" - - "github.com/FloatTech/zbputils/control/order" -) - -type kimo = map[string]*[]string - -func initChatList(postinit func()) { - go func() { - defer order.DoneOnExit()() - process.SleepAbout1sTo2s() - _ = os.MkdirAll(dbpath, 0755) - data, err := file.GetLazyData(dbfile, true, true) - if err != nil { - panic(err) - } - err = json.Unmarshal(data, &kimomap) - if err != nil { - panic(err) - } - for k := range kimomap { - chatList = append(chatList, k) - } - logrus.Infoln("[chat]加载", len(chatList), "条kimoi") - postinit() - }() -} From 610cae52299c8a3163dec3aeaa95ee2c76e3fb5f Mon Sep 17 00:00:00 2001 From: MoeMagicMango Date: Sat, 12 Feb 2022 21:05:08 +0800 Subject: [PATCH 17/19] Update chat.go --- plugin_chat/chat.go | 19 +++---------------- 1 file changed, 3 insertions(+), 16 deletions(-) diff --git a/plugin_chat/chat.go b/plugin_chat/chat.go index a3dfa79f47..9f9d2f982d 100644 --- a/plugin_chat/chat.go +++ b/plugin_chat/chat.go @@ -14,19 +14,15 @@ import ( "github.com/FloatTech/zbputils/control/order" ) -const ( - dbpath = "data/Chat/" - dbfile = dbpath + "kimoi.json" -) var ( poke = rate.NewManager(time.Minute*5, 8) // 戳一戳 engine = control.Register("chat", order.AcquirePrio(), &control.Options{ DisableOnDefault: false, - Help: "chat\n- [BOT名字]\n- [戳一戳BOT]\n- 空调开\n- 空调关\n- 群温度\n- 设置温度[正整数]\n- mua | 啾咪 | 摸 | 上你 | 傻 | 裸 | 贴 | 老婆 | 抱 | 亲 | 一下 | 咬 | 操 | 123 | 进去 | 调教 | 搓 | 让 | 捏 | 挤 | 略 | 呐 | 原味 | 胖次 | 内裤 | 内衣 | 衣服 | ghs | 批 | 憨批 | kkp | 咕 | 骚 | 喜欢 | suki | 好き | 看 | 不能 | 砸了 | 透 | 口我 | 草我 | 自慰 | onani | オナニー | 炸了 | 色图 | 涩图 | 告白 | 对不起 | 回来 | 吻 | 软 | 壁咚 | 掰开 | 女友 | 是 | 喵 | 嗷呜 | 叫 | 拜 | 佬 | awsl | 臭 | 香 | 腿 | 张开 | 脚 | 脸 | 头发 | 手 | pr | 舔 | 小穴 | 腰 | 诶嘿嘿 | 可爱 | 扭蛋 | 鼻 | 眼 | 色气 | 推 | 床 | 举 | 手冲 | 饿 | 变 | 敲 | 爬 | 怕 | 冲 | 射 | 不穿 | 迫害 | 猫粮 | 揪尾巴 | 薄荷 | 早 | 晚安 | 揉 | 榨 | 掐 | 胸 | 奶子 | 欧派 | 嫩 | 蹭 | 牵手 | 握手 | 拍照 | w | 睡不着 | 欧尼酱 | 哥 | 爱你 | 过来 | 自闭 | 打不过 | 么么哒 | 很懂 | 膝枕 | 累了 | 安慰 | 洗澡 | 一起睡觉 | 一起 | 多大 | 姐姐 | 糖 | 嗦 | 牛子 | 🐂子 | 🐮子 | 嫌弃 | 紧 | baka | 笨蛋 | 插 | 插进来 | 屁股 | 翘 | 翘起来 | 抬 | 抬起 | 爸 | 傲娇 | rua | 咕噜咕噜 | 咕噜 | 上床 | 做爱 | 吃掉 | 吃 | 揪 | 种草莓 | 种草 | 掀 | 妹 | 病娇 | 嘻", + Help: "chat\n- [BOT名字]\n- [戳一戳BOT]\n- 空调开\n- 空调关\n- 群温度\n- 设置温度[正整数]\n-", }) - kimomap = make(kimo, 256) - chatList = make([]string, 0, 256) + + ) func init() { // 插件主体 @@ -111,13 +107,4 @@ func init() { // 插件主体 )) } }) - initChatList(func() { - engine.OnFullMatchGroup(chatList, zero.OnlyToMe).SetBlock(true).Handle( - func(ctx *zero.Ctx) { - key := ctx.MessageString() - val := *kimomap[key] - text := val[rand.Intn(len(val))] - ctx.SendChain(message.Reply(ctx.Event.MessageID), message.Text(text)) - }) - }) } From fae3458bcf806cbae9a2b8f691a2556082ec98ff Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Sat, 12 Feb 2022 13:05:37 +0000 Subject: [PATCH 18/19] =?UTF-8?q?=F0=9F=8E=A8=20=E6=94=B9=E8=BF=9B?= =?UTF-8?q?=E4=BB=A3=E7=A0=81=E6=A0=B7=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- plugin_chat/chat.go | 3 --- 1 file changed, 3 deletions(-) diff --git a/plugin_chat/chat.go b/plugin_chat/chat.go index 9f9d2f982d..0abc48add5 100644 --- a/plugin_chat/chat.go +++ b/plugin_chat/chat.go @@ -14,15 +14,12 @@ import ( "github.com/FloatTech/zbputils/control/order" ) - var ( poke = rate.NewManager(time.Minute*5, 8) // 戳一戳 engine = control.Register("chat", order.AcquirePrio(), &control.Options{ DisableOnDefault: false, Help: "chat\n- [BOT名字]\n- [戳一戳BOT]\n- 空调开\n- 空调关\n- 群温度\n- 设置温度[正整数]\n-", }) - - ) func init() { // 插件主体 From aaf832e3b50f62f119ded700bdd7bde5459a6d7a Mon Sep 17 00:00:00 2001 From: MoeMagicMango Date: Sat, 12 Feb 2022 21:06:21 +0800 Subject: [PATCH 19/19] Update chat.go --- plugin_thesaurus/chat.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugin_thesaurus/chat.go b/plugin_thesaurus/chat.go index fe9ab7c437..b52acd6c70 100644 --- a/plugin_thesaurus/chat.go +++ b/plugin_thesaurus/chat.go @@ -18,7 +18,7 @@ const ( var ( engine = control.Register("thesaurus", order.AcquirePrio(), &control.Options{ - DisableOnDefault: true, + DisableOnDefault: false, Help: "thesaurus\n- 稍微干净一点的chat回复 删掉了一些有点ex的w((", }) kimogomap = make(kimogo, 256)