Asynchronous multi-platform robot framework written in Python

Overview

nonebot

NoneBot

跨平台 Python 异步机器人框架

license pypi python
cqhttp ding feishu QQ频道
QQ Chat Telegram Channel Discord Server

文档 · 安装 · 开始使用 · 文档打不开?

简介

NoneBot2 是一个现代、跨平台、可扩展的 Python 聊天机器人框架,它基于 Python 的类型注解和异步特性,能够为你的需求实现提供便捷灵活的支持。

特色

  • 异步优先:基于 Python 的异步特性,即使是非常大量的消息,也能吞吐自如
  • 易于开发:配合 NB-CLI 脚手架,代码编写上手简单,没有过多的冗余代码,可以让开发者专注于业务逻辑
  • 生而可靠:100% 类型注解覆盖,配合编辑器的类型推导功能,能将绝大多数的 Bug 杜绝在编辑器中 (编辑器支持)
  • 社区丰富:社区用户众多,直接和间接用户超过十万人,每天都有大量的活跃用户 (社区资源)
  • 海纳百川:一个框架,支持多个聊天软件平台,可自定义通信协议
  • 坚实后盾:支持多种 web 框架,可自定义替换

更多:概览

什么不是 NoneBot2

NoneBot2 不是某个平台或者协议的具体实现,它只负责和已有协议适配器通信,并处理接收到的事件。所以,“NoneBot 有 blabla 平台的 blabla 功能吗?”这种问题是与 NoneBot2 无关的。请在相应平台的功能文档中确认,或与相应平台的协议适配开发者联系。

NoneBot2 不是 NoneBot1 的替代品。事实上,它们都在被积极的维护着。但是,如果你想尝试一些新功能,或者想要支持更多的平台,可以考虑使用 NoneBot2。

NoneBot2 和 NoneBot1 的区别,就像是 VisualStudio Code 和 VisualStudio 一样

即刻开始

完整文档可以在 这里 查看。

懒得看文档?下面是快速安装指南:

  1. (强烈建议)使用你喜欢的 Python 环境管理工具创建新的虚拟环境。

  2. 使用 pip (或其他) 安装 NoneBot 脚手架。

    pip install nb-cli
  3. 使用脚手架创建项目

    nb create

社区资源

常见问题

教程/实际项目/经验分享

插件

此外,NoneBot2 还有丰富的官方以及第三方现成的插件供大家使用:

许可证

NoneBot 采用 MIT 许可证进行开源

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

贡献

如果你在使用过程中发现任何问题,可以 提交 Issue 或自行 Fork 修改后提交 Pull Request。

如果你要提交 Pull Request,请确保你的代码风格和项目已有的代码保持一致,遵循 PEP 8PEP 484,变量命名清晰,有适当的注释与测试代码,并且请以 dev 分支作为 Pull Request 目标分支

鸣谢

感谢以下开发者对 NoneBot2 作出的贡献:

Comments
  • Docs: 移除商店中的过期插件

    Docs: 移除商店中的过期插件

    移除商店中的过期插件

    不知不觉 NoneBot2 已经进入 beta 一个多月,值此 beta2 版本发布之际,我们计划将插件商店中仍未适配 beta 更新的插件移除,在此处列出名单以告知作者,如有错误请回复。

    列表

    Git 已适配但未在 PyPI 发版(Warning)

    nonebot-plugin-setu @ayanamiblhx nonebot-plugin-filehost @mnixry nonebot-plugin-leetcode @zxz0415 nonebot-plugin-picsbank @Diaosi1111

    未适配

    依赖问题

    beta2 Config 问题

    nonebot-plugin-pixivrank-search @HibiKier nonebot-plugin-heisi @yzyyz1387 nonebot-plugin-admin @yzyyz1387

    其他

    nonebot-plugin-vf @snowyfirefly 代码未托管在 GitHub,懒得管

    待删除

    nonebot-plugin-test @yanyongyu nonebot-plugin-web @abrahum nonebot-plugin-ipypreter @iyume nonebot-plugin-arcaea @iyume nonebot-plugin-statistical @HibiKier nonebot-plugin-workscore @yzyyz1387 nonebot-plugin-nokia @kexue-z nonebot-plugin-pctrl @CherryGS

    已删除

    nonebot-plugin-hanayori @kanomahoro nonebot-plugin-simplemusic @kanomahoro nonebot-plugin-twitter @kanomahoro

    数据来源

    Lancercmd/nonebot2-store-test

    documentation 
    opened by j1g5awi 55
  • Feature: 推广基于 PEP 420 的命名空间插件

    Feature: 推广基于 PEP 420 的命名空间插件

    现状

    目前插件若通过 nonebot.load_pluginnonebot.load_plugins 加载,可能会导致出现这种代码:

    nonebot.load_plugin('nonebot_plugin_status')
    nonebot.load_plugin('nonebot_plugin_apscheduler')
    nonebot.load_plugin('nonebot_plugin_picsearcher')
    nonebot.load_plugin('nonebot_plugin_translator')
    nonebot.load_plugin('nonebot_plugin_cooldown')
    ...
    nonebot.load_plugins('plugins')
    

    其中存在这样几个问题:

    1. 重复代码
    2. 插件名字里的下划线很丑!
    3. 在每次新安装插件后都需要相应地修改代码,无法自动发现新安装的插件

    其中第一项虽然可以通过 nonebot.load_all_plugins, nonebot.load_from_jsonnonebot.load_from_toml 解决,但剩余问题仍然存在。

    可能的解决方案

    插件作者方面

    依照 PEP 420 修改插件文件布局。例如:

    pyproject.toml
    nonebot/
        plugins/
            foo.py
            bar.py
    

    框架方面

    若需解决上述第二个问题

    插件作者修改文件布局后,插件可以在通过 pip 安装后直接使用目前的 nonebot.load_builtin_plugins 导入,例如:

    nonebot.load_builtin_plugins('foo')
    nonebot.load_builtin_plugins('bar')
    

    考虑到函数名的问题,以及多次调用同一函数带来的不便,可以定义以下函数:

    def load_namespace_plugins(names: list[str]) -> list[Plugin]:
        loaded_plugins = [load_builtin_plugins(name) for name in names]
        return loaded_plugins
    

    若需进一步解决上述第三个问题

    通过 pkgutil.iter_modules 等函数获得 nonebot.plugins 下的所有模块,并自动加载。

    该解决方案的缺点

    1. 由于目前已有数十个插件,向命名空间插件迁移需要一定的时间与人力成本
    2. 需要同时支持新旧两种风格的插件,需要额外的维护成本
    3. 没有养成创建虚拟环境的好习惯的人可能会意外加载不需要的插件

    其中第一项随着时间的推移可以慢慢解决,且迁移仅需更改文件夹结构,难度较小。第二项难以避免,用户自行编写而没有发布的插件使用旧风格加载较为方便。第三项不需要考虑,为用户自身的问题;或者提供开关,控制是否自动加载。

    参考


    请项目维护者们考虑该提议是否可行,谢谢!

    enhancement good first issue 
    opened by shniubobo 25
  • 一个很奇怪的bug,nonebot2卡住

    一个很奇怪的bug,nonebot2卡住

    描述问题:

    运行了几周了都正常,刚才突然卡住 console上不动了,我加的log也不增加了 但是bot收到新消息,oicq还会显示新的消息(正常),nonebot2就没反应 OICQ那边没有也显示ws断开,说明还连着

    我设置的以下日志卡住后都不动了: logger.add("critical.log", encoding="utf-8", rotation="00:00", diagnose=False, level="CRITICAL", format=default_format)

    logger.add("info.log", encoding="utf-8", rotation="00:00", diagnose=False, level="INFO", format=default_format)

    重新启动nonebot,之前卡住累计的信息会一次性发出, 但过一会儿又卡住了,是什么原因呢。

    日志如下: /home/myuser/.pm2/logs/nonebot2-out.log last 15 lines: 1|nonebot2 | 12-31 23:57:38 [DEBUG] nonebot | Stop event propagation 1|nonebot2 | 12-31 23:57:55 [INFO] nonebot | CQHTTP | 2469785829 [message.group.normal]: Message Klxxu5cTd9gAANvRYPbcxF/t9QMB from 2534635480@[群:710731498]: "我要吃鸡号" 1|nonebot2 | 12-31 23:57:55 [DEBUG] nonebot | Checking for matchers in priority 1... 1|nonebot2 | 12-31 23:57:55 [DEBUG] nonebot | Checking for matchers in priority 5... 1|nonebot2 | 12-31 23:57:55 [INFO] nonebot | Event will be handled by <Matcher from shutup, type=message, priority=5, temp=False> 1|nonebot2 | 12-31 23:57:55 [DEBUG] nonebot | Running matcher <Matcher from shutup, type=message, priority=5, temp=False> 1|nonebot2 | 12-31 23:57:55 [INFO] nonebot | Matcher <Matcher from shutup, type=message, priority=5, temp=False> running complete 1|nonebot2 | 12-31 23:57:55 [DEBUG] nonebot | Stop event propagation 1|nonebot2 | 12-31 23:58:26 [INFO] nonebot | CQHTTP | 2469785829 [message.group.anonymous]: Message Jzeo7QTEtAAAAHB3dFaE3F/t9SIB from 80000000@[群:657359249]: "杨桃有点东西" 1|nonebot2 | 12-31 23:58:26 [DEBUG] nonebot | Checking for matchers in priority 1... 1|nonebot2 | 12-31 23:58:26 [DEBUG] nonebot | Checking for matchers in priority 5... 1|nonebot2 | 12-31 23:58:26 [INFO] nonebot | Event will be handled by <Matcher from shutup, type=message, priority=5, temp=False> 1|nonebot2 | 12-31 23:58:26 [DEBUG] nonebot | Running matcher <Matcher from shutup, type=message, priority=5, temp=False> 1|nonebot2 | 12-31 23:58:26 [CRITICAL] shutup | 啊这 呜呜呜 1|nonebot2 | 青枣HP变为1

    /home/myuser/.pm2/logs/oicq-out.log last 15 lines: 0|oicq | [2021-01-01T01:08:47.174] [INFO] [BOT:2469785829] - recv from: [Group: xxxxx(657359249), Member: 匿名消息(80000000)] ? 0|oicq | [2021-01-01T01:08:49.896] [INFO] [BOT:2469785829] - recv from: [Group: xxxxx(657359249), Member: 匿名消息(80000000)] 你不是几个小时前发过了吗 0|oicq | [2021-01-01T01:09:22.385] [INFO] [BOT:2469785829] - recv from: [Group: xxxxx(657359249), Member: 匿名消息(80000000)] 噢 0|oicq | [2021-01-01T01:09:31.048] [INFO] [BOT:2469785829] - recv from: [Group: xxxxx(657359249), Member: 匿名消息(80000000)] 我脑瘫 0|oicq | [2021-01-01T01:10:02.100] [INFO] [BOT:2469785829] - recv from: [Group: xxxxx(657359249), Member: 匿名消息(80000000)] 九头驸马有点东西 0|oicq | [2021-01-01T01:11:43.683] [INFO] [BOT:2469785829] - recv from: [Group: xxxxx(657359249), Member: 匿名消息(80000000)] 马上上 0|oicq | [2021-01-01T01:12:43.710] [INFO] [BOT:2469785829] - recv from: [Group: xxxxx(657359249), Member: 匿名消息(80000000)] [CQ:reply,id=Jzeo7QTEtAAAAHGRZK0iDV/uBaEB]? 0|oicq | [2021-01-01T01:13:14.205] [INFO] [BOT:2469785829] - recv from: [Group: xxxxx(657359249), Member: 匿名消息(80000000)] 您是? 0|oicq | [2021-01-01T01:14:25.105] [INFO] [BOT:2469785829] - recv from: [Group: xxxxx(657359249), Member: 匿名消息(80000000)] [CQ:reply,id=Jzeo7QTEtAAAAHGWQVw3ml/uBosB]别管我,我脑瘫 0|oicq | [2021-01-01T01:14:49.301] [INFO] [BOT:2469785829] - recv from: [Group: xxxxx(657359249), Member: 匿名消息(80000000)] 警告,咱们还是接着聊吧 0|oicq | [2021-01-01T01:15:02.429] [INFO] [BOT:2469785829] - recv from: [Group: xxxxx(657359249), Member: 匿名消息(80000000)] 鼍龙怪有点东西 0|oicq | [2021-01-01T01:15:09.606] [INFO] [BOT:2469785829] - recv from: [Group: xxxxx(657359249), Member: 匿名消息(80000000)] bot好像关了 0|oicq | [2021-01-01T01:16:28.344] [INFO] [BOT:2469785829] - recv from: [Group: xxxxx(657359249), Member: 匿名消息(80000000)] 要不xdm众筹下把bot放服务器上跑?

    看oicq日志最后一条的时间是最新的,而nonebot2就卡在卡住的时间之后就不动了

    如何复现? 之前好的,现在就这样了,触发条件不明

    环境信息:

    • OS: [Centos7]
    • Python Version: [3.8]
    • Nonebot Version: [2.0.0]
    question 
    opened by anaivebird 23
  • nb初始化出错

    nb初始化出错

    系统Windows 11

    D:\NoneBot2>nb init
    [?] Project Name:  homura
    [?] Where to store the plugin?  2) In a "src" folder
    [?] Load NoneBot Builtin Plugin?  Yes
    [?] Which adapter(s) would you like to use?  (<up>, <down> to move, <space> to select, <a> to toggle, <i> to invert)
    Traceback (most recent call last):
      File "D:\conda_data\envs\Python3.8.15\lib\site-packages\prompt_toolkit\cache.py", line 34, in get
        return self._data[key]
    KeyError: 1
    
    During handling of the above exception, another exception occurred:
    
    Traceback (most recent call last):
      File "D:\conda_data\envs\Python3.8.15\lib\runpy.py", line 194, in _run_module_as_main
        return _run_code(code, main_globals, None,
      File "D:\conda_data\envs\Python3.8.15\lib\runpy.py", line 87, in _run_code
        exec(code, run_globals)
      File "D:\conda_data\envs\Python3.8.15\Scripts\nb.exe\__main__.py", line 7, in <module>
      File "D:\conda_data\envs\Python3.8.15\lib\site-packages\click\core.py", line 829, in __call__
        return self.main(*args, **kwargs)
      File "D:\conda_data\envs\Python3.8.15\lib\site-packages\click\core.py", line 782, in main
        rv = self.invoke(ctx)
      File "D:\conda_data\envs\Python3.8.15\lib\site-packages\click\core.py", line 1259, in invoke
        return _process_result(sub_ctx.command.invoke(sub_ctx))
      File "D:\conda_data\envs\Python3.8.15\lib\site-packages\click\core.py", line 1066, in invoke
        return ctx.invoke(self.callback, **ctx.params)
      File "D:\conda_data\envs\Python3.8.15\lib\site-packages\click\core.py", line 610, in invoke
        return callback(*args, **kwargs)
      File "D:\conda_data\envs\Python3.8.15\lib\site-packages\nb_cli\__init__.py", line 30, in init
        create_project()
      File "D:\conda_data\envs\Python3.8.15\lib\site-packages\nb_cli\handlers.py", line 105, in create_project
        answers2 = prompt(question2, qmark="[?]", style=list_style)
      File "D:\conda_data\envs\Python3.8.15\lib\site-packages\PyInquirer\prompt.py", line 69, in prompt
        answer = run_application(
      File "D:\conda_data\envs\Python3.8.15\lib\site-packages\prompt_toolkit\shortcuts.py", line 625, in run_application
        result = cli.run()
      File "D:\conda_data\envs\Python3.8.15\lib\site-packages\prompt_toolkit\interface.py", line 413, in run
        self._redraw()
      File "D:\conda_data\envs\Python3.8.15\lib\site-packages\prompt_toolkit\interface.py", line 358, in _redraw
        self.renderer.render(self, self.layout, is_done=self.is_done)
      File "D:\conda_data\envs\Python3.8.15\lib\site-packages\prompt_toolkit\renderer.py", line 424, in render
        layout.write_to_screen(cli, screen, mouse_handlers, WritePosition(
      File "D:\conda_data\envs\Python3.8.15\lib\site-packages\prompt_toolkit\layout\containers.py", line 142, in write_to_screen
        sizes = self._divide_heigths(cli, write_position)
      File "D:\conda_data\envs\Python3.8.15\lib\site-packages\prompt_toolkit\layout\containers.py", line 177, in _divide_heigths
        dimensions = [get_dimension_for_child(c, index) for index, c in enumerate(self.children)]
      File "D:\conda_data\envs\Python3.8.15\lib\site-packages\prompt_toolkit\layout\containers.py", line 177, in <listcomp>
        dimensions = [get_dimension_for_child(c, index) for index, c in enumerate(self.children)]
      File "D:\conda_data\envs\Python3.8.15\lib\site-packages\prompt_toolkit\layout\containers.py", line 175, in get_dimension_for_child
        return c.preferred_height(cli, write_position.width, write_position.extended_height)
      File "D:\conda_data\envs\Python3.8.15\lib\site-packages\prompt_toolkit\layout\containers.py", line 1652, in preferred_height
        return self.content.preferred_height(cli, width, max_available_height)
      File "D:\conda_data\envs\Python3.8.15\lib\site-packages\prompt_toolkit\layout\containers.py", line 999, in preferred_height
        preferred=self.content.preferred_height(
      File "D:\conda_data\envs\Python3.8.15\lib\site-packages\prompt_toolkit\layout\controls.py", line 254, in preferred_height
        content = self.create_content(cli, width, None)
      File "D:\conda_data\envs\Python3.8.15\lib\site-packages\prompt_toolkit\layout\controls.py", line 259, in create_content
        tokens_with_mouse_handlers = self._get_tokens_cached(cli)
      File "D:\conda_data\envs\Python3.8.15\lib\site-packages\prompt_toolkit\layout\controls.py", line 238, in _get_tokens_cached
        return self._token_cache.get(
      File "D:\conda_data\envs\Python3.8.15\lib\site-packages\prompt_toolkit\cache.py", line 37, in get
        value = getter_func()
      File "D:\conda_data\envs\Python3.8.15\lib\site-packages\prompt_toolkit\layout\controls.py", line 239, in <lambda>
        cli.render_counter, lambda: self.get_tokens(cli))
      File "D:\conda_data\envs\Python3.8.15\lib\site-packages\PyInquirer\prompts\checkbox.py", line 99, in _get_choice_tokens
        tokens.pop()  # Remove last newline.
    IndexError: pop from empty list
    
    question 
    opened by Sincejunly 18
  • import nonebot 时 tzlocal/win32.py/get_localzone_name 报错

    import nonebot 时 tzlocal/win32.py/get_localzone_name 报错

    描述问题:

    启动时报错

    如何复现?

    仅仅是import nonebot就会报错 神奇的是,在将sched.py里面修改后

    if AsyncIOScheduler:
        scheduler = AsyncIOScheduler(timezone="Asia/Shanghai")
    

    就解决了~~现在正在这样苟着用~~

    期望的结果

    可以正常运行

    环境信息:

    • OS: [win10]
    • Python Version: [3.8.5]
    • Nonebot Version: [2.0.0a6]

    截图

    import nonebot
    Traceback (most recent call last):
      File "E:\Anaconda3\lib\site-packages\IPython\core\interactiveshell.py", line 3418, in run_code
        exec(code_obj, self.user_global_ns, self.user_ns)
      File "<ipython-input-2-473157fb80ba>", line 1, in <module>
        import nonebot
      File "E:\pycharm\PyCharm 2020.1.2\plugins\python\helpers\pydev\_pydev_bundle\pydev_import_hook.py", line 21, in do_import
        module = self._system_import(name, *args, **kwargs)
      File "E:\Anaconda3\lib\site-packages\nonebot\__init__.py", line 135, in <module>
        from nonebot.sched import scheduler
      File "E:\pycharm\PyCharm 2020.1.2\plugins\python\helpers\pydev\_pydev_bundle\pydev_import_hook.py", line 21, in do_import
        module = self._system_import(name, *args, **kwargs)
      File "E:\Anaconda3\lib\site-packages\nonebot\sched.py", line 19, in <module>
        scheduler = AsyncIOScheduler()
      File "E:\Anaconda3\lib\site-packages\apscheduler\schedulers\base.py", line 87, in __init__
        self.configure(gconfig, **options)
      File "E:\Anaconda3\lib\site-packages\apscheduler\schedulers\base.py", line 126, in configure
        self._configure(config)
      File "E:\Anaconda3\lib\site-packages\apscheduler\schedulers\asyncio.py", line 48, in _configure
        super(AsyncIOScheduler, self)._configure(config)
      File "E:\Anaconda3\lib\site-packages\apscheduler\schedulers\base.py", line 697, in _configure
        self.timezone = astimezone(config.pop('timezone', None)) or get_localzone()
      File "E:\Anaconda3\lib\site-packages\tzlocal\win32.py", line 93, in get_localzone
        _cache_tz = pytz.timezone(get_localzone_name())
      File "E:\Anaconda3\lib\site-packages\tzlocal\win32.py", line 84, in get_localzone_name
        raise pytz.UnknownTimeZoneError('Can not find timezone ' + tzkeyname)
    pytz.exceptions.UnknownTimeZoneError: 'Can not find timezone '
    
    
    bug good first issue 
    opened by synodriver 13
  • Bug: 无法从环境变量中读取列表型变量

    Bug: 无法从环境变量中读取列表型变量

    描述问题:

    nonebot2的变量类型读取能力表格如下: |类型|dotenv|环境变量| |---|---|---| |其他简单类型变量|✅|✅| |dict|✅|✅| |list|✅|❌|

    如何复现?

    tests/test_init.py作如下修改,运行测试出现错误:

    diff --git a/tests/test_init.py b/tests/test_init.py
    index 3d49d5ce..3fbb4965 100644
    --- a/tests/test_init.py
    +++ b/tests/test_init.py
    @@ -3,6 +3,7 @@ import os
     import pytest
     
     os.environ["CONFIG_FROM_ENV"] = '{"test": "test"}'
    +os.environ["CONFIG_FROM_ENV_LIST"] = '["test1", "test2"]'
     os.environ["CONFIG_OVERRIDE"] = "new"
     
     
    @@ -26,6 +27,7 @@ async def test_init(nonebug_init):
     
         config = get_driver().config
         assert config.config_from_env == {"test": "test"}
    +    assert config.config_from_env_list == ["test1", "test2"]
         assert config.config_override == "new"
         assert config.config_from_init == "init"
         assert config.common_config == "common"
    
    # 测试命令参照.github/workflows/codecov.yml
    $ poetry run pytest -n auto --cov-report xml
    

    期望的结果

    =============================================== short test summary info ================================================
    FAILED test_init.py::test_init[nonebug_init0] - AttributeError: 'Config' object has no attribute 'config_from_env_list'
    FAILED test_init.py::test_init[nonebug_init1] - AttributeError: 'Config' object has no attribute 'config_from_env_list'
    ============================================ 2 failed, 109 passed in 14.06s ============================================
    

    环境信息:

    该问题在以下环境中可以复现。

    |OS|Python|Nonebot| |---|---|---| |Darwin notebook.zeithrold.local 21.6.0 Darwin Kernel Version 21.6.0: Wed Aug 10 14:28:35 PDT 2022; root:xnu-8020.141.5~2/RELEASE_ARM64_T8101 arm64|3.9.12|gitmaster分支HEAD, afd13ed65d6b925bf4f1587a8dfd7fa3c09da152| |Linux codespaces-d7be66 5.4.0-1098-azure #104~18.04.2-Ubuntu SMP Tue Nov 29 12:13:35 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux|3.10.4|gitmaster分支HEAD, afd13ed65d6b925bf4f1587a8dfd7fa3c09da152|

    协议端信息:

    截图或日志

    备注

    这似乎是Pydantic的问题,该库文档提供了一种通过自定义解析的方式获取列表型环境变量:

    import os
    from typing import Any, List
    
    from pydantic import BaseSettings
    
    
    class Settings(BaseSettings):
        numbers: List[int]
    
        class Config:
            @classmethod
            def parse_env_var(cls, field_name: str, raw_val: str) -> Any:
                if field_name == 'numbers':
                    return [int(x) for x in raw_val.split(',')]
                return cls.json_loads(raw_val)
    
    
    os.environ['numbers'] = '1,2,3'
    print(Settings().dict())
    #> {'numbers': [1, 2, 3]}
    

    从环境变量读取配置的原因在于,使用nonebot必然导致输入机密数据,这些数据不适宜存储在文件当中。部分Adapter要求使用列表型配置,但并不支持通过环境变量读取。

    如果只能通过Pydantic读取变量,那么至少要在官方文档中醒目标注:目前无法支持通过环境变量传入列表型变量

    invalid 
    opened by zeithrold 12
  • Bug: to_me() 工作不正确

    Bug: to_me() 工作不正确

    描述问题:

    包含 rule=to_me() 的 command 在群聊中无法工作。

    如何复现?

    自制插件:

    from nonebot import on_command, on_keyword
    from nonebot.adapters import Bot, Event
    from nonebot.rule import to_me
    from nonebot.permission import SUPERUSER
    
    matcher = on_keyword({'debug'}, permission=SUPERUSER)
    matcher2 = on_command('fail', rule=to_me(), permission=SUPERUSER)
    
    @matcher.handle()
    async def _(bot: Bot, event: Event):
        event_raw = event.json(indent=2, ensure_ascii=False)
        await bot.send(event, event_raw)
    
    @matcher2.handle()
    async def _(bot: Bot, event: Event):
        event_raw = event.json(indent=2, ensure_ascii=False)
        await bot.send(event, event_raw)
    
    
    在群聊中发送:@bot fail
    无响应
    
    在群聊中发送:@bot debug
    回复:
    {
      "time": 1620720593,
      "self_id": ******,
      "post_type": "message",
      "sub_type": "normal",
      "user_id": ******,
      "message_type": "group",
      "message_id": 725230510,
      "message": [
        {
          "type": "at",
          "data": {
            "qq": ******
          }
        },
        {
          "type": "text",
          "data": {
            "text": " debug"
          }
        }
      ],
      "raw_message": "[CQ:at,qq=******] debug",
      "font": 0,
      "sender": {},  // 略
      "to_me": false,
      "reply": null,
      "group_id": ******,
      "anonymous": null,
      "ClassType": "GroupMessage"
    }
    
    在私聊中发送:fail
    回复:
    {
      "time": 1620721131,
      "self_id": ******,
      "post_type": "message",
      "sub_type": "friend",
      "user_id": ******,
      "message_type": "private",
      "message_id": 1411144159,
      "message": [],
      "raw_message": "fail",
      "font": 0,
      "sender": {},  // 略
      "to_me": true,
      "reply": null,
      "ClassType": "PrivateMessage"
    }
    

    期望的结果

    在群聊中发送:@bot fail,有回复 在群聊中发送:@bot debug,回复 "to_me": true

    环境信息:

    • OS: linux docker python:3.8-slim
    • Python Version: 3.8
    • Nonebot Version: 2.0.0a13.post1
    • Adapter: cqhttp
    • Env: command_start=["!", "!", ""]
    bug 
    opened by Lycreal 12
  • get_bots无法获取bot

    get_bots无法获取bot

    描述问题:

    我在bot开放了一个msg的http接口, 在云端通过http://127.0.0.1:9326/msg?msg=xxxx来发送消息, 但是在发送消息经常会出现无法获取bot的情况(get_bots). 我尝试在代码了增加重试来等待机器人重新连接, cq部署在本地 但是nonbot还是经常出现这种情况.

    如何复现?

    @app.get("/msg/")
    async def hello():
        bots = nonebot.get_bots()
        while not bots:
            nonebot.log.logger.warning("等待中, 没有可用机器人...")
            await asyncio.sleep(1)
            bots = nonebot.get_bots()
        for bot in bots:
            b: Bot = bots.get(bot)
            await b.call_api('send_group_msg', **{
                'group_id': 群号,
                'message': 'test'
            })
    

    期望的结果 正常发送消息

    A clear and concise description of what you expected to happen.

    环境信息:

    • OS: 腾讯云centos7
    • Python Version: 3.8
    • Nonebot Version: v2.0.0-beta.1

    协议端信息:

    • 协议端: go-cqhttp
    • 协议端版本: v1.0.0-rc1

    截图或日志 image ===================== 尝试在本地断开CQ再重新连接CQ ========================= image

    invalid 
    opened by fake2ky 10
  • Question: 如何在钩子函数“运行预处理”中修改message内容

    Question: 如何在钩子函数“运行预处理”中修改message内容

    主要是想使用一个函数对消息进行预处理,将繁体字转为简体字,方便matcher的匹配

    例如

    @run_preprocessor
    async def _(matcher: Matcher, bot: Bot, event: Event, state: T_State):
        event.message = convert(event.message, "zh-cn")
    
    question 
    opened by chanchancl 9
  • Bug: Windows下无法进行异步子进程调用

    Bug: Windows下无法进行异步子进程调用

    await asyncio.create_subprocess_shell(cmd)
    

    我平时使用macos和windows环境开发,上面的代码在macos中使用是没有任何问题的,但在windows中会报一个NotImplementedError错误,官方提到

    注解 如果使用了 ProactorEventLoop 则子进程将在 Windows 中可用。 详情参见 Windows 上的子进程支持。

    结合网上的解决办法,我可以通过修改nonebot/drivers/fastapi.py源码的方式解决这个问题

    class Driver(BaseDriver):
        @overrides(BaseDriver)
        def run(self,
                host: Optional[str] = None,
                port: Optional[int] = None,
                *,
                app: Optional[str] = None,
                **kwargs):
            """使用 ``uvicorn`` 启动 FastAPI"""
            super().run(host, port, app, **kwargs)
            LOGGING_CONFIG = {
                "version": 1,
                "disable_existing_loggers": False,
                "handlers": {
                    "default": {
                        "class": "nonebot.log.LoguruHandler",
                    },
                },
                "loggers": {
                    "uvicorn.error": {
                        "handlers": ["default"],
                        "level": "INFO"
                    },
                    "uvicorn.access": {
                        "handlers": ["default"],
                        "level": "INFO",
                    },
                },
            }
            # 以下是修改的内容
            from uvicorn import Config, Server
            from asyncio import ProactorEventLoop, set_event_loop, get_event_loop
            set_event_loop(ProactorEventLoop())
            server = Server(config=Config(
                app or self.server_app,
                host=host or str(self.config.host),
                port=port or self.config.port,
                reload=bool(app) and self.config.debug,
                reload_dirs=self.fastapi_config.fastapi_reload_dirs or None,
                debug=self.config.debug,
                log_config=LOGGING_CONFIG,
                **kwargs,
            ))
            get_event_loop().run_until_complete(server.serve())
    
            # uvicorn.run(app or self.server_app,
            #             host=host or str(self.config.host),
            #             port=port or self.config.port,
            #             reload=bool(app) and self.config.debug,
            #             reload_dirs=self.fastapi_config.fastapi_reload_dirs or None,
            #             debug=self.config.debug,
            #             log_config=LOGGING_CONFIG,
            #             **kwargs)
    

    但这应该只适用于windows,而且我不知道这样修改是否会带来副作用,希望nb框架能提供更好的解决方案

    bug wontfix 
    opened by MIXISAMA 9
  • Feature: 支持手动注册父子插件

    Feature: 支持手动注册父子插件

    是否在使用中遇到某些问题而需要新的特性?请描述:

    某些情况下需要手动加载某个插件的子插件,而不是在 __init__.py 中使用 load_pluginload_plugins

    但手动加载之后,这些插件不会像通过 load_pluginload_plugins 一样自动成为父子插件

    描述你所需要的特性:

    希望能提供一个注册父子插件的函数

    as-designed 
    opened by A-kirami 8
  • rc2不兼容依赖项fastapi 0.89.0

    rc2不兼容依赖项fastapi 0.89.0

    描述问题:

    matadata中的

    Requires-Dist: fastapi (>=0.87.0,<1.0.0)
    

    会下载fastapi依赖的最新版本0.89.0,而rc2无法调用它

    如何复现?

    1. 使用 pip install nb-cli 命令安装rc2
    2. pip list 中可见fastapi版本号为0.89.0
    3. 使用 nb run ,fastapi抛出错误
    4. 使用 pip install fastapi==0.88.0 命令安装上一个版本
    5. 再次运行,错误消失

    期望的结果

    fastapi将会抛出

    fastapi.exceptions.FastAPIError: Invalid args for response field! Hint: check that <class 'starlette.responses.Response'> is a valid pydantic field type
    

    环境信息:

    • OS: Windows 19044.2364
    • Python Version: 3.9.13
    • Nonebot Version: 2.0.0rc2

    协议端信息:

    • 协议端: go-cqhttp
    • 协议端版本: v1.0.0-rc4

    截图或日志

    image

    运行失败

    image

    降级为0.88.0后,错误消失

    bug 
    opened by jxLYH6134 2
  • Docs: 移除商店中的过期插件 2023

    Docs: 移除商店中的过期插件 2023

    移除商店中的过期插件 2023

    上一次:#795

    计划将插件商店中仍未适配 rc 更新的插件移除,具体移除日期待定。

    列表

    Git 已适配但未在 PyPI 发版(Warning)

    ELF-RSS @Quan666 nonebot-plugin-picsbank @Diaosi1111

    未适配

    使用了过时的 Export 功能(#1125)

    未更新 nonebot-plugin-apscheduler 依赖

    使用了过时的 State 注入参数(#1160)

    缺少依赖

    商店 module_name 与实际模块名不一致

    其他

    待删除

    已删除

    数据来源

    Lancercmd/nonebot2-store-test

    documentation 
    opened by j1g5awi 62
  • RFC: 统一插件元数据声明

    RFC: 统一插件元数据声明

    为什么

    现在, NoneBot社区内有各种类型的插件, 为了对这些插件查询帮助等, 需要一个统一的规范. 目前存在大量插件自己写了帮助, 导致一个帮助可能会触发大量插件响应, 并且格式不统一

    怎么做

    目前, 社区对于插件规范有了多种实现, 包括以下两种

    所以, 我们可以在插件根中使用字段指定一部分插件元数据

    具体规范

    字段规范(已部分实现)

    以下字段应作为插件根中的全局变量被声明.

    初版设计(未使用)
    __plugin_adapters__ = [OneBotV11Adapter] #插件支持的Adapter, 如果不写就默认支持所有Adapter, 可以考虑根据这个字段进行adapter加载检测
    __plugin_name__ = PluginName('unique_name',human='插件人类阅读名称') #如果没有unique name就用插件包名代替
    __plugin_name__ = 'unique_name [插件人类阅读名称]' #这样也行, 就不用定义结构体了
    
    __plugin_des__ = '插件介绍' #简短介绍插件的功能(不包括使用方法), 可以给个字数限制?
    
    __plugin_usage__ = '插件用法' #插件使用方法, 可能需要支持很多种定义方式
    __plugin_usage__:Dict[Adapter,str] #这样应该也可以被接受
    __plugin_usage__:Dict[Type[Matcher],str] #这样可能也得需要支持, 就是直接根据命令生成
    
    __plugin_settings__: Config #插件的配置, 读env出来的那些
    
    __plugin_version__:str #插件版本, 如果没有就从包元数据读取
    __plugin_author__ = 'Author <[email protected]>'  #插件作者声明, 不写就没有
    
    @dataclass(eq=False)
    class PluginMetadata:
        """插件元信息,由插件编写者提供"""
    
        name: str
        """插件可阅读名称"""
        description: str
        """插件功能介绍"""
        usage: str
        """插件使用方法(暂时只支持str)"""
        config: Optional[Type[BaseModel]] = None
        """插件配置项"""
        # version: str
        """插件版本, 如果没有就从包元数据读取"""
        # author: str
        """插件作者声明, 不写就没有"""
        extra: Dict[Any, Any] = field(default_factory=dict)
        """额外自定义信息"""
    
    __plugin_meta__ = PluginMetadata(...)
    

    API规范(未确定)

    添加一个钩子, 在插件加载完成后调用, 返回包含上述字段的函数

    def plugin_load_callback(plugin_name:str,plugin:Module)->Optional[PluginMetadata]:
    	"""
    	如果返回None就不管了, 如果返回了元数据就取, 如果异常阻止该插件加载并记录该异常
    	如果有多个返回元数据的行为呢?
    	"""
        	...
    

    添加能够读取全部插件元数据的API

    添加一个内建插件叫nonebot.plugin.help提供最简单的帮助支持, 即: 将nonebot-plugin-help合并进来

    兼容性

    理论上不会break, 如果__plugin_meta__没写就代表没有声明元数据

    其他

    可以考虑为适配了以上信息的插件在插件商店中优先推荐, 或者进行标识

    enhancement 
    opened by mnixry 11
  • Docs: 文档关于插件的描述

    Docs: 文档关于插件的描述

    文档描述不够细致 比如描述关于插件的配置项的 plugin_config.json

    {
      "plugins": ["path.to.your.plugin"],
      "plugin_dirs": ["path/to/your/plugins"]
    }
    

    在一个新手刚刚入门的情况下,请问这个plugin_config.json 相对于bot.py 是什么位置 这个配置文件是写在项目根目录下还是写在plugin/{plugin_name}/plugin_config.json 作为一个实列 他的目录结构是什么样的 以及 是不是有一个手把手 用每一个commit标注清楚 每一个行为在干什么的模板样例的仓库

    所有的文档是及其零散,将每一个配置项单独拿出来说 但是并没有清楚的讲配置所在整个项目当中的位置是怎样的

    documentation 
    opened by jingyuexing 7
  • Docs: NoneBot2文档改进计划

    Docs: NoneBot2文档改进计划

    NoneBot2文档改进计划

    Related: #3 ~~#372~~

    描述问题或主题

    NoneBot2文档由于一些原因~~主要是我们语文太菜~~,它的撰写方法存在各种问题,对新手的理解和使用造成了困难。 我们在这里希望对NoneBot现有的文档结构作出一点改进。

    但是这不是我们几位开发者能够完成的。 我们都是普通人,在完成学习和工作之余维护项目代码和文档,实在感觉有些分身乏术。

    我们衷心希望,看到这个issue的每一个人,都为这个文档,作出一份自己的贡献。 而一份好的文档,需要你们每个人的帮助。

    不太正经的话
    • 我写这么多,要是没人来做我好尴尬啊……
    • image
    • ~~来贡献文档,领NoneBot周边~~这个我得问问RC……也没决定要做啥

    需作出的修改

    我在这里提供一个列表,包含了我个人在阅读文档过程中发现的一些问题 大家可以在Issue下方补充自己的见解,我会加到下面的这个列表中 如果各位看到这里面的一些问题自己有能力解决,可以向我们提交PR进行修改。

    • [ ] 在文档开篇介绍NoneBot的组成部分(Adapter,Driver,Plugin...)
      • 这部分不用特别详细,因为进阶会详细讲事件处理流程这里
    • [ ] 在安装方式一节给出最推荐的一种
      • [ ] 添加一个使用Conda作为虚拟环境管理工具使用nb-cli的教程
        • 因为它在各种平台上算是比较好装的,也比较适合nb-cli的操作需要
      • 是不是应该把给只使用插件的用户的教程放在这里?
    • [ ] 把使用脚手架移到教程一节,将教程以脚手架创建的项目结构为核心展开
      • [ ] 引导式教程,分步骤,第一步创建项目,第二部选择驱动器/注册适配器 这样的
      • [ ] 创建插件一步从脚手架命令开始,讲解创建插件的文件结构,引入Python包的概念
      • [ ] 简化加载插件一节,将各种加载插件方式移动到API参考部分
        • 加一条警告,不要随便动bot.py,除非你知道你在干啥
      • [ ] 详细化定义插件配置一节,加几个常见字段类型的示例,并且告诉开发者,插件配置应该从哪载入,什么时候实例化
        • 结合脚手架创建的文件结构(config.py)进行讲解
      • [ ] 定义事件响应器部分,应该先解释会话的概念
        • [ ] 权限控制这里可以直接说,为了可复用的控制一个事件能否被响应,我们提供了两种解决方案,然后打个表格做对比
        • [ ] 创建事件响应器,这个地方给例子比较好(比如教用户自己写个echo?),然后具体有哪些扔API文档
      • [ ] 定义事件处理流程,把gotreceive位置换一下,最好给一个例子做对比
        • [ ] 获取上下文信息这一步可以开始提及简单的依赖注入了,给个例子,说明一些依赖是怎样声明的
          • 具体有哪些依赖就不用报菜名了,直接扔API文档链接
      • [ ] 删除事件响应器操作一节,补全API相关部分,直接扔链接
      • [ ] 优化插件示例一节,按照上面的步骤,构建一个插件应该被打散成了很多步,这里需要给所有文件做个总结,然后可以提一些高阶的东西
      • [ ] 移动自定义日志一节到进阶,因为开发入门似乎用不到
    • [ ] 将钩子函数一节和进阶首页工作原理篇合并,在讲解工作原理的时候标示出各个钩子的运行时机,给个API文档链接即可
    • [ ] 跨插件访问,加上直接import这一种方法,讲明什么时候该require,什么时候直接import就行
    • [ ] 权限控制,这个地方想要表达的本质就是PERMISSION是一个(bot,event)->Awaitable[bool],可以改一下表述方式
    • [ ] 移动发布插件到进阶最后,让用户在发布插件前就对NoneBot有一个完整的了解
    • [ ] 删除定时任务的从NoneBot v1迁移一节
      • [ ] 尝试修改scheduler插件为可以直接import的版本

    如果对以上部分有任何疑问,也可以在官方交流群里面直接联系我们


    最后,在这里感谢你们对NoneBot社区作出的贡献!

    documentation help wanted 
    opened by mnixry 1
Releases(v2.0.0rc2)
  • v2.0.0rc2(Nov 24, 2022)

    💥 破坏性变更

    • Feature: 使用 importlib.metadata 替换 pkg_resources @A-kirami (#1388)

    🚀 新功能

    🐛 Bug 修复

    • Fix: Bot __getattr__ 不再对 __xxx__ 方法返回 @synodriver (#1398)
    • Fix: 修复 run pre/post hook 没有在正确的上下文中运行 @yanyongyu (#1391)

    📝 文档

    💫 杂项

    🍻 插件发布

    🍻 机器人发布

    🍻 适配器发布

    Source code(tar.gz)
    Source code(zip)
    nonebot2-2.0.0rc2-py3-none-any.whl(88.92 KB)
    nonebot2-2.0.0rc2.tar.gz(74.13 KB)
    nonebot_plugin_docs-2.0.0rc2-py3-none-any.whl(4.41 MB)
    nonebot_plugin_docs-2.0.0rc2.tar.gz(4.16 MB)
  • v2.0.0-rc.1(Oct 2, 2022)

    💥 破坏性变更

    🚀 新功能

    🐛 Bug 修复

    • Fix: 内置规则和权限没有捕获错误 @yanyongyu (#1291)
    • Fix: 修复 User 会话权限更新嵌套问题 @yanyongyu (#1208)
    • Fix: 修复当消息与不支持的类型相加时抛出的异常类型错误 @mnixry (#1166)

    💫 杂项

    🍻 插件发布

    🍻 机器人发布

    🍻 适配器发布

    Source code(tar.gz)
    Source code(zip)
    nonebot-plugin-docs-2.0.0rc1.tar.gz(4.16 MB)
    nonebot2-2.0.0rc1-py3-none-any.whl(86.29 KB)
    nonebot2-2.0.0rc1.tar.gz(72.50 KB)
    nonebot_plugin_docs-2.0.0rc1-py3-none-any.whl(4.39 MB)
  • v2.0.0-beta.5(Aug 4, 2022)

    🚀 新功能

    🐛 Bug 修复

    📝 文档

    💫 杂项

    🍻 插件发布

    🍻 机器人发布

    Source code(tar.gz)
    Source code(zip)
    nonebot-plugin-docs-2.0.0b5.tar.gz(4.17 MB)
    nonebot2-2.0.0b5-py3-none-any.whl(85.09 KB)
    nonebot2-2.0.0b5.tar.gz(70.73 KB)
    nonebot_plugin_docs-2.0.0b5-py3-none-any.whl(4.41 MB)
  • v2.0.0-beta.4(Jun 20, 2022)

    🚀 新功能

    🐛 Bug 修复

    • Fix: 修复 MessageSegment 在有额外数据时报错 @yanyongyu (#1055)
    • Fix: 修复环境变量无法覆盖 dotenv 内配置项值 @yanyongyu (#1052)
    • Fix: 修复依赖注入 bot event 参数 union 校验失败 @yanyongyu (#1001)

    📝 文档

    🍻 插件发布

    🍻 机器人发布

    🍻 适配器发布

    Source code(tar.gz)
    Source code(zip)
    nonebot-plugin-docs-2.0.0b4.tar.gz(4.17 MB)
    nonebot2-2.0.0b4-py3-none-any.whl(85.68 KB)
    nonebot2-2.0.0b4.tar.gz(72.61 KB)
    nonebot_plugin_docs-2.0.0b4-py3-none-any.whl(4.41 MB)
  • v2.0.0-beta.3(May 20, 2022)

    💥 破坏性变更

    • Fix: 添加 export 方法 Deprecation 警告 @yanyongyu (#983)
    • Feature: 支持 WebSocket 连接同时获取 str 或 bytes @yanyongyu (#962)

    🚀 新功能

    • Feature: 支持 WebSocket 连接同时获取 str 或 bytes @yanyongyu (#962)
    • Feature: 添加 CommandStart 依赖注入参数 @MeetWq (#915)
    • Feature: 添加 Rule, Permission 反向位运算支持 @yanyongyu (#872)
    • Feature: 新增文本完整匹配规则 @A-kirami (#797)

    🐛 Bug 修复

    • Fix: 修复依赖注入默认值参数在 __eq__ 被重写时报错的问题 @yanyongyu (#971)
    • Fix: 修复MessageTemplate在没有格式化说明符时行为不正确的问题 @mnixry (#947)
    • Fix: Bot Hook 没有捕获跳过异常 @yanyongyu (#905)
    • Fix: 修复部分事件响应器参数类型中冗余的 Optional @A-kirami (#904)
    • Fix: 修复 event 类型检查会对类型进行自动转换 @yanyongyu (#876)
    • Fix: 修复 on_fullmatch 返回类型错误 @yanyongyu (#815)
    • Fix: 修复 DataclassEncoder 嵌套 encode 的问题 @AkiraXie (#812)

    📝 文档

    💫 杂项

    🍻 插件发布

    🍻 机器人发布

    Source code(tar.gz)
    Source code(zip)
    nonebot-plugin-docs-2.0.0b3.tar.gz(4.25 MB)
    nonebot2-2.0.0b3-py3-none-any.whl(86.74 KB)
    nonebot2-2.0.0b3.tar.gz(76.51 KB)
    nonebot_plugin_docs-2.0.0b3-py3-none-any.whl(4.50 MB)
  • v2.0.0-beta.2(Feb 14, 2022)

    Documentation

    See: https://v2.nonebot.dev

    💫 Changes

    • ⬆️ bump version 2.0.0-beta.2 @he0119 (#796)
    • Release: 2.0.0-beta.2 @mnixry (#790)
    • Doc: update dependency-injection docs @AkiraXie (#791)
    • Docs: Fix copywriting @j1g5awi (#769)
    • Plugin: 修改 nonebot-plugin-strman 错误的 module_name @jks15satoshi (#780)
    • Plugin: 风格化字符串管理 商店信息更新 @jks15satoshi (#773)
    • 🍻 update plugin info @kexue-z (#763)
    • CI: avoid duplicate CI runs @StarHeartHunt (#749)
    • Update plugins.json @KafCoppelia (#741)
    • ✏️ Fix wrong module name @Lancercmd (#737)
    • 修改自己几个插件的Tag @FYWinds (#732)
    • Update plugins.json @KafCoppelia (#730)
    • ✏️ Fix wrong module name @Lancercmd (#727)
    • Plugin: Fix homepage for 2 plugins @j1g5awi (#724)
    • 👷checkout with PAT @he0119 (#716)
    • Update plugins.json @MeetWq (#710)
    • 商店链接指向错误 @wzl19371 (#708)
    • Plugin: 移除冷却事件插件 @jks15satoshi (#707)
    • 更新插件tag @felinae98 (#706)
    • Docs: remove unsupported char @StarHeartHunt (#702)
    • Cross platform code coverage test @mnixry (#686)
    • Docs: fix di import path @HibiKier (#678)
    • Plugin: Add tags for j1g5awi's plugins @j1g5awi (#672)

    💥 Breaking Changes

    • Fix: rewrite message typing and construct @yanyongyu (#752)

    🚀 Features

    • Feature: refactor and support bot connection hook @yanyongyu (#771)
    • Feature: Advanced message slice support @mnixry (#705)
    • 从 Fastapi 的文档中排除驱动器的 HTTP 上报地址 @A-kirami (#673)

    🐛 Bug Fixes

    • Bugfix: Potential message body injection vulnerability in MessageTemplate @mnixry (#782)
    • Fix Message.template format spec does not support static method @mnixry (#772)
    • Fix: dict(config) raise error @yanyongyu (#748)
    • Fix: require load plugin error @yanyongyu (#743)
    • Fix: single_session potential bug @AkiraXie (#711)
    • Fix: plugin load fail process @yanyongyu (#679)
    • Fix: fix matcher receive and arg detect @yanyongyu (#676)

    📝 Documentation

    • Docs: Add project code of conduct @mnixry (#794)
    • Add document for message template @mnixry (#789)
    • Docs: update some advanced docs @AkiraXie (#765)
    • Docs: Add CONTRIBUTING @j1g5awi (#745)
    • 👷using nb-autodoc to generate api docs @he0119 (#691)
    • 📝 prepare docstring for autodoc @he0119 (#683)
    • Docs: format adapter name @StarHeartHunt (#682)
    • Remove mirai-api-http related info from readme @mnixry (#681)

    🍻 Plugin Publish

    • Plugin: おはよう! @yanyongyu (#788)
    • Plugin: 轻量文字转图片插件 @yanyongyu (#784)
    • Plugin: Fgo从者推理 @yanyongyu (#779)
    • Plugin: 无数据库的问答插件 @yanyongyu (#777)
    • Plugin: random_cat_gif @yanyongyu (#775)
    • Plugin: 群聊反闪照 @yanyongyu (#767)
    • Plugin: random-cat @yanyongyu (#762)
    • Plugin: nonebot-plugin-setu2 @yanyongyu (#760)
    • Plugin: 聊天记录插件 @yanyongyu (#758)
    • Plugin: FG(Fifth Generation) @yanyongyu (#756)
    • Plugin: 词云 @yanyongyu (#754)
    • Plugin: 棋类游戏 @yanyongyu (#751)
    • Plugin: go-cqhttp 频道支持适配补丁 @yanyongyu (#747)
    • Plugin: nonebot-general-rss @yanyongyu (#739)
    • Plugin: NoneBot的go-cqhttp启动器 @yanyongyu (#736)
    • Plugin: NoneBot 数据存储 @yanyongyu (#734)
    • Plugin: 今天吃什么 @yanyongyu (#729)
    • Plugin: emoji 合成器 @yanyongyu (#726)
    • Plugin: 塔罗牌 @yanyongyu (#723)
    • Plugin: nonebot_plugin_fortune @yanyongyu (#720)
    • Plugin: 天气查询 @yanyongyu (#715)
    • Plugin: 彩云小梦AI续写 @yanyongyu (#704)
    • Plugin: 人生重开模拟器 @yanyongyu (#701)
    • Plugin: 新冠疫情查询😷 @yanyongyu (#699)
    • Plugin: 疯狂星期四 @yanyongyu (#697)
    • Plugin: 扔骰子 @yanyongyu (#695)

    🍻 Bot Publish

    • Bot: 琪露诺Bot @yanyongyu (#786)

    🍻 Adapter Publish

    • Adapter: mirai2 @yanyongyu (#718)
    • Adapter: 开黑啦 @yanyongyu (#671)
    Source code(tar.gz)
    Source code(zip)
    nonebot-plugin-docs-2.0.0b2.tar.gz(3.66 MB)
    nonebot2-2.0.0b2-py3-none-any.whl(85.69 KB)
    nonebot2-2.0.0b2.tar.gz(75.11 KB)
    nonebot_plugin_docs-2.0.0b2-py3-none-any.whl(3.90 MB)
  • v2.0.0-beta.1(Jan 8, 2022)

    Documentation

    See: https://v2.nonebot.dev

    💫 Changes

    • Docs: fix messenger css error @yanyongyu (#669)
    • CI: Fix build upload error @yanyongyu (#668)
    • Docs: add example for plugin @yanyongyu (#667)
    • Docs: update handler and plugin docs @yanyongyu (#661)
    • Docs: 更新商店插件发布流程 @XZhouQD (#660)
    • Feature: add sitemap and test cases @yanyongyu (#659)
    • Docs: disable service worker globally @StarHeartHunt (#658)
    • Optimize readme expression and styling @mnixry (#653)
    • Docs: update Algolia search key @StarHeartHunt (#650)
    • :construction_worker: update publish bot config @he0119 (#649)
    • Pre Release: 2.0.0-beta.1 preview @yanyongyu (#644)
    • Docs: style tweaks @StarHeartHunt (#622)
    • change: 按照新格式修改商店发布数据 @he0119 (#620)
    • Plugin: 插件重命名 nonebot-hk-reporter -> nonebot-bison @felinae98 (#592)
    • Release: bump version of adapters @yanyongyu (#554)
    • :memo: 修复插件发布指引文档图片无法显示 @SK-415 (#551)
    • Bump version of feishu adapter @StarHeartHunt (#550)

    💥 Breaking Changes

    • Feature: template support raw string @yanyongyu (#557)

    🚀 Features

    • Support user-defined format spec for message template @mnixry (#645)
    • :sparkles: Compatible with cross-platform superusers @j1g5awi (#642)
    • Feature: Handler Dependency Injection @yanyongyu (#588)
    • Feature: remove namespace @yanyongyu (#587)
    • Feature: template support raw string @yanyongyu (#557)
    • Feature: support use MessageSegment factory method as message template format spec @mnixry (#555)

    🐛 Bug Fixes

    • Fix: http2 for fastapi driver @yanyongyu (#615)
    • Fix: fastapi driver forward header error @yanyongyu (#561)
    • Fix: fix cqhttp MessageSegment bugs @AkiraXie (#556)

    🍻 Plugin Publish

    • Plugin: 转发姬 @yanyongyu (#666)
    • Plugin 群文件直链提取器 @yanyongyu (#664)
    • Plugin 插件管理器 @yanyongyu (#657)
    • Plugin 群聊复读机 @yanyongyu (#652)
    • Plugin: Memes generator @yanyongyu (#641)
    • Plugin: nonebot-plugin-logo @yanyongyu (#639)
    • Plugin: 简易群管 @yanyongyu (#637)
    • Plugin: 通过浏览器来生成图片 @yanyongyu (#635)
    • Plugin: OlivOS.nb2 @yanyongyu (#633)
    • Plugin: lol比赛信息 @yanyongyu (#628)
    • Plugin: 剧集更新列表 @yanyongyu (#626)
    • Plugin: picsbank @yanyongyu (#624)
    • Plugin: 随机黑丝 @yanyongyu (#617)
    • Plugin: 在线运行代码 @yanyongyu (#613)
    • Plugin: 虚拟朋友 @yanyongyu (#611)
    • Plugin: ShindanMaker @yanyongyu (#609)
    • Plugin: nonebot-plugin-petpet @yanyongyu (#607)
    • Plugin: nonebot-plugin-asoulcnki @yanyongyu (#603)
    • Plugin: 诺基亚手机图生成 @yanyongyu (#601)
    • Plugin: 工作性价比计算器 @yanyongyu (#599)
    • Plugin: gocqapi @yanyongyu (#597)
    • Plugin: nonebot_plugin_youthstudy @yanyongyu (#594)
    • Plugin: lolheroes @yanyongyu (#591)
    • Plugin: IT咨讯 @yanyongyu (#586)
    • Plugin: 另一个图片搜索 @yanyongyu (#580)
    • Plugin: leetcode提醒机器人 @yanyongyu (#578)
    • Plugin: nonebot-plugin-setu-now @yanyongyu (#575)
    • Plugin: nb2chan @yanyongyu (#566)
    • Plugin: Twitter推送 @yanyongyu (#564)

    🍻 Bot Publish

    • Bot: SeaBot_QQ @yanyongyu (#630)
    • Bot: PixivBot @yanyongyu (#573)
    • Bot: 剑网三bot @yanyongyu (#559)
    Source code(tar.gz)
    Source code(zip)
  • v2.0.0a16(Oct 2, 2021)

    Documentation

    See: https://v2.nonebot.dev

    💫 Changes

    • Release 2.0.0a16 @yanyongyu (#547)
    • Docs: 插件发布指引文档 @XZhouQD (#541)
    • Bot: HarukaBot repository link update @SK-415 (#538)
    • 👷 update store publish bot @he0119 (#526)
    • 🐛 fix ding adapter issues @lengthmin (#521)
    • Docs: Add FAQ link to README.md @mnixry (#513)
    • MessageSegment.image 的 BytesIO @jinserrr (#509)
    • :fire: Remove unsupported adapter @j1g5awi (#508)

    🚀 Features

    • Feature: Add support for mirai adapter NudgeEvent @mnixry (#546)
    • Feature: support use Message object as message template @mnixry (#545)
    • 完善飞书相关文档和部分事件Model @StarHeartHunt (#536)
    • Feature: str.format like message formatting support @mnixry (#510)
    • 添加设置项,使得可以切换飞书和Lark API地址 @mri-moe (#495)

    🐛 Bug Fixes

    • Fix: remove return value in event handle @yanyongyu (#539)
    • 🐛 fix feishu private message event response @StarHeartHunt (#524)
    • 修复user的错误逻辑 @synodriver (#519)
    • 🐛 Fix endswith match bug @ishkong (#514)
    • Fix exception raised when constructing MessageChain from string @mnixry (#503)

    🍻 Plugin Publish

    • Plugin: pornhub风格图标生成 @yanyongyu (#543)
    • Plugin: SimpleMusic @yanyongyu (#534)
    • Plugin: HTTP静态文件托管 @yanyongyu (#532)
    • Plugin: HanayoriBot @yanyongyu (#529)
    • Plugin: ATRI语音包 @yanyongyu (#517)
    • Plugin: ELF_RSS @yanyongyu (#501)
    • Plugin: Epic 限免游戏资讯 @yanyongyu (#499)

    🍻 Bot Publish

    • Bot: Takker @yanyongyu (#512)
    • Bot: SetuBot @yanyongyu (#507)
    Source code(tar.gz)
    Source code(zip)
  • v2.0.0a15(Aug 12, 2021)

    Documentation

    See: https://v2.nonebot.dev

    💫 Changes

    • Release 2.0.0a15 @yanyongyu (#490)
    • 飞书适配器重定向aiocache logging到统一logger @StarHeartHunt (#474)
    • Docs: update guide docs @yanyongyu (#464)

    🚀 Features

    • feature: mirai multiple accounts support @mnixry (#492)

    🐛 Bug Fixes

    • bugfix: catch setup factory exception @mnixry (#491)
    • Bugfix: remove mirai session expiry @mnixry (#489)
    • Fix log tag escape error in event.get_description in mirai adapter @mnixry (#471)

    🍻 Plugin Publish

    • Plugin: nonebot-plugin-flexperm @yanyongyu (#485)
    • Plugin: 布谷机器人 @yanyongyu (#483)
    • Plugin: 孤寡机器人 @yanyongyu (#481)
    • Plugin: nonebot-plugin-autohelp @yanyongyu (#476)
    • Plugin: 和风天气 @yanyongyu (#468)

    🍻 Bot Publish

    • Bot: DicePP @yanyongyu (#466)
    Source code(tar.gz)
    Source code(zip)
  • v2.0.0a14(Aug 4, 2021)

    Documentation

    See: https://v2.nonebot.dev

    💫 Changes

    • Release: 2.0.0a14 @yanyongyu (#462)
    • 飞书适配器import顺序格式化 @StarHeartHunt (#448)
    • 修复依赖项git链接 @StarHeartHunt (#449)
    • Publish plugin web-monitor @abrahum (#447)
    • Docs: 文档支持 algolia 全文搜索 @StarHeartHunt (#444)
    • Optimize the description of multiple plug-ins @Lancercmd (#440)
    • Docs: scheduler docs typo @yanyongyu (#435)
    • Docs: 修复漏字 @StarHeartHunt (#434)
    • Docs: fix typo @StarHeartHunt (#421)
    • remove unnecessary print @StarHeartHunt (#414)
    • Docs: typo @StarHeartHunt (#409)
    • Docs: 完善文档 Python 版本描述 @StarHeartHunt (#408)
    • Docs: update tagline @StarHeartHunt (#398)
    • Update plugins.json @HibiKier (#396)
    • Update plugins.json @HibiKier (#395)
    • :link: update community links @richardchien (#392)
    • Docs: add discord server link @StarHeartHunt (#391)
    • Update plugins.json @HibiKier (#388)
    • Update plugins.json @HibiKier (#387)
    • typo @StarHeartHunt (#386)
    • Update plugins.json @HibiKier (#380)
    • Docs: Readme.md 增加 awesome-nonebot 资源库 @Cosmos-Break (#377)
    • Docs: Add mirai adapter port config @Cosmos-Break (#378)
    • 更新 Mirai-API-HTTP 用户指南 @mnixry (#374)
    • add .DS_Store to .gitignore @StarHeartHunt (#369)
    • :memo: Remove nonebot_plugin_todo @j1g5awi (#367)
    • Docs: update permission doc @AkiraXie (#366)
    • Docs: 添加中国大陆文档镜像 @StarHeartHunt (#360)
    • [Doc] Update: CQHTTP implementations rename @XZhouQD (#359)
    • Docs: fix store link @StarHeartHunt (#350)
    • Docs: update loading-a-plugin docs @j1g5awi (#344)
    • Docs: update handlers overload doc @AkiraXie (#336)
    • Bot: change repository url @Ailitonia (#335)
    • Docs: 一点小修改 @StarHeartHunt (#331)
    • Docs: 文档优化 @StarHeartHunt (#328)
    • 优化 issue 模板 bug 报告 @StarHeartHunt (#326)
    • 添加文档 issue 模板 @StarHeartHunt (#321)
    • 忽略 yarn.lock 防止意外提交 @StarHeartHunt (#320)
    • Docs: 更新 go-cqhttp 配置文件 @StarHeartHunt (#319)
    • Docs: 写明所需 Python 最低版本小版本号 @StarHeartHunt (#316)
    • Docs: 优化文档商店页显示效果 @StarHeartHunt (#314)

    💥 Breaking Changes

    • Feature: 支持自定义 Response @StarHeartHunt (#406)

    🚀 Features

    • Add forward driver support for mirai-api-http adapter @mnixry (#461)
    • Feature: 添加飞书适配器支持 @StarHeartHunt (#425)
    • New: get_bot function @cleoold (#419)
    • Feature: 支持自定义 Response @StarHeartHunt (#406)
    • New: support custom log level config @yanyongyu (#333)
    • handle_event函数添加异常返回 @mnixry (#322)

    🐛 Bug Fixes

    • 修复由于 quart.exception在新版Quart被移除导致import出错 @mnixry (#452)
    • 修复mirai adapter中上传相关api操作报错 @mnixry (#430)
    • 修复shell_command多次--help时重复输出 @rmuchan (#410)
    • 修复Mirai加群通过时报错 @mnixry (#407)
    • Fix: log module name error @yanyongyu (#334)

    🍻 Plugin Publish

    • Plugin: nonebot_plugin_fr24 @yanyongyu (#442)
    • Plugin: nonebot_plugin_setu @yanyongyu (#438)
    • Plugin: nonebot_plugin_statistical @yanyongyu (#428)
    • Plugin: nonebot_plugin_russian @yanyongyu (#416)
    • Plugin: nonebot_plugin_pixivrank_search @yanyongyu (#412)
    • Plugin: Nonebot2 消息撤回插件 @yanyongyu (#382)
    • Plugin: nonebot-plugin-alias @yanyongyu (#371)
    • Plugin: nonebot_plugin_gamedraw @yanyongyu (#364)
    • Plugin: Nonebot2插件轻量帮助列表 @yanyongyu (#362)
    • Plugin: Minecraft 服务器状态查询 @yanyongyu (#356)
    • Plugin: nonebot_plugin_puppet @yanyongyu (#343)
    • Plugin: 待办事项提醒(闹钟) @yanyongyu (#330)

    🍻 Bot Publish

    • Bot: dumbot傻瓜机器人 @yanyongyu (#446)
    • Bot: ATRI @yanyongyu (#432)
    • Bot: 绪山真寻bot @yanyongyu (#405)
    • Bot: YanXiBot @yanyongyu (#403)
    • Bot: Github Bot @yanyongyu (#338)

    🍻 Adapter Publish

    • Adapter: feishu @yanyongyu (#451)
    • Adapter: gocq @yanyongyu (#349)
    Source code(tar.gz)
    Source code(zip)
  • v2.0.0a13.post1(Apr 1, 2021)

    Documentation

    See: https://v2.nonebot.dev

    💫 Changes

    • Pre Release 2.0.0a13.post1 @yanyongyu (#311)
    • Pre Release 2.0.0a13 @yanyongyu (#310)
    • Pre Release 2.0.0a12 @yanyongyu (#308)
    • Docs: update hook docs @AkiraXie (#294)
    • Docs: 修正文档中钩子函数的参数 @StarHeartHunt (#293)
    • Fix: cqhttp post secret checking error @yanyongyu (#290)
    • Docs: 在2.0.0a11文档中添加分离适配器的提示 @StarHeartHunt (#285)
    • Bug: typo in built-in plugin @StarHeartHunt (#282)
    • Fix: store bot display error @yanyongyu (#281)
    • Fix: Plugin Store link in README @SK-415 (#274)
    • Bug: 修复mah adapter无法接受好友请求 @notnotype (#273)
    • Fix: several typo and error in doc @yanyongyu (#272)
    • Bug: typo in adapters.json @StarHeartHunt (#269)
    • Docs: 添加对分离适配器的提示 @StarHeartHunt (#268)
    • Bug: correct params order @StarHeartHunt (#270)
    • ci: 更新商店发布议题机器人 @he0119 (#265)

    💥 Breaking Changes

    • 统一adapters中MessageEvent get_session_id方法返回的内容 @Reverier-Xu (#276)

    🚀 Features

    • New: add call_api hook @yanyongyu (#307)

    🐛 Bug Fixes

    • Fix: matcher got recursion @yanyongyu (#309)
    • 修复单独被@报错问题,以及使机器人可以判断出在消息任意位置的@信息 @SinonJZH (#300)
    • Fix: exclude all __init__.py in adapter packaging @yanyongyu (#262)
    • Fix: fix adapter override namespace file @yanyongyu (#261)

    🍻 Plugin Publish

    • Plugin: 本地数据存储 @yanyongyu (#292)
    • Plugin: bilibili视频、番剧解析 @yanyongyu (#287)
    • Plugin: 插件管理器 @yanyongyu (#267)

    🍻 Bot Publish

    • Bot: Omega Miya @yanyongyu (#280)
    • Bot: HarukaBot @yanyongyu (#278)
    Source code(tar.gz)
    Source code(zip)
  • v2.0.0a11(Mar 5, 2021)

    Documentation

    See: https://v2.nonebot.dev

    💫 Changes

    • Fix: 缩写查询插件 repo @yanyongyu (#254)
    • Docs: 添加 Vercel 文档镜像链接 @StarHeartHunt (#246)
    • Docs: update how-to-work doc @AkiraXie (#242)
    • fix nonebot_plugin_cocdicer link error @abrahum (#236)
    • Fix: site deploy ci @yanyongyu (#231)
    • Update installation.md @danuonuo (#226)
    • Fix: plugin import hook and remove literal type @yanyongyu (#224)
    • Docs: 添加 从IDE启动的相关问题 提示 @StarHeartHunt (#217)
    • Fix: nonebot-plugin-ncm repo link error @yanyongyu (#215)
    • Doc: use github action instead of netlify ci/cd @yanyongyu (#211)
    • Update Docs @yanyongyu (#206)
    • Docs: 添加“运行时钩子”一节 @StarHeartHunt (#205)
    • Update docs for 2.0.0a10 @yanyongyu (#204)

    💥 Breaking Changes

    • Pre Release 2.0.0a11 @yanyongyu (#260)
    • Breaking: change nonebot project structure @yanyongyu (#218)

    🚀 Features

    • Breaking: change nonebot project structure @yanyongyu (#218)

    🐛 Bug Fixes

    • Fix: prompt type error @yanyongyu (#255)
    • Bug: adapter can be register more than once @yanyongyu (#243)
    • Fix: fix single session bug @AkiraXie (#238)

    🍻 Plugin Publish

    • Plugin: biliav小程序转换器 @yanyongyu (#259)
    • Plugin: 缩写查询器 @yanyongyu (#251)
    • Plugin: 猜猜看 @yanyongyu (#249)
    • Plugin: nonebot-plugin-r6s @yanyongyu (#245)
    • Plugin: 跑团记录记录器 @yanyongyu (#233)
    • Plugin: nonebot-plugin-cocdicer @yanyongyu (#230)
    • Plugin: 网易云无损音乐下载 @yanyongyu (#214)
    • Plugin: hk-reporter @yanyongyu (#210)
    • Plugin: Arcaea 查分器 @yanyongyu (#208)
    Source code(tar.gz)
    Source code(zip)
  • v2.0.0a10(Feb 7, 2021)

    Documentation

    See: https://v2.nonebot.dev

    💫 Changes

    • Pre Release 2.0.0a10 @mnixry (#202)
    • Docs: 错别字 @StarHeartHunt (#200)
    • Docs: update export-and-require doc @AkiraXie (#197)

    🚀 Features

    • New: 添加一个使用Quart的Driver @mnixry (#196)

    🐛 Bug Fixes

    • Hotfix: error module name for plugin wordbank @yanyongyu (#201)
    • Bug: 修复在Mirai中命令匹配无效的Bug @mnixry (#199)
    • Bug: 修复由于消息未转义导致的日志出错 @mnixry (#195)
    Source code(tar.gz)
    Source code(zip)
  • v2.0.0a9.post1(Feb 5, 2021)

    Documentation

    See: https://v2.nonebot.dev

    💫 Changes

    • Pre Release 2.0.0a9.post1 @yanyongyu (#194)
    • Docs: 优化文档语言表达 @StarHeartHunt (#188)

    🐛 Bug Fixes

    • Fix: MatcherGroup rule override @yanyongyu (#193)
    Source code(tar.gz)
    Source code(zip)
  • v2.0.0a9(Feb 2, 2021)

    Documentation

    See: https://v2.nonebot.dev

    💫 Changes

    • Pre Release 2.0.0a9 @yanyongyu (#187)
    • Update scheduler.md @StarHeartHunt (#184)
    • Fix rule override state @yanyongyu (#183)
    • Update creating-a-matcher.md @StarHeartHunt (#158)
    • Fix typo @theprimone (#143)
    • Fix: empty message when using array post format @yanyongyu (#140)

    🚀 Features

    • Feat:Support shell-like command @AkiraXie (#186)
    • New: 添加 mirai-api-http 的 adapter 支持 @mnixry (#179)
    • New: common config loading from .env @yanyongyu (#166)
    • add fastapi driver configs @yanyongyu (#149)

    🍻 Plugin Publish

    • Plugin: 风格化字符串管理 @yanyongyu (#182)
    • Plugin: songpicker2 @yanyongyu (#178)
    • Plugin: 消息交互式 python 解释器 @yanyongyu (#175)
    • Plugin: mqtt接入 @yanyongyu (#173)
    • Plugin: 冷却事件 @yanyongyu (#168)
    • Plugin: nonebot-plugin-wordbank @yanyongyu (#164)
    • Plugin: 模拟抽卡 @yanyongyu (#160)
    Source code(tar.gz)
    Source code(zip)
  • v2.0.0a8.post2(Jan 2, 2021)

    Documentation

    See: https://v2.nonebot.dev

    💫 Changes

    • Pre Release 2.0.0a8.post2 @yanyongyu (#138)

    🐛 Bug Fixes

    • fix cqhttp message type guess @yanyongyu (#137)
    • fix incorrect removing temp matcher @yanyongyu (#135)
    Source code(tar.gz)
    Source code(zip)
  • v2.0.0a8.post1(Jan 1, 2021)

    Documentation

    See: https://v2.nonebot.dev

    💫 Changes

    • Pre Release 2.0.0a8.post1 @yanyongyu (#133)
    • ✏️ Fix typo @Lancercmd (#132)

    🐛 Bug Fixes

    • Fix: Group event parse error @mnixry (#131)
    Source code(tar.gz)
    Source code(zip)
  • v2.0.0a8(Dec 31, 2020)

    Documentation

    See: https://v2.nonebot.dev

    💫 Changes

    • PreRelease 2.0.0a8 @yanyongyu (#128)
    • :sparkles: Update ding adapter event logic @lengthmin (#127)
    • typo fixed @jinserrr (#125)
    • 📝 Add scheduler.md @Lancercmd (#124)
    • 修复几个错误的类型声明 @mnixry (#104)
    • 优化几处文字表达 @mnixry (#103)

    🚀 Features

    • New: WebSocket Connection Hook @yanyongyu (#123)
    • New: add state factory support @yanyongyu (#115)

    🍻 Plugin Publish

    • Plugin: translator @yanyongyu (#112)
    • Plugin: 通用数据库连接 @yanyongyu (#108)
    • Plugin: 图片搜索 @yanyongyu (#106)
    • Plugin: 定时任务 @yanyongyu (#102)
    • Plugin: 前端测试机器人插件 @yanyongyu (#100)
    Source code(tar.gz)
    Source code(zip)
  • v2.0.0a7(Dec 4, 2020)

    Documentation

    See: https://v2.nonebot.dev

    💫 Changes

    • PreRelease 2.0.0a7 @yanyongyu (#98)
    • Plugin: 合并nonebot-plugin-docs @yanyongyu (#88)
    • Plugin: 合并docs插件至官方仓库 @yanyongyu (#87)
    • :construction_worker: update user info for pr @yanyongyu (#83)
    • Workflow hot fix @yanyongyu (#81)
    • Fix: GHSL-2020-244 @yanyongyu (#80)
    • :construction_worker: update plugin issue bot @he0119 (#72)

    💥 Breaking Changes

    • Refactor: 更新内置 register_adapter 逻辑 @yanyongyu (#92)
    • Breaking change: remove built-in scheduler support @yanyongyu (#91)

    🚀 Features

    • New: Add MatcherGroup like CommandGroup @yanyongyu (#97)
    • :sparkles: Add ding adapter @lengthmin (#94)
    • Fix: 修复cqhttp相关bug以及plugin export/require支持 @yanyongyu (#73)
    • ci: 添加插件议题机器人 @he0119 (#71)
    • 传递matcher抛出的StopPropagation @rMuchan (#67)

    🐛 Bug Fixes

    • Fix: 修复cqhttp相关bug以及plugin export/require支持 @yanyongyu (#73)
    • Fix: running expired matcher @yanyongyu (#70)
    • Fix: resolve reply message @yanyongyu (#68)
    • 修复了at机器人时的IndexError @synodriver (#64)

    🍻 Plugin Publish

    • Plugin: Sentry日志监控 @yanyongyu (#77)
    • Plugin NoneBot离线文档 @yanyongyu (#75)
    • Plugin: rauthman @yanyongyu (#63)
    Source code(tar.gz)
    Source code(zip)
  • v2.0.0a6(Nov 18, 2020)

    Documentation

    See: https://v2.nonebot.dev

    Changes

    • Pre Release: 2.0.0a6 @yanyongyu (#61)
    • Plugin Haruka Bot @yanyongyu (#58)
    • Pre Release: 2.0.0a5 @yanyongyu (#57)
    • Plugin: nonebot-plugin-status @yanyongyu (#52)
    • ♻️ add adapters/cqhttp directory @lengthmin (#48)

    🚀 Features

    • New: add __version__ for nonebot module @yanyongyu (#53)
    • New: add pre and post processors (#40) @yanyongyu (#45)

    🐛 Bug Fixes

    • 修复阻止事件传递信号无效的问题 @he0119 (#60)
    • Fix: 修复matcher删除逻辑 @yanyongyu (#54)
    Source code(tar.gz)
    Source code(zip)
  • v2.0.0a4(Nov 4, 2020)

    Documentation

    See: https://v2.nonebot.dev

    Changes

    • Pre Release: 2.0.0a4 @yanyongyu (#43)
    • New: 插件广场 @yanyongyu (#41)
    • Update README @Ayayaneru (#38)
    • Issue33: 修改Command实现逻辑 @yanyongyu (#34)
    • Docs: update vuepress theme and versioning plugin @yanyongyu (#28)

    🚀 Features

    • add result to state when regex rule matched @rkroom (#37)

    🐛 Bug Fixes

    • Fix: Plugin publish template @yanyongyu (#42)
    • Fix: 修复部分bug并优化文档 @yanyongyu (#39)
    • Issue35:修改鉴权限制 @yanyongyu (#36)
    Source code(tar.gz)
    Source code(zip)
  • v2.0.0a3(Oct 11, 2020)

  • 2.0.0a2(Sep 30, 2020)

  • 2.0.0a1(Sep 24, 2020)

Owner
NoneBot
跨平台的 Python 异步聊天机器人开发框架
NoneBot
Basic-Discord-Response-Bot, in Python

Response bot for Discord. EG: User: Hello! Bot: Hello there! About Very customizable, no credits needed. Edit the bot.py to what you want, basic Pytho

rhys 1 Nov 20, 2021
RichWatch is wrapper around AWS Cloud Watch to display beautiful logs with help of Python library Rich.

RichWatch is TUI (Textual User Interface) for AWS Cloud Watch. It formats and pretty prints Cloud Watch's logs so they are much more readable. Because

21 Jul 25, 2022
Fetching tweets and integrating it with Kafka and PySpark

KafkaPySpark Zookeeper bin/zookeeper-server-start.sh config/zookeeper.properties Kafka Server bin/kafka-server-start.sh config/server.properties Kafka

Priyansh 2 Dec 29, 2021
A superb Telegram VoiceChat Player. Powered by FalconRoBo.

𝕱𝖆𝖑𝖈𝖔𝖓𝕸𝖚𝖘𝖎𝖈 A sᴜᴘᴇʀʙ Tᴇʟᴇɢʀᴀᴍ VᴏɪᴄᴇCʜᴀᴛ Pʟᴀʏᴇʀ, ᴍᴀᴅᴇ ᴜsɪɴɢ Lᴀᴛᴇsᴛ Pʏᴛʜᴏɴ ᴀɴᴅ Pʏʀᴏɢʀᴀᴍ. 𝑷𝒐𝒘𝒆𝒓𝒆𝒅 𝒃𝒚 𝑭𝒂𝒍𝒄𝒐𝒏𝑹𝒐𝑩𝒐 FalconMusic

FalconRoBo 2 Oct 21, 2022
Super simple anti-spam Discord bot

AutoAntiRaidBot Super simple anti-spam Discord bot. Will automatically kick any member with an account made under 1 day ago, and will ban any member w

Kainoa Kanter 6 Jun 27, 2022
❤️ Hi There Im EzilaX ❤️ A next gen powerful telegram group manager bot 😱 for manage your groups and have fun with other cool modules Made By Sadew Jayasekara 🔥

❤️ EzilaX v1 ❤️ Unmaintained. The new repo of @EzilaXBot is Public. (It is no longer based on this source code. The completely rewritten bot available

Sadew Jayasekara 18 Nov 24, 2021
Asyncevents: a small library to help developers perform asynchronous event handling in Python

asyncevents - Asynchronous event handling for modern Python asyncevents is a small library to help developers perform asynchronous event handling in m

Mattia 5 Aug 07, 2022
The successor of GeoSnipe, a pythonic Minecraft username sniper based on AsyncIO.

OneSnipe The successor of GeoSnipe, a pythonic Minecraft username sniper based on AsyncIO. Documentation View Documentation Features • Mojang & Micros

1 Jan 14, 2022
The Python client library for the Tuneup Technology App.

Tuneup Technology App Python Client Library The Python client library for the Tuneup Technology App. This library allows you to interact with the cust

Tuneup Technology 0 Jun 29, 2022
python library to the bitly api

bitly API python library Installation pip install bitly_api Run tests Your username is the lowercase name shown when you login to bitly, your access

Bitly 245 Aug 14, 2022
Quadrirrotor UFABC - ROS/Gazebo

QuadROS_UFABC - Repositório utilizado durante minha dissertação de mestrado para simular sistemas de controle e estimação para navegação de um quadrirrotor utilizando visão computacional.

Mateus Ribeiro 1 Dec 13, 2022
A discord bot can stress ip addresses with python tool

Python-ddos-bot Coded by Lamp#1442 A discord bot can stress ip addresses with python tool. Warning! DOS or DDOS is illegal, i shared for educational p

IrgyGANS 1 Nov 16, 2021
Bot telegram yang menggemakan pesan apa pun yang Anda kirim atau modifikasi untuk menganonimkan pesan

Bot telegram yang menggemakan pesan apa pun yang Anda kirim atau modifikasi untuk menganonimkan pesan

KEN KAN 2 Oct 21, 2022
Crystal Orb is a discord bot made from discord.py and python

Crystal orb Replacing barbot Overview Crystal Orb is a discord bot made from discord.py and python, Crystal Orb is for anti alt detection and other st

AlexyDaCoder 3 Nov 28, 2021
A simple object model for the Notion SDK.

A simplified object model for the Notion SDK. This is loosely modeled after concepts found in SQLAlchemy.

Jason Heddings 54 Jan 02, 2023
Discord bot code to stop users that are scamming with fake messages of free discord nitro on servers in order to steal users accounts.

AntiScam Discord bot code to stop users that are scamming with fake messages of free discord nitro on servers in order to steal users accounts. How to

H3cJP 94 Dec 15, 2022
Powerful Url uploader bot With Mongodb support 🔥

Uploader X Bot Telegram RoBot to Upload Links. Features: 👉 Upload YouTube-dl Supported Links to Telegram. 👉 Upload HTTP/HTTPS as File/Video to Teleg

C͡linton Abraꫝam 250 Jan 06, 2023
Discord bot for playing Werewolf game on League of Legends.

LoLWolf LoL人狼をプレイするときのDiscord用botです。 (Discord bot for playing Werewolf game on League of Legends.) 以下のボタンを押してbotをあなたのDiscordに招待することで誰でも簡単に使用することができます。

Hatsuka 4 Oct 18, 2021
Find rare users in discord servers

BadgeScraper Find rare users in discord servers How to use Replace the guild_id, server_id and token by the values you wanna use If you never used dis

20 Dec 09, 2022
cipher bot telegram

cipher-bot-telegram cipher bot telegram Telegram bot that encode/decode your messages To work correctly, you must install the latest version of python

anonim 1 Oct 10, 2021