diff --git a/README.md b/README.md index 239672c..90d36e7 100644 --- a/README.md +++ b/README.md @@ -1,9 +1,10 @@ # Evil Gemira +A Mirai Console Plugin ### 本插件提供的功能 -* 防止撤回 +* 防止撤回,自动将撤回内容重新发布到群中并@发布人(请注意,被管理员撤回的内容将会被本插件忽略) * ~~将撤回内容保存到本地 (硬编码中默认关闭,需要开启此功能请修改代码并编译自己的版本)~~ * 保存到本地的功能先摆了 -* ~~这个插件的测试也先摆了,因为本地测试号又登不上了,继续搞下去我会emo到明年春节去~~ +* ~~这个插件的测试也先摆了,emo中谁爱怎么弄怎么弄吧~~ ### 为什么要有这个插件? ``` null好像在群里发了双丁然后撤回了。 diff --git a/src/main/kotlin/love/marblegate/evilgemira/EvilService.kt b/src/main/kotlin/love/marblegate/evilgemira/EvilService.kt index 48ee4d4..2f2f23b 100644 --- a/src/main/kotlin/love/marblegate/evilgemira/EvilService.kt +++ b/src/main/kotlin/love/marblegate/evilgemira/EvilService.kt @@ -1,2 +1,9 @@ package love.marblegate.evilgemira +import net.mamoe.mirai.message.data.MessageChain + +object EvilService{ + fun MessageChain.saveTo(path: String){ + // TODO + } +} diff --git a/src/main/kotlin/love/marblegate/evilgemira/GemiraService.kt b/src/main/kotlin/love/marblegate/evilgemira/GemiraService.kt index 1eb8a5e..f833707 100644 --- a/src/main/kotlin/love/marblegate/evilgemira/GemiraService.kt +++ b/src/main/kotlin/love/marblegate/evilgemira/GemiraService.kt @@ -3,6 +3,7 @@ package love.marblegate.evilgemira import kotlinx.coroutines.CoroutineScope import kotlinx.coroutines.Dispatchers import kotlinx.coroutines.launch +import love.marblegate.evilgemira.EvilService.saveTo import net.mamoe.mirai.event.events.GroupMessageEvent import net.mamoe.mirai.event.events.MessageRecallEvent import net.mamoe.mirai.message.data.* @@ -69,7 +70,8 @@ object GemiraService { return true } - private fun save(event: GroupMessageEvent) { + private fun save(message: MessageChain) { + message.saveTo("TODO") // TODO use EvilService shit to save content to local } } \ No newline at end of file