Sitelet https://github.com/QingchenWait/astrbot_plugin_token_controller/pull/2
Skip to content

feat: 支持黑名单限流模式 - #2

Open
PhiLia011 wants to merge 1 commit into
QingchenWait:mainfrom
PhiLia011:limit-mode
Open

PhiLia011 wants to merge 1 commit into
QingchenWait:mainfrom
PhiLia011:limit-mode

Conversation

@PhiLia011

Copy link
Copy Markdown

目前的「需要限流的 QQ 群聊列表」只能指定要限流的群,反过来「除了这几个群,其他群全限流」这种场景没法配置。

改动:

  • 新增 limit_mode 配置项:
    • whitelist(默认,保持原行为):仅列表内的群受限流
    • blacklist:列表内的群不限流,其余 QQ 群全部限流
  • 限流判定统一走 _group_in_scope(),两处判定点已改为调用它
  • 面板新增一个快捷切换按钮,点一下就能在白/黑名单之间切换,状态栏也会显示当前模式
  • 黑名单模式下面板会额外并入已单独配置过的群,避免这些群在面板里看不到、管不了

默认值是 whitelist,不影响现有配置。

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.

1 participant