请问有办法撤回引用回复的消息吗? #112
-
涉及的编程语言Java 涉及的组件库No response 疑问描述比如我在回复一条想要撤回的消息时触发监听,有办法获取并且撤回那一条回复的消息吗? |
Beta Was this translation helpful? Give feedback.
Answered by
ForteScarlet
Mar 21, 2023
Replies: 1 comment 1 reply
-
至于撤回它,直接使用mirai原生的API: // 得到 '消息引用'
MiraiQuoteReply miraiQuoteReply = groupMessageEvent.getMessageContent().getMessages().getFirstOrNull(MiraiQuoteReply.Key);
if (miraiQuoteReply == null) {
// TODO if null
return;
}
// 直接使用mirai的api
MessageSource source = miraiQuoteReply.getOriginalMiraiMessage().getSource();
MessageSource.recall(source); |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
ForteScarlet
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
消息引用
类型的消息:https://docs.simbot.forte.love/components/mirai/simbot-component-mirai-core/love.forte.simbot.component.mirai.message/-mirai-quote-reply/index.html至于撤回它,直接使用mirai原生的API: