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 {