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

适配qq适配器 #105

Merged
merged 10 commits into from
Dec 8, 2023
Merged

适配qq适配器 #105

merged 10 commits into from
Dec 8, 2023

Conversation

AzideCupric
Copy link
Contributor

No description provided.

@netlify
Copy link

netlify bot commented Oct 21, 2023

Deploy Preview for send-anything-anywhere failed.

Name Link
🔨 Latest commit ad86cec
🔍 Latest deploy log https://app.netlify.com/sites/send-anything-anywhere/deploys/657335ebede4eb00082ee708

@codecov
Copy link

codecov bot commented Oct 21, 2023

Codecov Report

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

Comparison is base (46c5458) 95.87% compared to head (ad86cec) 95.86%.
Report is 3 commits behind head on main.

Files Patch % Lines
nonebot_plugin_saa/adapters/qq.py 95.23% 5 Missing ⚠️
...ebot_plugin_saa/registries/platform_send_target.py 92.30% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #105      +/-   ##
==========================================
- Coverage   95.87%   95.86%   -0.01%     
==========================================
  Files          24       25       +1     
  Lines        1697     1814     +117     
==========================================
+ Hits         1627     1739     +112     
- Misses         70       75       +5     

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

@felinae98
Copy link
Collaborator

新开一个 qq 的 adapter 吧

@AzideCupric AzideCupric force-pushed the feat/adapter-qq branch 2 times, most recently from 519523a to 1bafa20 Compare October 23, 2023 13:42
tests/test_qq.py Outdated Show resolved Hide resolved
pyproject.toml Outdated Show resolved Hide resolved
Copy link
Contributor

@mobyw mobyw left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

mention_user 参数类型改成 str

nonebot_plugin_saa/auto_select_bot.py Outdated Show resolved Hide resolved
pyproject.toml Outdated Show resolved Hide resolved
@he0119 he0119 changed the title ✨ 适配qq适配器的guild部分 ✨ 适配qq适配器 Oct 25, 2023
Copy link
Collaborator

@felinae98 felinae98 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

现在仅支持频道?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

为啥这个要改名

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

为啥这个要改名

原来的这个测试就是在测试自动选择qq guild的bot,对应了一下

@AzideCupric
Copy link
Contributor Author

AzideCupric commented Oct 30, 2023

现在仅支持频道?

歪日佬写了群部分,不过没有token测试

@mobyw
Copy link
Contributor

mobyw commented Nov 15, 2023

adapter-qq v1.3.0 的 QQ 群场景中 group_openidopenid 都不再是数字字符串了,TargetQQPrivate TargetQQGroup 的模型都需要修改

@Dreamail
Copy link
Contributor

群聊权限已经部分开启了,等一个pr合并

@Dreamail
Copy link
Contributor

Dreamail commented Nov 17, 2023

给这个pr开了个新的pr(
应该修得差不多了,不过上游adapter也有点问题(提了pr等开发者合并

edit:adapter-qq已经合并我的修复了

* ✨ 适配QQ适配器的频道部分

* 🚨 auto fix by pre-commit hooks

* 📝 元数据添加QQ适配器支持

* 🐛 Mention user_id为str而非int

* ✨ 支持发送群聊和私聊消息

* ✅ 修复 qq auto select bot 测试

* ➖ 移除多余依赖

* 🔥 删除多余日志

* ⬇️ update poetry lock

* 🐛 取消版本限制

* ✨ Use openid target in qq adapter

* ✨ Format openid models

* 🚨 auto fix by pre-commit hooks

* 🚨 auto fix by pre-commit hooks

* ✅ Add auto select bot test for openid targets

* 🔥 Remove unused platform enum

* 🎨 Rename extractor typevar

* 🎨 Replace name with length in extrator param detection

* ✅ Add tests of qqgroup and target dependency injection

* ✅ Update qq dependency injection test

---------

Co-authored-by: AzideCupric <[email protected]>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: uy_sun <[email protected]>
@mobyw
Copy link
Contributor

mobyw commented Nov 28, 2023

README 是不是也要改一下。添加一下支持的 adapter 和对应消息类型;支持的发送目标要加一下 BotSpecifier 目标;extract_target 用法也要说明一下针对 BotSpecifier 目标要传入 bot,否则会 raise RuntimeError

@felinae98
Copy link
Collaborator

确实要改一下

@felinae98 felinae98 added the enhancement New feature or request label Dec 8, 2023
@felinae98 felinae98 changed the title ✨ 适配qq适配器 适配qq适配器 Dec 8, 2023
@felinae98 felinae98 merged commit 6985677 into main Dec 8, 2023
15 of 19 checks passed
@felinae98 felinae98 deleted the feat/adapter-qq branch December 8, 2023 15:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants