mirror of
https://github.com/mamoe/mirai.git
synced 2025-02-11 02:34:45 +08:00
修正removeManager的错误
修正removeManager的错误
This commit is contained in:
parent
1e2b85b737
commit
9f483049c2
@ -33,7 +33,7 @@ fun Bot.addManager(long: Long) {
|
||||
fun Bot.removeManager(long: Long) {
|
||||
BOT_MANAGERS.putIfAbsent(this.id.toString(), mutableListOf<Long>())
|
||||
BOT_MANAGERS[this.id.toString()] =
|
||||
(BOT_MANAGERS.getLongList(this.id.toString()) as MutableList<Long>).apply { add(long) }
|
||||
(BOT_MANAGERS.getLongList(this.id.toString()) as MutableList<Long>).apply { remove(long) }
|
||||
BotManagers.config.save()
|
||||
}
|
||||
|
||||
@ -50,4 +50,4 @@ fun Bot.checkManager(long: Long): Boolean {
|
||||
|
||||
fun getBotManagers(bot:Bot):List<Long>{
|
||||
return bot.managers
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user