Closed gaoxinke88888888 closed 2 years ago
如果是使用的 boot,即通过 *.bot
文件配置,则增加配置项config.recallMessageCacheStrategy=MEMORY_LRU
:
{
"component": "simbot.mirai",
"code": 123456,
"password": "xxxxxx",
"config": {
"recallMessageCacheStrategy": "MEMORY_LRU"
}
}
如果使用的核心模式,使用属性 recallCacheStrategy = MemoryLruMiraiRecallMessageCacheStrategy()
:
val bot = register(
code = 12345678,
password = "password",
createMiraiBotConfiguration {
recallCacheStrategy = MemoryLruMiraiRecallMessageCacheStrategy()
}
)
bot.start()
// ....
在 #39 之后有效。参考 v3.0.0.0.preview.10.0
thank you very much
使用MiraiGroupMessageRecallEvent监听消息撤回事件能够成功监听,但是我试图获取被撤回的消息内容时为空,是否是没有打开消息缓存导致的?如果是的话请问如何打开。