-
Notifications
You must be signed in to change notification settings - Fork 607
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
✨ 添加自动同意群组请求 #1848
base: main
Are you sure you want to change the base?
✨ 添加自动同意群组请求 #1848
Conversation
Sourcery 审查者指南此 PR 实现了自动群邀请批准功能,与现有的好友请求处理并行。这些更改更新了配置设置,添加了异步延迟,改进了机器人数据源的日志记录和错误处理,优化了请求管理以返回结果以供进一步处理,并引入了一个新的依赖项。 FgRequest 方法的更新类图classDiagram
class FgRequest {
+approve(bot: Bot, id: int) Self
+refused(bot: Bot, id: int) Self
+ignore(id: int) Self
-_handle_request(bot: Bot|None, id: int, handle_type: RequestHandleType) Self
}
note for FgRequest "Methods now return the request object for further processing"
文件级别更改
提示和命令与 Sourcery 互动
自定义您的体验访问您的 仪表板 以:
获取帮助Original review guide in EnglishReviewer's Guide by SourceryThis PR implements automatic group invite approval alongside existing friend request handling. The changes update configuration settings, add asynchronous delays, improve logging and error handling for bot data sources, refine request management to return results for further processing, and introduce a new dependency. Updated class diagram for FgRequest methodsclassDiagram
class FgRequest {
+approve(bot: Bot, id: int) Self
+refused(bot: Bot, id: int) Self
+ignore(id: int) Self
-_handle_request(bot: Bot|None, id: int, handle_type: RequestHandleType) Self
}
note for FgRequest "Methods now return the request object for further processing"
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
嘿 @HibiKier - 我已经查看了你的更改 - 这里有一些反馈:
总体评论:
- 考虑添加一条注释,解释为什么在
record_request.py
中需要asyncio.sleep
调用。 - 在
fg_request.py
中,即使发生异常,_handle_request
方法也应该始终如一地返回值。
以下是我在审查期间查看的内容
- 🟢 一般问题:一切看起来都很好
- 🟢 安全性:一切看起来都很好
- 🟢 测试:一切看起来都很好
- 🟢 复杂性:一切看起来都很好
- 🟢 文档:一切看起来都很好
帮助我更有用!请点击每个评论上的 👍 或 👎,我将使用反馈来改进你的评论。
Original comment in English
Hey @HibiKier - I've reviewed your changes - here's some feedback:
Overall Comments:
- Consider adding a comment explaining why the
asyncio.sleep
call is necessary inrecord_request.py
. - In
fg_request.py
, the_handle_request
method should consistently return a value, even when an exception occurs.
Here's what I looked at during the review
- 🟢 General issues: all looks good
- 🟢 Security: all looks good
- 🟢 Testing: all looks good
- 🟢 Complexity: all looks good
- 🟢 Documentation: all looks good
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
) | ||
try: | ||
select_bot.group_count = len( | ||
(await PlatformUtils.get_group_list(select_bot.bot, True))[0] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
使用asyncio.gather获取
No description provided.