修复当bot在线的情况下执行热登录,会开启多次事件监听 🐛
This commit is contained in:
parent
67b71542c8
commit
a54493fc61
3
bot.go
3
bot.go
@ -58,9 +58,6 @@ func (b *Bot) GetCurrentUser() (*Self, error) {
|
|||||||
// err := bot.HotLogin(storage, true)
|
// err := bot.HotLogin(storage, true)
|
||||||
// fmt.Println(err)
|
// fmt.Println(err)
|
||||||
func (b *Bot) HotLogin(storage HotReloadStorage, retry ...bool) error {
|
func (b *Bot) HotLogin(storage HotReloadStorage, retry ...bool) error {
|
||||||
if b.Alive() {
|
|
||||||
b.cancel()
|
|
||||||
}
|
|
||||||
b.isHot = true
|
b.isHot = true
|
||||||
b.hotReloadStorage = storage
|
b.hotReloadStorage = storage
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user