We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
如图 16:06分时别人发了重置会话 ,它突然转发给了自己 然后就开始重复自己对话 几个小时就烧光了40刀的API 并且触发了QQ的风控 被封了一天 第二天重新登陆 又出现这个情况 再次烧了10刀。。。 能否避免自己和自己发消息,QQ上面好像没办法把自己拉黑。
The text was updated successfully, but these errors were encountered:
在com.ashin.handler 的QqMessageHandler.java下 更新以下代码 过滤自己和自己发消息
@EventHandler public void onFriendMessageEvent(FriendMessageEvent event){ // 检查消息发送者是否是机器人自身 if (event.getSubject().getId() == event.getBot().getId()) { return; // 如果是机器人自己发的消息,直接返回,不处理 } ChatBO chatBO = new ChatBO(); chatBO.setSessionId(String.valueOf(event.getSubject().getId())); String prompt = event.getMessage().contentToString().trim(); response(event, chatBO, prompt); } @EventHandler public void onGroupMessageEvent(GroupMessageEvent event){ // 检查消息发送者是否是机器人自身 if (event.getSubject().getId() == event.getBot().getId()) { return; // 如果是机器人自己发的消息,直接返回,不处理 } ChatBO chatBO = new ChatBO(); chatBO.setSessionId(String.valueOf(event.getSubject().getId())); if (event.getMessage().contains(new At(event.getBot().getId()))) { String prompt = event.getMessage().contentToString().replace("@" + event.getBot().getId(), "").trim(); response(event, chatBO, prompt); } }
Sorry, something went wrong.
No branches or pull requests
如图 16:06分时别人发了重置会话 ,它突然转发给了自己
然后就开始重复自己对话 几个小时就烧光了40刀的API 并且触发了QQ的风控 被封了一天
第二天重新登陆 又出现这个情况 再次烧了10刀。。。
能否避免自己和自己发消息,QQ上面好像没办法把自己拉黑。
The text was updated successfully, but these errors were encountered: