Skip to content
New issue

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

🐛 deal with qqguild audit exception #106

Closed
wants to merge 12 commits into from

Conversation

Dreamail
Copy link
Contributor

No description provided.

@netlify
Copy link

netlify bot commented Oct 21, 2023

👷 Deploy request for send-anything-anywhere pending review.

Visit the deploys page to approve it

Name Link
🔨 Latest commit 9a1cfd0

@codecov
Copy link

codecov bot commented Oct 21, 2023

Codecov Report

Attention: 15 lines in your changes are missing coverage. Please review.

Comparison is base (25c4f8e) 95.30% compared to head (9a1cfd0) 94.74%.
Report is 7 commits behind head on main.

Files Patch % Lines
nonebot_plugin_saa/adapters/qq.py 91.42% 9 Missing ⚠️
nonebot_plugin_saa/adapters/qqguild.py 72.22% 5 Missing ⚠️
nonebot_plugin_saa/auto_select_bot.py 90.90% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #106      +/-   ##
==========================================
- Coverage   95.30%   94.74%   -0.56%     
==========================================
  Files          23       24       +1     
  Lines        1511     1638     +127     
==========================================
+ Hits         1440     1552     +112     
- Misses         71       86      +15     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@felinae98
Copy link
Collaborator

(最好补充一点测试?

@Dreamail
Copy link
Contributor Author

(最好补充一点测试?

咱不太会用nonebug(
这个pr就是解决一下当QQ频道Bot发送消息是返回的MessageAudited报错

实际上这不算是报错,就是需要消息被人工审核,但是上游adapter会raise一个exception,然后回调不了
该pr在调用post messages之后等待返回审核结果,再返回send函数

@felinae98
Copy link
Collaborator

所以消息被人工审核后回 raise 一个 exception?

@Dreamail
Copy link
Contributor Author

所以消息被人工审核后回 raise 一个 exception?

发出消息,开始人工审核会返回messageaudited事件,adapter会直接丢出一个exception
审核成功或失败会再触发一个一个事件,可以通过上面那个exception来获取审核结果事件

@Dreamail
Copy link
Contributor Author

忘记开个新分支再提pr了
先close了

@Dreamail Dreamail closed this Nov 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants