Skip to content

feat(CaiBotLite): 添加命令/cbl group <群号>和/cbl whitelist方便配置插件#969

Merged
ACaiCat merged 3 commits intomasterfrom
cai_dev
Jun 5, 2025
Merged

feat(CaiBotLite): 添加命令/cbl group <群号>和/cbl whitelist方便配置插件#969
ACaiCat merged 3 commits intomasterfrom
cai_dev

Conversation

@ACaiCat
Copy link
Copy Markdown
Member

@ACaiCat ACaiCat commented Jun 4, 2025

更新插件/修复BUG

  • 插件已修改版本号
  • 更新插件README.md中的更新日志
  • 插件可以正常工作

其他

  • ❤️熙恩我喜欢你

好的,这是翻译成中文的 pull request 总结:

Sourcery 总结

添加命令以配置白名单和通知群组,提升版本号,强制完整错误日志记录,并更新文档

新功能:

  • 引入 /cbl whitelist 命令以切换白名单模式
  • 引入 /cbl group <群号> 命令以设置通知群组 ID

增强功能:

  • 插件版本提升至 v2025.06.04.1
  • 在重新连接尝试期间始终记录完整的异常堆栈

文档:

  • 更新 README 以记录新命令并修改表格格式
  • 为版本 2025.06.04.1 添加新的更新日志条目
Original summary in English

Summary by Sourcery

Add commands to configure whitelist and notification group, bump version, enforce full error logging, and update documentation

New Features:

  • Introduce /cbl whitelist command to toggle whitelist mode
  • Introduce /cbl group <群号> command to set notification group ID

Enhancements:

  • Bump plugin version to v2025.06.04.1
  • Always log full exception stack during reconnect attempts

Documentation:

  • Update README to document new commands and revise table formatting
  • Add new changelog entry for version 2025.06.04.1

@sourcery-ai
Copy link
Copy Markdown
Contributor

sourcery-ai bot commented Jun 4, 2025

## 审查者指南

此 PR 更新了插件版本,简化了错误日志记录,使用 /cbl whitelist 和 /cbl group 扩展了命令集(包括帮助文本和配置处理),并相应地调整了 README。

#### 插件和配置更改的类图

```mermaid
classDiagram
    class Plugin {
        +VersionNum: Version
        -GeneralHooksOnReloadEvent(ReloadEventArgs e) void
        #ShowHelpText() void
        +HandleCblCommand(CommandArgs args) void
    }
    class ConfigSettings {
        +WhiteList: bool
        +GroupNumber: long
        +Write() void
    }
    Plugin --> ConfigSettings : uses

文件级别更改

变更 详情 文件
升级插件版本
  • 将 VersionNum 增加到 2025.06.04.1
src/CaiBotLite/Plugin.cs
简化异常日志记录
  • 删除条件 DebugMode 日志记录分支
  • 始终通过 ex.ToString() 记录完整异常
src/CaiBotLite/Plugin.cs
更新帮助文本列表初始化器和命令条目
  • 将集合初始化器从 {} 切换到 []
  • 添加 /caibotlite whitelist 和 /caibotlite group 条目
src/CaiBotLite/Plugin.cs
实现 /cbl whitelist 和 /cbl group 命令处理程序
  • 切换并持久化白名单设置
  • 解析、验证和存储组号
  • 发送上下文相关的成功和错误消息
src/CaiBotLite/Plugin.cs
使用新命令和变更日志更新 README
  • 将白名单和组命令添加到命令表
  • 在变更日志中附加新的版本条目
src/CaiBotLite/README.md

提示和命令

与 Sourcery 互动

  • 触发新的审查: 在 pull request 上评论 @sourcery-ai review
  • 继续讨论: 直接回复 Sourcery 的审查评论。
  • 从审查评论生成 GitHub issue: 通过回复审查评论,要求 Sourcery 从审查评论创建一个 issue。您也可以回复审查评论并使用 @sourcery-ai issue 从中创建一个 issue。
  • 生成 pull request 标题: 在 pull request 标题中的任何位置写入 @sourcery-ai 以随时生成标题。您也可以在 pull request 上评论 @sourcery-ai title 以随时(重新)生成标题。
  • 生成 pull request 摘要: 在 pull request 正文中的任何位置写入 @sourcery-ai summary 以随时在您想要的位置生成 PR 摘要。您也可以在 pull request 上评论 @sourcery-ai summary 以随时(重新)生成摘要。
  • 生成审查者指南: 在 pull request 上评论 @sourcery-ai guide 以随时(重新)生成审查者指南。
  • 解决所有 Sourcery 评论: 在 pull request 上评论 @sourcery-ai resolve 以解决所有 Sourcery 评论。如果您已经处理了所有评论并且不想再看到它们,这将非常有用。
  • 驳回所有 Sourcery 审查: 在 pull request 上评论 @sourcery-ai dismiss 以驳回所有现有的 Sourcery 审查。如果您想从新的审查开始,这将特别有用 - 不要忘记评论 @sourcery-ai review 以触发新的审查!

自定义您的体验

访问您的 dashboard 以:

  • 启用或禁用审查功能,例如 Sourcery 生成的 pull request 摘要、审查者指南等。
  • 更改审查语言。
  • 添加、删除或编辑自定义审查说明。
  • 调整其他审查设置。

获取帮助

```
Original review guide in English

Reviewer's Guide

This PR updates the plugin version, streamlines error logging, extends the command set with /cbl whitelist and /cbl group (including help text and config handling), and aligns the README accordingly.

Class Diagram for Plugin and Configuration Changes

classDiagram
    class Plugin {
        +VersionNum: Version
        -GeneralHooksOnReloadEvent(ReloadEventArgs e) void
        #ShowHelpText() void
        +HandleCblCommand(CommandArgs args) void
    }
    class ConfigSettings {
        +WhiteList: bool
        +GroupNumber: long
        +Write() void
    }
    Plugin --> ConfigSettings : uses
Loading

File-Level Changes

Change Details Files
Bumped plugin version
  • Incremented VersionNum to 2025.06.04.1
src/CaiBotLite/Plugin.cs
Streamlined exception logging
  • Removed conditional DebugMode logging branches
  • Always log full exception via ex.ToString()
src/CaiBotLite/Plugin.cs
Updated help text list initializer and command entries
  • Switched collection initializer from {} to []
  • Added /caibotlite whitelist and /caibotlite group entries
src/CaiBotLite/Plugin.cs
Implemented /cbl whitelist and /cbl group command handlers
  • Toggled and persisted whitelist setting
  • Parsed, validated, and stored group number
  • Sent contextual success and error messages
src/CaiBotLite/Plugin.cs
Updated README with new commands and changelog
  • Added whitelist and group commands to command table
  • Appended new version entry in changelog
src/CaiBotLite/README.md

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

Copy link
Copy Markdown
Contributor

@sourcery-ai sourcery-ai bot left a comment

Choose a reason for hiding this comment

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

@ACaiCat - 我已经审查了你的更改,发现了一些需要解决的问题。

阻塞问题:

  • 不能将属性用作 out 参数。(链接)
以下是我在审查期间查看的内容
  • 🔴 一般问题: 1 个阻塞问题
  • 🟢 安全性: 一切看起来都很好
  • 🟢 测试: 一切看起来都很好
  • 🟢 文档: 一切看起来都很好

Sourcery 对开源是免费的 - 如果你喜欢我们的评论,请考虑分享它们 ✨
帮助我变得更有用!请点击每个评论上的 👍 或 👎,我将使用反馈来改进你的评论。
Original comment in English

Hey @ACaiCat - I've reviewed your changes and found some issues that need to be addressed.

Blocking issues:

  • Cannot use a property as an out parameter. (link)
Here's what I looked at during the review
  • 🔴 General issues: 1 blocking issue
  • 🟢 Security: all looks good
  • 🟢 Testing: all looks good
  • 🟢 Documentation: all looks good

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

@ACaiCat ACaiCat requested a review from a team June 4, 2025 15:42
@ACaiCat ACaiCat linked an issue Jun 4, 2025 that may be closed by this pull request
@ACaiCat ACaiCat added this pull request to the merge queue Jun 5, 2025
Merged via the queue into master with commit 9239719 Jun 5, 2025
2 checks passed
@ACaiCat ACaiCat changed the title feat(CaiBotList): 添加命令/cbl group <群号>和/cbl whitelist方便配置插件 feat(CaiBotLite): 添加命令/cbl group <群号>和/cbl whitelist方便配置插件 Jun 16, 2025
@ACaiCat ACaiCat deleted the cai_dev branch June 23, 2025 00:15
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.

[Feat] bwl命令修改群号白名单开关

2 participants