From 00e99ed293d03628e4b36346e213db0623dc4c14 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=A4=9A=E5=90=83=E7=82=B9=E8=8B=B9=E6=9E=9C?= <73388495+eatmoreapple@users.noreply.github.com> Date: Fri, 6 Jan 2023 00:59:35 +0800 Subject: [PATCH] =?UTF-8?q?=E5=88=A0=E9=99=A4=E4=B8=80=E4=BA=9B=E5=86=97?= =?UTF-8?q?=E4=BD=99=E7=9A=84=E5=87=BD=E6=95=B0=20(#179)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- bot.go | 25 ------------------------- 1 file changed, 25 deletions(-) diff --git a/bot.go b/bot.go index 3980c82..f195cce 100644 --- a/bot.go +++ b/bot.go @@ -277,16 +277,6 @@ func (b *Bot) CrashReason() error { return b.err } -// MessageOnSuccess setter for Bot.MessageHandler -func (b *Bot) MessageOnSuccess(h func(msg *Message)) { - b.MessageHandler = h -} - -// MessageOnError setter for bot.GetMessageErrorHandler -func (b *Bot) MessageOnError(h func(err error) bool) { - b.MessageErrorHandler = h -} - // DumpHotReloadStorage 写入HotReloadStorage func (b *Bot) DumpHotReloadStorage() error { if b.hotReloadStorage == nil { @@ -309,21 +299,6 @@ func (b *Bot) DumpTo(writer io.Writer) error { return json.NewEncoder(writer).Encode(item) } -// OnLogin is a setter for LoginCallBack -func (b *Bot) OnLogin(f func(body []byte)) { - b.LoginCallBack = f -} - -// OnScanned is a setter for ScanCallBack -func (b *Bot) OnScanned(f func(body []byte)) { - b.ScanCallBack = f -} - -// OnLogout is a setter for LogoutCallBack -func (b *Bot) OnLogout(f func(bot *Bot)) { - b.LogoutCallBack = f -} - // NewBot Bot的构造方法 // 接收外部的 context.Context,用于控制Bot的存活 func NewBot(c context.Context) *Bot {