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

Plugin: 插件响应鉴权 #2726

Closed
cubstaryow opened this issue May 21, 2024 · 23 comments · Fixed by #2727
Closed

Plugin: 插件响应鉴权 #2726

cubstaryow opened this issue May 21, 2024 · 23 comments · Fixed by #2727
Labels
Plugin Publish Plugin

Comments

@cubstaryow
Copy link
Contributor

PyPI 项目名

nonebot-plugin-authrespond

插件 import 包名

nonebot_plugin_authrespond

标签

[{"label":"黑名单","color":"#e81616"},{"label":"cubplugins","color":"#28a5d1"},{"label":"权限控制","color":"#c75d59"}]

插件配置项

No response

@cubstaryow cubstaryow added the Plugin Publish Plugin label May 21, 2024
@noneflow
Copy link
Contributor

noneflow bot commented May 21, 2024

📃 商店发布检查结果

Plugin: 插件响应鉴权

✅ 所有测试通过,一切准备就绪!

详情
  • ✅ 项目 nonebot-plugin-authrespond 已发布至 PyPI。
  • ✅ 项目 主页 返回状态码 200。
  • ✅ 标签: 黑名单-#e81616, cubplugins-#28a5d1, 权限控制-#c75d59。
  • ✅ 插件类型: application。
  • ✅ 插件支持的适配器: nonebot.adapters.console, nonebot.adapters.discord, nonebot.adapters.dodo, nonebot.adapters.feishu, nonebot.adapters.kaiheila, nonebot.adapters.onebot.v11, nonebot.adapters.onebot.v12, nonebot.adapters.qq, nonebot.adapters.red, nonebot.adapters.satori, nonebot.adapters.telegram。
  • ✅ 插件 加载测试 通过。

  • 💡 如需修改信息,请直接修改 issue,机器人会自动更新检查结果。
    💡 当插件加载测试失败时,请发布新版本后在当前页面下评论任意内容以触发测试。

    ♻️ 评论已更新至最新检查结果

    💪 Powered by NoneFlow

    @noneflow noneflow bot changed the title Plugin: nonebot-plugin-authrespond Plugin: 插件响应鉴权 May 21, 2024
    @RF-Tar-Railt
    Copy link
    Member

    RF-Tar-Railt commented May 21, 2024

    第一,你这个插件完全可以使用 plugin-session 来判断会话等级,而不是强依赖于onebot11适配器的GroupMessageEvent,让你这个插件只能在ob11下使用。我推荐你换用 nonebot-plugin-session

    第二,你使用的 on_regex 的正则表达式里面存在泛匹配 (.*),在特殊情况下这会对机器人性能造成很大影响。请换用精准一点的表达式(例如 [\w|-]*)

    @cubstaryow
    Copy link
    Contributor Author

    第一,你这个插件完全可以使用 plugin-session 来判断会话等级,而不是强依赖于onebot11适配器的GroupMessageEvent,让你这个插件只能在ob11下使用。我推荐你换用 nonebot-plugin-session

    第二,你使用的 on_regex 的正则表达式里面存在泛匹配 (.*),在特殊情况下这会对机器人性能造成很大影响。请换用精准一点的表达式(例如 [\w|-]*)

    行,下个版本整x

    @cubstaryow
    Copy link
    Contributor Author

    已更新

    @RF-Tar-Railt
    Copy link
    Member

    你插件有一部分拿at的,可以去用plugin-alconna的UniMessage去提取At

    @cubstaryow
    Copy link
    Contributor Author

    你插件有一部分拿at的,可以去用plugin-alconna的UniMessage去提取At

    谢谢,正发愁呢x

    @cubstaryow
    Copy link
    Contributor Author

    已更新x

    @yanyongyu
    Copy link
    Member

    supported_adapters 请使用 inherit_supported_adapters 从依赖的插件继承。在使用第三方插件时需要先require,最好把 require 放在插件最初导入的部分。

    @cubstaryow
    Copy link
    Contributor Author

    已更新

    @yanyongyu
    Copy link
    Member

    你同时用了alconna和session插件,你应该同时继承他们两个支持的适配器列表,直接添加inherit_supported_adapters的参数即可。

    @cubstaryow
    Copy link
    Contributor Author

    已更新

    @yanyongyu
    Copy link
    Member

    等下我漏看了一个,你还要继承localstore的(((

    @cubstaryow
    Copy link
    Contributor Author

    等下我漏看了一个,你还要继承localstore的(((

    loaclstore不是本地插件数据吗,好像和适配器没关系吧(

    @yanyongyu
    Copy link
    Member

    哪怕他和适配器没关系也需要继承,因为他也是插件

    @cubstaryow
    Copy link
    Contributor Author

    哪怕他和适配器没关系也需要继承,因为他也是插件

    行,更新了

    @noneflow noneflow bot changed the title Plugin: 插件响应鉴权 Plugin: nonebot-plugin-authrespond May 25, 2024
    @noneflow noneflow bot changed the title Plugin: nonebot-plugin-authrespond Plugin: 插件响应鉴权 May 25, 2024
    @noneflow noneflow bot changed the title Plugin: 插件响应鉴权 Plugin: nonebot-plugin-authrespond May 25, 2024
    @yanyongyu
    Copy link
    Member

    你没有require localstore。。

    @cubstaryow
    Copy link
    Contributor Author

    你没有require localstore。。

    在plugins_data里,启动时若配置不存在启用 localstore ,若配置存在则不会使用localstore(import和require都不会执行)

    @yanyongyu
    Copy link
    Member

    如果你可能使用一个插件就需要声明依赖,哪怕不使用

    @cubstaryow
    Copy link
    Contributor Author

    如果你可能使用一个插件就需要声明依赖,哪怕不使用

    但是声明在plugins_data里(

    Copy link
    Member

    你需要在 inherit 前声明依赖

    @cubstaryow
    Copy link
    Contributor Author

    你需要在 继承 前声明依赖

    哦,懂了,马上去修)

    @cubstaryow
    Copy link
    Contributor Author

    已修复

    @yanyongyu
    Copy link
    Member

    /update

    @noneflow noneflow bot changed the title Plugin: nonebot-plugin-authrespond Plugin: 插件响应鉴权 May 25, 2024
    @noneflow noneflow bot closed this as completed in #2727 May 25, 2024
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Labels
    Plugin Publish Plugin
    Development

    Successfully merging a pull request may close this issue.

    3 participants