simple-robot / simbot-component-mirai

simple-robot下的mirai组件
https://component-mirai.simbot.forte.love/
GNU Affero General Public License v3.0
20 stars 0 forks source link

为MiraiGroup实现DeleteSupport #63

Closed ForteScarlet closed 2 years ago

ForteScarlet commented 2 years ago

通过为 MiraiGroup 实现 DeleteSupport ,来通过 delete 描述bot退群的行为。

val group: Group = ...

if (group is DeleteSupport) {
     group.delete()
}

// or 

if (group is MiraiGroup) {
    group.delete()
}

其次,为 Group 的标准API直接实现 DeleteSupport 将会列入讨论,参考并追踪 https://github.com/ForteScarlet/simpler-robot/issues/422