simple-robot / simpler-robot

Simple Robot,一个bot风格的Kotlin多平台事件调度框架,异步高效、Java友好!/ A Bot-style Kotlin Multiplatform event scheduling framework, asynchronous and high-performance, java-friendly! 🐱😼😻😸
https://simbot.forte.love
GNU Lesser General Public License v3.0
512 stars 44 forks source link

v3bot主动退群api #421

Closed enchantedyou closed 2 years ago

enchantedyou commented 2 years ago

版本号

3.0.0-beta-RC-SNAPSHOT

疑问描述

image

请问v3有关于机器人主动退群的api吗,场景是机器人被恶意使用后主动退出群组并拉黑

ForteScarlet commented 2 years ago

这似乎是一个疏漏,组件实际上应该至少为 MiraiGroup 类型实现相关API,请追踪 https://github.com/simple-robot/simbot-component-mirai/issues/63

目前,可以通过如下方式临时解决:

// 指定群聊对象
Group group = ...;

if (group instanceof MiraiGroup) {
    ((MiraiGroup) group).getOriginalContact().quit();
}
enchantedyou commented 2 years ago

收到