修复当bot在线的情况下执行热登录,会开启多次事件监听 🐛

This commit is contained in:
eatmoreapple 2021-08-01 00:53:14 +08:00
parent 67b71542c8
commit a54493fc61

3
bot.go
View File

@ -58,9 +58,6 @@ func (b *Bot) GetCurrentUser() (*Self, error) {
// err := bot.HotLogin(storage, true)
// fmt.Println(err)
func (b *Bot) HotLogin(storage HotReloadStorage, retry ...bool) error {
if b.Alive() {
b.cancel()
}
b.isHot = true
b.hotReloadStorage = storage