Compare commits

...

1986 Commits

Author SHA1 Message Date
github-actions[bot]
9b45b77894 🔖 Release 2.0.0-beta.3 2022-05-20 10:21:32 +00:00
Ju4tCode
e890453870 🔖 bump version 2.0.0-beta.3 (#990) 2022-05-20 18:13:50 +08:00
github-actions[bot]
abcea78fcc 📝 Update changelog 2022-05-20 09:35:28 +00:00
Ju4tCode
80594cffb6 🔊 add export deprecation warning (#983) 2022-05-20 17:34:15 +08:00
github-actions[bot]
6d4c5cbc2d 📝 Update changelog 2022-05-20 00:45:25 +00:00
Ju4tCode
d295e9ef6b 🍻 publish plugin imageutils (#985)
Co-authored-by: MeetWq <MeetWq@users.noreply.github.com>
2022-05-20 08:44:16 +08:00
Ju4tCode
2ad46bf97a 🍻 publish bot 屑岛风Bot (#987)
Co-authored-by: kexue-z <kexue-z@users.noreply.github.com>
2022-05-20 08:43:36 +08:00
Ju4tCode
70ddc634f6 Feat: 添加 devcontainer 支持 (#981) 2022-05-19 11:55:56 +08:00
github-actions[bot]
540629aa7c 📝 Update changelog 2022-05-18 23:38:35 +00:00
黯星座
4f4369c712 ✏️ Fix typo in scheduler document (#982) 2022-05-19 07:37:23 +08:00
github-actions[bot]
c6633bc9af 📝 Update changelog 2022-05-18 08:54:30 +00:00
Ju4tCode
1c099b4d13 🍻 publish plugin 摸鱼日历 (#980)
Co-authored-by: A-kirami <A-kirami@users.noreply.github.com>
2022-05-18 16:53:13 +08:00
github-actions[bot]
abe1e29fd9 📝 Update changelog 2022-05-15 05:51:01 +00:00
Ju4tCode
e8b9963ef3 🐛 Fix: 商店搜索失效 (#978) 2022-05-15 13:49:56 +08:00
github-actions[bot]
90f7c153cb 📝 Update changelog 2022-05-15 03:23:24 +00:00
Ju4tCode
983a5930c6 🍻 publish plugin 走迷宫 (#977)
Co-authored-by: EtherLeaF <EtherLeaF@users.noreply.github.com>
2022-05-15 11:22:16 +08:00
github-actions[bot]
ff65f10da9 📝 Update changelog 2022-05-15 02:36:29 +00:00
Ju4tCode
1710d009bb 🍻 publish plugin 语录娱乐 (#973)
Co-authored-by: bingqiu456 <bingqiu456@users.noreply.github.com>
2022-05-15 10:35:20 +08:00
github-actions[bot]
049d988574 📝 Update changelog 2022-05-14 15:16:43 +00:00
Ju4tCode
97fa0b4fe9 🍻 publish plugin 国内新冠疫情数据查询 (#975)
Co-authored-by: nicklly <nicklly@users.noreply.github.com>
2022-05-14 23:15:27 +08:00
github-actions[bot]
cd42385a43 📝 Update changelog 2022-05-14 13:08:07 +00:00
Ju4tCode
56f99b7f0b Feat: 支持 WebSocket 连接同时获取 str 或 bytes (#962) 2022-05-14 21:06:57 +08:00
github-actions[bot]
91c5056c97 📝 Update changelog 2022-05-14 08:55:45 +00:00
Ju4tCode
5e970a291f 🐛 fix di default param eq override (#971) 2022-05-14 16:54:41 +08:00
github-actions[bot]
42a49a20aa 📝 Update changelog 2022-05-13 15:05:36 +00:00
Ju4tCode
a4a329cf87 🍻 publish plugin nonebot_plugin_eventdone (#966)
Co-authored-by: PadorFelice <PadorFelice@users.noreply.github.com>
2022-05-13 23:04:19 +08:00
github-actions[bot]
dc074f35d5 📝 Update changelog 2022-05-13 07:36:59 +00:00
Ju4tCode
591107870e 🍻 publish plugin 幻影坦克图片合成 (#968)
Co-authored-by: RafuiiChan <RafuiiChan@users.noreply.github.com>
2022-05-13 15:35:53 +08:00
github-actions[bot]
94b19b4833 📝 Update changelog 2022-05-13 02:34:52 +00:00
Ju4tCode
1a91371410 🍻 publish plugin 合成字符画(GIF) (#964)
Co-authored-by: RafuiiChan <RafuiiChan@users.noreply.github.com>
2022-05-13 10:33:48 +08:00
github-actions[bot]
a77664297d 📝 Update changelog 2022-05-07 05:17:59 +00:00
StarHeart
b889d2352e 📝 Docs: 添加 QQ 频道链接 (#961)
* 📝 add qq channel badge

* 📝 update qq channel link

* Update README.md

Co-authored-by: Ju4tCode <42488585+yanyongyu@users.noreply.github.com>
2022-05-07 13:16:43 +08:00
github-actions[bot]
17e09267e0 📝 Update changelog 2022-05-05 02:20:00 +00:00
Ju4tCode
bbf734b2d1 🍻 publish bot ShigureBot (#959)
Co-authored-by: lgc2333 <lgc2333@users.noreply.github.com>
2022-05-05 10:18:41 +08:00
github-actions[bot]
7ab9e85dc0 📝 Update changelog 2022-05-02 11:51:05 +00:00
Ju4tCode
71bfb42fe0 🍻 publish plugin 国际象棋 (#957)
Co-authored-by: MeetWq <MeetWq@users.noreply.github.com>
2022-05-02 19:49:50 +08:00
github-actions[bot]
aeaea54ac1 📝 Update changelog 2022-05-02 05:12:14 +00:00
Ju4tCode
49437daf10 🍻 publish bot Inkar Suki (#955)
Co-authored-by: HornCopper <HornCopper@users.noreply.github.com>
2022-05-02 13:10:56 +08:00
github-actions[bot]
a93401e3b4 📝 Update changelog 2022-05-02 03:01:43 +00:00
MeetWq
e87861983b 🍻 rename nonebot-plugin-chess (#953)
Plugin: nonebot-plugin-chess 改名为 nonebot-plugin-boardgame
2022-05-02 11:00:27 +08:00
github-actions[bot]
2d81d54d93 📝 Update changelog 2022-05-01 02:30:47 +00:00
Ju4tCode
e145d99335 🍻 publish plugin NoneBot2 文档搜索 (#952)
Co-authored-by: MingxuanGame <MingxuanGame@users.noreply.github.com>
2022-05-01 10:29:40 +08:00
github-actions[bot]
7e3a58a0e8 📝 Update changelog 2022-04-30 08:05:57 +00:00
MingxuanGame
11b6e1ba98 📝 Docs: 添加 nonebug 单元测试文档 (#929)
Co-authored-by: Ju4tCode <42488585+yanyongyu@users.noreply.github.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: StarHeart <starheart233@gmail.com>
2022-04-30 16:04:41 +08:00
github-actions[bot]
34186830ab 📝 Update changelog 2022-04-30 06:45:08 +00:00
Ju4tCode
b98be416e4 🍻 publish plugin 中国象棋 (#949)
Co-authored-by: MeetWq <MeetWq@users.noreply.github.com>
2022-04-30 14:44:04 +08:00
github-actions[bot]
aaae928026 📝 Update changelog 2022-04-30 06:41:36 +00:00
@刘作鱼
1e43b4df10 📝 Add deployment document using PM2 (#853)
* Update deployment.md

重新提交 PM2 部署文档

* ♻️ 📝 Refactor PM2 deplotyment document

* ✏️ Fix typo in PM2 deployment document

* Update deployment.md

fix 表述歧义

* 🚚 copy docs to next version

Co-authored-by: Mix <32300164+mnixry@users.noreply.github.com>
Co-authored-by: yanyongyu <42488585+yanyongyu@users.noreply.github.com>
2022-04-30 14:40:25 +08:00
github-actions[bot]
505b4d46d0 📝 Update changelog 2022-04-30 02:00:37 +00:00
Mix
95331bbb22 🐛 Fix MessageTemplate improper behavior when no format spec (#947)
* 🧪 Add a test to figure out bug in #938

* ♻️ 🐛 Refactor rich message template formatting, fix #938
2022-04-30 09:59:23 +08:00
github-actions[bot]
f028575f2f 📝 Update changelog 2022-04-28 10:16:51 +00:00
Ju4tCode
252e3de459 🍻 publish plugin B站视频封面提取 (#946)
Co-authored-by: A-kirami <A-kirami@users.noreply.github.com>
2022-04-28 18:15:34 +08:00
github-actions[bot]
6449b1e9fd 📝 Update changelog 2022-04-28 09:59:12 +00:00
Ju4tCode
5334f11902 🍻 publish plugin 一言 (#944)
Co-authored-by: A-kirami <A-kirami@users.noreply.github.com>
2022-04-28 17:57:50 +08:00
github-actions[bot]
76ffcf14e8 📝 Update changelog 2022-04-28 09:49:41 +00:00
Ju4tCode
c8f25db6f6 🍻 publish plugin 答案之书 (#942)
Co-authored-by: A-kirami <A-kirami@users.noreply.github.com>
2022-04-28 17:48:22 +08:00
github-actions[bot]
4845ca10a4 📝 Update changelog 2022-04-28 09:43:10 +00:00
Ju4tCode
eec27a267a 🍻 publish plugin 支付宝到账语音 (#940)
Co-authored-by: A-kirami <A-kirami@users.noreply.github.com>
2022-04-28 17:41:13 +08:00
github-actions[bot]
3870f0084d 📝 Update changelog 2022-04-24 10:08:06 +00:00
kexue
06b36ec278 📝 Docs: 更新 GitHub Action 部署文档 (#937)
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Ju4tCode <42488585+yanyongyu@users.noreply.github.com>
2022-04-24 18:06:57 +08:00
github-actions[bot]
dcfa25c486 📝 Update changelog 2022-04-20 09:03:15 +00:00
Ju4tCode
14953f5161 🍻 publish plugin nonebot-plugin-dida (#934)
Co-authored-by: TDK1969 <TDK1969@users.noreply.github.com>
2022-04-20 17:02:06 +08:00
github-actions[bot]
16f69b045b 📝 Update changelog 2022-04-20 06:44:40 +00:00
MeetWq
533e99418c Feat: 添加 CommandStart 依赖注入参数 (#915)
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: yanyongyu <42488585+yanyongyu@users.noreply.github.com>
2022-04-20 14:43:29 +08:00
github-actions[bot]
f989710cd6 📝 Update changelog 2022-04-18 10:24:27 +00:00
Ju4tCode
e1534f2205 🍻 publish plugin 随机唐可可 (#931)
Co-authored-by: KafCoppelia <KafCoppelia@users.noreply.github.com>
2022-04-18 18:23:13 +08:00
github-actions[bot]
532aee5e71 📝 Update changelog 2022-04-16 15:47:46 +00:00
Nacho
fb047a4987 🍻 change ncm info (#924) 2022-04-16 23:46:37 +08:00
github-actions[bot]
af799aa846 📝 Update changelog 2022-04-16 02:21:11 +00:00
Ju4tCode
91f4daa722 📝 add custom rule guide (#914)
Co-authored-by: StarHeart <starheart233@gmail.com>
2022-04-16 10:20:01 +08:00
Ju4tCode
42fa47263a 🍻 publish plugin splatoon2新闻 (#917)
Co-authored-by: DrinkOolongTea <DrinkOolongTea@users.noreply.github.com>
2022-04-16 10:18:56 +08:00
dependabot[bot]
39fd544651 ⬆️ Bump codecov/codecov-action from 2 to 3 (#911)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-04-06 20:18:44 +08:00
github-actions[bot]
e5bb30e2b5 📝 Update changelog 2022-04-05 14:21:41 +00:00
Ju4tCode
a6d8f18cf0 🍻 publish plugin nonebot_plugin_draw (#910)
Co-authored-by: bingganhe123 <bingganhe123@users.noreply.github.com>
2022-04-05 22:20:27 +08:00
github-actions[bot]
47d843ddca 📝 Update changelog 2022-04-05 13:54:00 +00:00
Jigsaw
74542d30e0 📝 remove outdated plugins (#902) 2022-04-05 21:52:42 +08:00
pre-commit-ci[bot]
e12445be2f ⬆️ auto update by pre-commit hooks (#908)
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2022-04-05 11:05:37 +08:00
github-actions[bot]
d8eb7d311b 📝 Update changelog 2022-04-05 02:53:11 +00:00
Ju4tCode
7ac14bab03 🍻 publish plugin 扫雷游戏 (#907)
Co-authored-by: MeetWq <MeetWq@users.noreply.github.com>
2022-04-05 10:52:04 +08:00
github-actions[bot]
e2621b4448 📝 Update changelog 2022-04-04 02:36:23 +00:00
Ju4tCode
2f3324ce0c 🐛 Fix: Bot Hook 没有捕获跳过异常 (#905) 2022-04-04 10:35:14 +08:00
github-actions[bot]
494b9c625d 📝 Update changelog 2022-04-01 08:30:51 +00:00
Akirami
f20cf785ce 🏷️ fix some matcher's redundant optional (#904)
Fix: 修复部分事件响应器参数类型中冗余的 Optional
2022-04-01 16:29:44 +08:00
github-actions[bot]
82803ff90f 📝 Update changelog 2022-03-29 02:33:41 +00:00
Ju4tCode
d38b5602a6 🍻 publish plugin 汉兜 Handle (#899)
Co-authored-by: MeetWq <MeetWq@users.noreply.github.com>
2022-03-29 10:32:52 +08:00
github-actions[bot]
adb5fd8ca0 📝 Update changelog 2022-03-28 07:36:06 +00:00
Ju4tCode
977e1de077 🍻 publish plugin 多适配器帮助函数 (#897)
Co-authored-by: iyume <iyume@users.noreply.github.com>
2022-03-28 15:35:01 +08:00
github-actions[bot]
537866db95 📝 Update changelog 2022-03-25 13:19:16 +00:00
Ju4tCode
9ffd78dda3 🍻 publish plugin 语句抽象化 (#894)
Co-authored-by: CherryCherries <CherryCherries@users.noreply.github.com>
2022-03-25 21:18:28 +08:00
github-actions[bot]
599da5158e 📝 Update changelog 2022-03-25 10:25:27 +00:00
hemengyang
2b64e8266c 👷 CI: 修复发布机器人的意外错误 (#892)
* 🐛 fix permission error

* 👷 remove unnecessary push trigger
2022-03-25 18:24:35 +08:00
github-actions[bot]
8ccf10954a 📝 Update changelog 2022-03-25 03:44:05 +00:00
Ju4tCode
09b9a626e6 🍻 publish plugin 快速搜索 (#889)
Co-authored-by: KoishiStudio <KoishiStudio@users.noreply.github.com>
2022-03-25 11:43:06 +08:00
github-actions[bot]
1d221fddab 📝 Update changelog 2022-03-25 03:11:00 +00:00
Ju4tCode
524ed419c2 🍻 publish plugin wordle猜单词 (#891)
Co-authored-by: MeetWq <MeetWq@users.noreply.github.com>
2022-03-25 11:10:10 +08:00
github-actions[bot]
536e75f994 📝 Update changelog 2022-03-25 03:03:58 +00:00
Ju4tCode
130c2ed5c0 🍻 publish plugin MediaWiki查询 (#886)
Co-authored-by: KoishiStudio <KoishiStudio@users.noreply.github.com>
2022-03-25 11:02:54 +08:00
github-actions[bot]
3c8e705bb0 📝 Update changelog 2022-03-24 02:47:44 +00:00
Ju4tCode
87e5e15b52 🍻 publish plugin HikariSearch (#884)
Co-authored-by: MeetWq <MeetWq@users.noreply.github.com>
2022-03-24 10:46:45 +08:00
github-actions[bot]
a2abc5a714 📝 Update changelog 2022-03-23 02:43:18 +00:00
Ju4tCode
de434b3072 🍻 publish plugin 第二个leetcode查询插件 (#882)
Co-authored-by: Nranphy <Nranphy@users.noreply.github.com>
2022-03-23 10:42:15 +08:00
github-actions[bot]
614f005373 📝 Update changelog 2022-03-21 15:05:52 +00:00
MeetWq
36efa3f441 📝 remove or replace some invalid plugins (#879)
* 替代SimpleMusic插件

* 移除失效插件
2022-03-21 23:04:48 +08:00
github-actions[bot]
78a90ef7aa 📝 Update changelog 2022-03-20 11:43:57 +00:00
Ju4tCode
2e5df56d38 🍻 publish plugin 成分姬 (#878)
Co-authored-by: MeetWq <MeetWq@users.noreply.github.com>
2022-03-20 19:42:55 +08:00
github-actions[bot]
a230e98052 📝 Update changelog 2022-03-20 11:41:34 +00:00
Ju4tCode
45e2e6c280 🐛 fix event maybe converted when checking type (#876)
Fix: 修复 event 类型检查会对类型进行自动转换
2022-03-20 19:40:43 +08:00
github-actions[bot]
fcdb05a7e2 📝 Update changelog 2022-03-18 14:49:11 +00:00
Ju4tCode
8c6d5a2d1f 🍻 publish plugin Arcaea查分插件 (#875)
Co-authored-by: SEAFHMC <SEAFHMC@users.noreply.github.com>
2022-03-18 22:48:09 +08:00
github-actions[bot]
8735b61a8d 📝 Update changelog 2022-03-17 13:12:30 +00:00
Ju4tCode
02de6fd266 add rule permission reflected operation support (#872)
Feature: 添加 Rule, Permission 反向位运算支持
2022-03-17 21:11:37 +08:00
github-actions[bot]
06f8dde33c 📝 Update changelog 2022-03-17 02:57:02 +00:00
Ju4tCode
0fe3e4fb16 🍻 publish plugin QQ自动同意好友申请 (#871)
Co-authored-by: ZakiuC <ZakiuC@users.noreply.github.com>
2022-03-17 10:56:17 +08:00
github-actions[bot]
56c6f6a471 📝 Update changelog 2022-03-11 15:41:47 +00:00
Ju4tCode
58e69f7884 🍻 publish plugin 21点游戏插件 (#865)
Co-authored-by: yaowan233 <yaowan233@users.noreply.github.com>
2022-03-11 23:40:54 +08:00
github-actions[bot]
4ebbf7638c 📝 Update changelog 2022-03-11 08:43:18 +00:00
Ju4tCode
8d7507c8f2 🍻 publish plugin 色图生成 (#863)
Co-authored-by: monsterxcn <monsterxcn@users.noreply.github.com>
2022-03-11 16:42:29 +08:00
github-actions[bot]
c1c720756b 📝 Update changelog 2022-03-11 07:48:09 +00:00
Ju4tCode
a1be18f7f4 📝 fix abs link in register adapter (#861)
Docs: 修复适配器文档内商店链接
2022-03-11 15:47:22 +08:00
github-actions[bot]
e2fcfa902e 📝 Update changelog 2022-03-11 04:13:18 +00:00
StarHeart
b54f4c8d4c 📝 Docs: tips for finding adapters' document link (#860)
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: yanyongyu <42488585+yanyongyu@users.noreply.github.com>
2022-03-11 12:12:25 +08:00
github-actions[bot]
4cf07ca2e0 📝 Update changelog 2022-03-10 09:21:58 +00:00
Ju4tCode
5b3dd8f020 🍻 Plugin: bilibili通知插件 (#859)
Co-authored-by: TDK1969 <TDK1969@users.noreply.github.com>
2022-03-10 17:20:46 +08:00
Ju4tCode
9bb291e95b ⬆️ upgrade fastapi to 0.75 (#857) 2022-03-09 11:59:35 +08:00
github-actions[bot]
492c0947c3 📝 Update changelog 2022-03-05 15:36:03 +00:00
Ju4tCode
547d50ad76 🍻 Plugin: 订阅推送管理 (#855)
Co-authored-by: mwbimh <mwbimh@users.noreply.github.com>
2022-03-05 23:35:14 +08:00
github-actions[bot]
f7600a8a62 📝 Update changelog 2022-03-03 09:44:57 +00:00
Ju4tCode
9bd380a3bb 🍻 Plugin: 动漫新闻 (#852)
Co-authored-by: 5656565566 <5656565566@users.noreply.github.com>
2022-03-03 17:43:53 +08:00
github-actions[bot]
8600687f7d 📝 Update changelog 2022-03-02 09:48:28 +00:00
Ju4tCode
1d98ea1961 Plugin: 游戏王卡查 (#846)
Co-authored-by: anlen123 <anlen123@users.noreply.github.com>
2022-03-02 17:47:18 +08:00
dependabot[bot]
998db949da ⬆️ Bump actions/checkout from 2 to 3 (#844)
Bumps [actions/checkout](https://github.com/actions/checkout) from 2 to 3.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v2...v3)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-03-02 13:46:22 +08:00
github-actions[bot]
dea1b8c6fa 📝 Update changelog 2022-03-01 04:28:59 +00:00
Ju4tCode
d348f544b1 🔀 Merge pull request #843
Plugin: 二维码识别与发送
2022-03-01 12:28:08 +08:00
kexue-z
b1559eee42 🍻 publish plugin 二维码识别与发送 2022-03-01 04:02:57 +00:00
github-actions[bot]
edc7183c22 📝 Update changelog 2022-02-28 03:56:30 +00:00
Ju4tCode
ea539345cc 🔀 Merge pull request #841
Plugin: mockingbird
2022-02-28 11:55:41 +08:00
Diaosi1111
03d60dd0be 🍻 publish plugin mockingbird 2022-02-28 02:56:03 +00:00
Ju4tCode
48003a779f ⬆️ update fastapi and tomlkit (#837)
Co-authored-by: iyume <iyumelive@gmail.com>
2022-02-27 18:10:20 +08:00
github-actions[bot]
2203b82b09 📝 Update changelog 2022-02-27 07:36:59 +00:00
Ju4tCode
9fc2f7c02e 🔀 Merge pull request #839
Plugin: QQ自动续火花
2022-02-27 15:36:09 +08:00
25252www
6ee295bfd7 🍻 publish plugin QQ自动续火花 2022-02-27 07:09:39 +00:00
mobyw
6b067f0865 🔥 Plugin: 移除 nonebot-general-rss (#836) 2022-02-25 23:18:26 +08:00
Ju4tCode
339c25638b 👷 fix ci error when no changlog performed (#835) 2022-02-25 12:58:38 +08:00
Ju4tCode
e6cd3e57f5 🔀 Merge pull request #834
Plugin: update nonebot-bison
2022-02-25 12:10:19 +08:00
felinae98
69fcda5658 update nonebot-bison
支持beta
2022-02-24 22:55:30 +08:00
github-actions[bot]
88f8614cfc 📝 Update changelog 2022-02-23 07:38:38 +00:00
Ju4tCode
273b302ef2 🔀 Merge pull request #832
Plugin: 每日一句
2022-02-23 15:37:44 +08:00
MelodyYuuka
e86bab74d3 🍻 publish plugin 每日一句 2022-02-23 06:56:46 +00:00
github-actions[bot]
b1df360900 📝 Update changelog 2022-02-22 15:11:23 +00:00
CherryGS
2c271da965 📝 Add note for fastapi_reload option on Windows @CherryGS (#830)
* 添加 `fastapi_reload` 在 win 的额外影响

* 🚨 auto fix by pre-commit hooks

* Update choose-driver.md

* 🚨 auto fix by pre-commit hooks

* 调整格式

* 🚨 auto fix by pre-commit hooks

* Update website/versioned_docs/version-2.0.0-beta.2/tutorial/choose-driver.md

Co-authored-by: Mix <32300164+mnixry@users.noreply.github.com>

* Update website/versioned_docs/version-2.0.0-beta.2/tutorial/choose-driver.md

Co-authored-by: Mix <32300164+mnixry@users.noreply.github.com>

* Update website/versioned_docs/version-2.0.0-beta.2/tutorial/choose-driver.md

Co-authored-by: Mix <32300164+mnixry@users.noreply.github.com>

* Update website/versioned_docs/version-2.0.0-beta.2/tutorial/choose-driver.md

Co-authored-by: Mix <32300164+mnixry@users.noreply.github.com>

* Update website/versioned_docs/version-2.0.0-beta.2/tutorial/choose-driver.md

Co-authored-by: Mix <32300164+mnixry@users.noreply.github.com>

* Update choose-driver.md

* Update choose-driver.md

* 📝 update reload warning

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Mix <32300164+mnixry@users.noreply.github.com>
Co-authored-by: yanyongyu <42488585+yanyongyu@users.noreply.github.com>
2022-02-22 23:10:18 +08:00
github-actions[bot]
5db9c1e232 📝 Update changelog 2022-02-20 19:17:42 +00:00
Ju4tCode
b05ce41b1d 🔀 Merge pull request #829
Plugin: 原神抽卡记录分析
2022-02-21 03:16:57 +08:00
monsterxcn
bda27c78b9 🍻 publish plugin 原神抽卡记录分析 2022-02-20 19:09:12 +00:00
github-actions[bot]
6f0e27ee6d 📝 Update changelog 2022-02-20 15:18:56 +00:00
Ju4tCode
2c89409667 🔀 Merge pull request #825
Plugin: YetAnotherPicSearch
2022-02-20 23:18:01 +08:00
Ju4tCode
5adc5ce1cd 🔀 Merge pull request #826
Chore(deps): bump dependencies
2022-02-20 23:16:28 +08:00
StarHeartHunt
cad2f90b8a ⬆️ bump dependencies 2022-02-20 14:58:53 +08:00
NekoAria
b3d246cfb1 🍻 publish plugin YetAnotherPicSearch 2022-02-19 15:52:45 +00:00
github-actions[bot]
a8a6eb8c93 📝 Update changelog 2022-02-19 10:45:12 +00:00
Ju4tCode
86a73011b1 🔀 Merge pull request #822
CI: 添加更新日志忽略 label 选项
2022-02-19 18:44:23 +08:00
yanyongyu
9fb089bf08 👷 exclude label for changelog 2022-02-19 16:56:41 +08:00
github-actions[bot]
72d993921f 📝 Update changelog 2022-02-19 05:33:28 +00:00
Ju4tCode
db764f7e9e 🔀 Merge pull request #820
CI: 添加 dependabot 配置文件
2022-02-19 13:32:46 +08:00
Mix
1767f7a388 🔧 Add dependabot config file to update GitHub Actions 2022-02-19 11:51:07 +08:00
github-actions[bot]
fc45c67d97 📝 Update changelog 2022-02-19 03:22:02 +00:00
Ju4tCode
87885bd878 🔀 Merge pull request #819
Docs: 修复 ci/cd action 中错误的版本号
2022-02-19 11:21:20 +08:00
Bubbleioa
d75a04b31a fix bobheadxi/deployments version
在 [github action](https://github.com/Bubbleioa/ioa-bot/runs/5250225969) 上出错 
Error: Unable to resolve action `bobheadxi/deployments@v0.6`, unable to find version `v0.6`

最新版本为 v0.6.2
2022-02-19 00:40:01 +08:00
github-actions[bot]
12313204e1 📝 Update changelog 2022-02-18 08:00:02 +00:00
Ju4tCode
4573235583 🔀 Merge pull request #816
Docs: 添加 netlify 标签
2022-02-18 15:59:21 +08:00
yanyongyu
4293bdf21f 🎨 add dark theme support 2022-02-18 15:46:59 +08:00
yanyongyu
baae3e48de 🍻 add netlify badge 2022-02-18 14:53:24 +08:00
github-actions[bot]
24df95ae4a 📝 Update changelog 2022-02-18 06:08:33 +00:00
Ju4tCode
6b50a57348 🔀 Merge pull request #815
Fix: 修复 on_fullmatch 返回类型错误
2022-02-18 14:07:41 +08:00
yanyongyu
6920ec3a11 🏷️ fix fullmatch return type error 2022-02-18 11:12:19 +08:00
github-actions[bot]
6586f28f6a 📝 Update changelog 2022-02-18 03:05:38 +00:00
Ju4tCode
192c8da09c 🔀 Merge pull request #797
Feature: 新增文本完整匹配规则
2022-02-18 11:04:49 +08:00
Mix
1fba27d9b8 Fix failed full match test 2022-02-17 23:50:00 +08:00
Mix
0f0dc0a818 improve full match performance with frozenset 2022-02-17 23:49:47 +08:00
github-actions[bot]
3c3a250180 📝 Update changelog 2022-02-17 08:45:14 +00:00
Ju4tCode
03d33f3bdc 🔀 Merge pull request #814
CI: 分离 pr 预览 action
2022-02-17 16:44:31 +08:00
yanyongyu
1147d67f1a 👷 separate website ci for pr checking 2022-02-17 16:30:01 +08:00
github-actions[bot]
98e5956d44 📝 Update changelog 2022-02-17 08:00:39 +00:00
Ju4tCode
999a6a0e10 🔀 Merge pull request #813
Docs: 减小更新日志 toc 最大显示等级
2022-02-17 15:59:43 +08:00
github-actions[bot]
ff2675b527 📝 Update changelog 2022-02-17 07:56:39 +00:00
Ju4tCode
daa026cfd7 🔀 Merge pull request #812
Fix: 修复 DataclassEncoder 嵌套 encode 的问题
2022-02-17 15:55:56 +08:00
yanyongyu
d4d3962177 🎨 reduce changelog toc level 2022-02-17 15:44:49 +08:00
yanyongyu
1d6a333b49 update dataclass encoder tests 2022-02-17 15:35:39 +08:00
pre-commit-ci[bot]
9c0e05c615 🚨 auto fix by pre-commit hooks 2022-02-17 07:12:29 +00:00
github-actions[bot]
258bdbe403 📝 Update changelog 2022-02-17 07:11:16 +00:00
AkiraXie
c48ddaf0a2 🐛 fix DataclassEncoder bug and add test case 2022-02-17 15:06:26 +08:00
github-actions[bot]
9dd989c627 📝 Update changelog 2022-02-16 15:19:06 +00:00
Ju4tCode
3d84844a58 🔀 Merge pull request #810
Plugin: 60s读世界小插件
2022-02-16 23:18:20 +08:00
bingganhe123
d63d434e0f 🍻 publish plugin 60s读世界小插件 2022-02-16 15:03:00 +00:00
github-actions[bot]
5216a5b8f2 📝 Update changelog 2022-02-16 12:29:53 +00:00
hemengyang
4107affb9b Docs: 修改议题模板中的错误链接 (#807) 2022-02-16 20:29:04 +08:00
github-actions[bot]
b898303e4d 📝 Update changelog 2022-02-16 12:25:05 +00:00
Mix
43aebd9c93 Docs: 修改消息模板文档中错误的样例 (#806)
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Ju4tCode <42488585+yanyongyu@users.noreply.github.com>
2022-02-16 20:24:00 +08:00
github-actions[bot]
fcda5c37d7 📝 Update changelog 2022-02-16 11:45:11 +00:00
Lan
1412385e51 Fix: 修改错误的插件 PyPI 项目名称 (#804)
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Ju4tCode <42488585+yanyongyu@users.noreply.github.com>
2022-02-16 19:44:29 +08:00
github-actions[bot]
00fab9143e 📝 Update changelog 2022-02-16 11:36:28 +00:00
Ju4tCode
5e17d4c2f9 🔀 Merge pull request #798
Docs: 更新贡献指南
2022-02-16 19:35:42 +08:00
github-actions[bot]
d7de928f22 📝 Update changelog 2022-02-16 10:00:23 +00:00
Ju4tCode
83ff7a3a6c 🔀 Merge pull request #805
CI: 减少 action 冗余运行
2022-02-16 17:59:33 +08:00
yanyongyu
6f9c9eb740 🔧 change latest changes to chinese 2022-02-16 17:51:17 +08:00
yanyongyu
6272dfd46a 🔥 remove unused condition 2022-02-16 17:04:12 +08:00
yanyongyu
ab78769822 🐛 fix concurrency missing matrix 2022-02-16 14:41:39 +08:00
yanyongyu
004a308765 👷 disable auto push 2022-02-16 14:28:44 +08:00
yanyongyu
98e0ec27ee ✏️ fix changelog typo 2022-02-16 14:19:26 +08:00
yanyongyu
a491d842db 👷 reduce ci redundant run 2022-02-16 14:17:33 +08:00
github-actions[bot]
722fc6c6e1 📝 Update changelog 2022-02-16 04:12:35 +00:00
Ju4tCode
a5fffe2a4f 🔀 Merge pull request #803
Plugin: pixiv.net p站查询图片
2022-02-16 12:12:10 +08:00
github-actions[bot]
5f1f84327d 📝 Update changelog 2022-02-16 04:05:34 +00:00
Ju4tCode
3d8ac3e789 🔀 Merge pull request #802
CI: fix ci permission error
2022-02-16 12:05:13 +08:00
anlen123
c05eea2b67 🍻 publish plugin pixiv.net p站查询图片 2022-02-16 04:03:22 +00:00
yanyongyu
a6299bec8f 💚 fix ci permission error 2022-02-16 11:49:45 +08:00
Ju4tCode
513c14ee78 🔀 Merge pull request #799
CI: 添加更新日志自动更新 action
2022-02-16 11:30:56 +08:00
yanyongyu
987e44e1d0 👷 update ci config 2022-02-16 11:10:54 +08:00
jigsaw
e7937e5a06 📝 update contributing guide 2022-02-16 10:33:21 +08:00
yanyongyu
962c71ea4e 👷 update changelog ci 2022-02-15 23:39:04 +08:00
Ju4tCode
04e9a50bc1 📝 update contributing guide
Co-authored-by: Mix <32300164+mnixry@users.noreply.github.com>
2022-02-15 23:03:56 +08:00
yanyongyu
4bd1b92e9f 📝 update contributing guide 2022-02-15 21:10:07 +08:00
pre-commit-ci[bot]
f737bb899c 🚨 auto fix by pre-commit hooks 2022-02-15 00:27:43 +00:00
Akirami
9f12404338 add full match Matcher 2022-02-15 08:20:29 +08:00
github-actions
cee96d8ab6 🔖 Release 2.0.0-beta.2 2022-02-14 16:27:11 +00:00
Ju4tCode
14703fce8d 🔀 Merge pull request #796
⬆️ bump version 2.0.0-beta.2
2022-02-15 00:17:33 +08:00
hemengyang
6d0c782fcc ⬆️ bump version 2.0.0-beta.2 2022-02-15 00:11:19 +08:00
hemengyang
0cceeaec0b 👷 fix release-drafter 2022-02-15 00:05:20 +08:00
Ju4tCode
803223f31c 🔀 Merge pull request #790
Release: 2.0.0-beta.2
2022-02-14 23:55:05 +08:00
yanyongyu
6ceaf51af7 👷 prepare for changelog automation 2022-02-14 21:54:38 +08:00
yanyongyu
8f38fc5795 👷 update ci workflow 2022-02-14 21:01:39 +08:00
yanyongyu
257c49466f ⚰️ remove beta1 docs 2022-02-14 19:53:27 +08:00
Mix
85d86dfa96 📝 Add project code of conduct (#794)
* 📝 add project code of conduct

* 🚨 auto fix by pre-commit hooks

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2022-02-14 17:40:36 +08:00
AkiraXie
925886534c 📝 refactor dependency-injection documents (#791)
* 📝 update dependency-injection docs

* 🚨 auto fix by pre-commit hooks

* 📝 fix some indent

* 📝 fix description

* 📝 add create callable in DI docs

* 🚨 auto fix by pre-commit hooks

* 📝 delete unused params in docs

* 📝 update di docs

* 🚨 auto fix by pre-commit hooks

* 📝 update di doc

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: yanyongyu <42488585+yanyongyu@users.noreply.github.com>
2022-02-14 17:26:55 +08:00
yanyongyu
9a53b415d9 ✏️ fix plugin structure typo 2022-02-14 10:53:56 +08:00
yanyongyu
a884869ae2 ⬆️ update test dependencies 2022-02-13 21:56:12 +08:00
Mix
04fe654d74 📝 Add document for message template (#789)
* 📝 Add document for message template

* 📝 🎨 Optimize example reading experience for message template

* 🚨 auto fix by pre-commit hooks

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2022-02-12 16:15:06 +08:00
yanyongyu
ff887481ee 📝 add custom api doc 2022-02-12 14:07:42 +08:00
yanyongyu
0bfe1ce433 ⬆️ upgrade dependencies 2022-02-11 17:22:46 +08:00
Ju4tCode
80bf73e0e9 🔀 Merge pull request #788
Plugin: おはよう!
2022-02-11 17:16:11 +08:00
KafCoppelia
a8694aee23 🍻 publish plugin おはよう! 2022-02-11 06:24:02 +00:00
yanyongyu
943de58826 🏷️ fix typing error 2022-02-11 11:25:31 +08:00
yanyongyu
c0af89a6ad ⬆️ upgrade dependencies 2022-02-11 11:24:34 +08:00
Ju4tCode
b076497823 🔀 Merge pull request #786
Bot: 琪露诺Bot
2022-02-11 10:49:54 +08:00
summerkirakira
a416b4315a 🍻 publish bot 琪露诺Bot 2022-02-10 19:11:57 +00:00
Ju4tCode
4f91e63759 🔀 Merge pull request #782
Bugfix: Potential message body injection vulnerability in MessageTemplate
2022-02-10 15:44:41 +08:00
Mix
dc982fe5eb Fix update cause failed test 2022-02-10 15:12:27 +08:00
Ju4tCode
1b17039fe1 🔀 Merge pull request #784
Plugin: 轻量文字转图片插件
2022-02-10 15:01:33 +08:00
mobyw
b4fc9f9539 🍻 publish plugin 轻量文字转图片插件 2022-02-10 06:11:55 +00:00
Mix
b7762b9176 🔒 🐛 Add initial value to vformat results list, fix #781 2022-02-10 13:17:11 +08:00
Mix
455c599b06 🧪 Add a fail test to reproduce #781 2022-02-10 13:15:59 +08:00
yanyongyu
e9908bcbc4 🔧 change docusaurus prism config 2022-02-08 14:59:54 +08:00
yanyongyu
fba9471fe6 📝 add deploy guide 2022-02-08 14:46:43 +08:00
Ju4tCode
58bceff175 🔀 Merge pull request #769
Docs: Fix copywriting
2022-02-08 10:50:59 +08:00
yanyongyu
c45843e32d ⬆️ upgrade dependencies 2022-02-07 19:56:39 +08:00
yanyongyu
aefe16f2c7 📝 update onebot homepage 2022-02-07 17:46:02 +08:00
yanyongyu
460efe436d 📝 add message document 2022-02-07 17:40:26 +08:00
Satoshi Jek
aacfc9b90c Plugin: 修改 nonebot-plugin-strman 错误的 module_name (#780) 2022-02-07 14:59:05 +08:00
yanyongyu
7d190213b7 📝 update readme badge 2022-02-07 14:12:08 +08:00
yanyongyu
ae37f31e38 🔀 Merge branch master 2022-02-07 11:38:52 +08:00
yanyongyu
6f90dcb12f 🚚 move call api doc 2022-02-07 11:30:24 +08:00
Ju4tCode
5ce72655e2 🔀 Merge pull request #772
Fix Message.template format spec does not support static method
2022-02-07 10:59:43 +08:00
Ju4tCode
9ed5d915d5 🔀 Merge pull request #779
Plugin: Fgo从者推理
2022-02-07 10:54:45 +08:00
suhexia
c4d82aa21b 🍻 publish plugin Fgo从者推理 2022-02-06 16:48:48 +00:00
Ju4tCode
319b3ff20e 🔀 Merge pull request #777
Plugin: 无数据库的问答插件
2022-02-06 22:53:51 +08:00
kexue-z
5e19ad672e 🍻 publish plugin 无数据库的问答插件 2022-02-06 14:26:00 +00:00
Ju4tCode
2d276a6b7a 🔀 Merge pull request #775
Plugin: random_cat_gif
2022-02-06 22:25:34 +08:00
applenana
e98e784fe7 🍻 publish plugin random_cat_gif 2022-02-06 13:59:58 +00:00
Satoshi Jek
f4120d91e0 🔀 Plugin: 风格化字符串管理 商店信息更新 (#773)
* chore(plugins): 插件仓库重定向

* chore(plugins): 补充修改作者信息
2022-02-06 21:37:27 +08:00
Jigsaw
2f51afc007 🔀 Merge branch 'dev' into docs/fix-copywriting 2022-02-06 19:50:50 +08:00
jigsaw
b9fd4b1ac8 📝 Fix copywriting 2022-02-06 19:46:14 +08:00
Mix
f4395d77d7 Add test to prove the fix is valid 2022-02-06 18:55:19 +08:00
Mix
28cfa45d95 🐛 Fix Message.template format spec does not support static method
Fixes #770
2022-02-06 18:40:30 +08:00
Ju4tCode
b90054e61b 🔀 Merge pull request #771
Feature: refactor and support bot connection hook
2022-02-06 18:16:18 +08:00
yanyongyu
1ee7f73d59 🔧 remove duplicated isort black config 2022-02-06 17:24:06 +08:00
yanyongyu
118519e15d ♻️ reorganize internal tree 2022-02-06 17:08:11 +08:00
yanyongyu
65dc9a908b 📝 update doc link 2022-02-06 15:37:36 +08:00
yanyongyu
924d9b6536 ✏️ fix changelog and typing 2022-02-06 15:24:41 +08:00
yanyongyu
fd11e2696b ♻️ reorganize class and add bot hook di 2022-02-06 14:52:50 +08:00
yanyongyu
b8456b12ad ✏️ fix matcher operation typo 2022-02-05 16:51:57 +08:00
yanyongyu
dcaf5cedcf 💡 update matcher docstrings 2022-02-05 16:49:21 +08:00
Ju4tCode
2cd2ea6ca4 🔀 Merge pull request #765
Docs: update some advanced docs
2022-02-05 12:38:48 +08:00
Ju4tCode
6e8978710a 🔀 Merge pull request #767
Plugin: 群聊反闪照
2022-02-05 12:35:55 +08:00
KafCoppelia
7e5c179641 🍻 publish plugin 群聊反闪照 2022-02-05 03:33:04 +00:00
AkiraXie
86aa3ef2e8 📝 update export-and-require and permission docs 2022-02-04 21:52:00 +08:00
AkiraXie
994b99e462 📝 fix indent 2022-02-04 15:45:21 +08:00
pre-commit-ci[bot]
b0b2b1f681 🚨 auto fix by pre-commit hooks 2022-02-04 07:15:37 +00:00
AkiraXie
4e1e0e98b4 Merge branch 'nonebot:dev' into dev 2022-02-04 15:14:06 +08:00
AkiraXie
a68a6e2659 ✏️ fix typo in fastapi 2022-02-04 15:13:31 +08:00
AkiraXie
e8bb66ca48 📝 update some advanced docs 2022-02-04 15:12:02 +08:00
yanyongyu
e720584044 change hook parse typing 2022-02-04 11:12:17 +08:00
yanyongyu
ec9e8511b7 reduce the hook typing limit 2022-02-04 11:06:38 +08:00
Ju4tCode
3a314fc7ae 🔀 Merge pull request #763
update plugin info
2022-02-03 21:27:11 +08:00
kexue
fe5e5428dd 🍻 update plugin info 2022-02-03 18:05:43 +08:00
Ju4tCode
e37e6d0714 🔀 Merge pull request #762
Plugin: random-cat
2022-02-02 17:54:26 +08:00
alphaAE
7cdcfd02ab 🍻 publish plugin random-cat 2022-02-02 08:47:52 +00:00
Ju4tCode
578f0fb619 🔀 Merge pull request #760
Plugin: nonebot-plugin-setu2
2022-02-02 16:46:54 +08:00
alphaAE
3408f27a77 🍻 publish plugin nonebot-plugin-setu2 2022-02-02 08:35:14 +00:00
Ju4tCode
0fd7c77640 🔀 Merge pull request #758
Plugin: 聊天记录插件
2022-01-31 23:14:18 +08:00
MeetWq
613fc09382 🍻 publish plugin 聊天记录插件 2022-01-31 14:59:33 +00:00
yanyongyu
4d5cc03454 📝 add handler running doc 2022-01-31 14:29:26 +08:00
yanyongyu
09b438485a ✏️ fix typo 2022-01-31 12:44:33 +08:00
yanyongyu
c7883863c7 🐛 fix asciinema ssr failed 2022-01-30 18:26:26 +08:00
yanyongyu
60ccdf8a7a 🐛 fix typing error for logger wrapper 2022-01-30 15:03:10 +08:00
yanyongyu
ea188cb948 📝 add custom log guide 2022-01-30 14:11:27 +08:00
yanyongyu
244c7266b3 📝 update changelog 2022-01-30 13:21:51 +08:00
yanyongyu
1eaacde745 ⬆️ upgrade dependencies 2022-01-30 13:18:50 +08:00
yanyongyu
c33e7eca46 ⬆️ upgrade dependencies 2022-01-30 13:13:55 +08:00
Ju4tCode
bdf2f4771b 🔀 Merge pull request #752
Fix: rewrite message typing and construct
2022-01-30 13:06:54 +08:00
yanyongyu
2cd6867bd1 add more tests 2022-01-30 11:04:02 +08:00
yanyongyu
f3cc93c699 add more tests 2022-01-30 00:05:01 +08:00
Ju4tCode
244b3c02a8 🔀 Merge pull request #756
Plugin: FG(Fifth Generation)
2022-01-29 23:56:57 +08:00
yanyongyu
2ec5917709 🐛 fix missing self instance validate 2022-01-29 23:55:14 +08:00
mgsky1
a0d9c4e1a0 🍻 publish plugin FG(Fifth Generation) 2022-01-29 15:43:24 +00:00
yanyongyu
5abf55d095 add message tests 2022-01-29 23:39:13 +08:00
Ju4tCode
34e2535390 🔀 Merge pull request #754
Plugin: 词云
2022-01-29 22:20:45 +08:00
yanyongyu
5fa7806a2f improve pydantic validate for message 2022-01-29 18:20:30 +08:00
he0119
1b674496ed 🍻 publish plugin 词云 2022-01-29 09:56:21 +00:00
yanyongyu
b43dfb983d ⚰️ remove unused import 2022-01-29 15:36:25 +08:00
yanyongyu
e887c39998 🏷️ update message typing 2022-01-29 13:56:54 +08:00
jigsaw
4c2269f789 ✏️ Fix typo 2022-01-28 20:46:27 +08:00
Ju4tCode
ac0dd63ca4 🔀 Merge pull request #749
CI: avoid duplicate CI runs
2022-01-28 16:48:06 +08:00
Ju4tCode
a8a68d89a2 🔀 Merge pull request #751
Plugin: 棋类游戏
2022-01-28 16:42:38 +08:00
MeetWq
942bb8761e 🍻 publish plugin 棋类游戏 2022-01-28 07:20:26 +00:00
yanyongyu
ad712c59b3 reuse type check code for dependent 2022-01-28 14:49:04 +08:00
yanyongyu
1271a757c9 👽 update type check due to py3.10 UnionType 2022-01-28 14:27:54 +08:00
Ju4tCode
ea8a700f86 🔀 Merge pull request #745
Docs: Add CONTRIBUTING
2022-01-28 14:05:36 +08:00
pre-commit-ci[bot]
fd8fd233b6 🚨 auto fix by pre-commit hooks 2022-01-28 06:04:57 +00:00
StarHeartHunt
d06e06eba2 👷 avoid duplicate CI runs 2022-01-28 14:03:19 +08:00
jigsaw
392def7936 📝 Update CONTRIBUTING
Co-authored-by: Ju4tCode <42488585+yanyongyu@users.noreply.github.com>
2022-01-28 13:21:45 +08:00
Jigsaw
c4d08d13cb ✏️ Fix typo
Co-authored-by: Ju4tCode <42488585+yanyongyu@users.noreply.github.com>
2022-01-28 13:21:45 +08:00
jigsaw
ffab125f02 📝 Update CONTRIBUTING
Co-authored-by: Mix <32300164+mnixry@users.noreply.github.com>
Co-authored-by: StarHeartHunt <starheart233@gmail.com>
2022-01-28 13:17:41 +08:00
yanyongyu
0b150d35f7 ✏️ fix isort line length typo 2022-01-28 12:32:19 +08:00
yanyongyu
15d68706b3 📝 add asciinema svg to install doc 2022-01-27 21:24:56 +08:00
jigsaw
2924c74333 📝 Add CONTRIBUTING 2022-01-27 18:58:10 +08:00
yanyongyu
afea004421 📝 update readme 2022-01-27 16:05:30 +08:00
Ju4tCode
1b08e0d822 🔀 Merge pull request #748
Fix: dict(config) raise error
2022-01-27 11:31:05 +08:00
yanyongyu
1da7da9fc1 🐛 fix dict(config) raise error 2022-01-27 11:15:44 +08:00
Mix
1b6b9d61fe 🔀 Merge pull request #747
Plugin: go-cqhttp 频道支持适配补丁
2022-01-26 22:53:51 +08:00
mnixry
b222863f63 🍻 publish plugin go-cqhttp 频道支持适配补丁 2022-01-26 14:52:54 +00:00
Ju4tCode
e1dffa99a0 🔀 Merge pull request #743
Fix: require load plugin error
2022-01-26 21:20:43 +08:00
yanyongyu
0885474b94 improve plugin finder 2022-01-26 20:55:23 +08:00
yanyongyu
482fba234b 📝 add nb-cli doc 2022-01-26 16:21:18 +08:00
yanyongyu
770e808f1d add require tests 2022-01-26 15:37:35 +08:00
Ju4tCode
fdf05173be 🔀 Merge pull request #741
Update plugins.json
2022-01-26 15:10:52 +08:00
yanyongyu
5c73c80c65 🐛 fix require error 2022-01-26 15:06:53 +08:00
KafCoppelia
bda2991c30 Update plugins.json
删去了自己几个已经适配b1的alpha标签;修改了自己几个插件的描述,统一风格;修改了几个原a:cqhttp标签为a:onebot
2022-01-26 14:18:59 +08:00
KafCoppelia
efbfea3d94 Update plugins.json
由于均适配beta.1,将fortune与what2eat插件“alpha”tag删除;修改几个插件“desc”字段描述,统一描述风格;
2022-01-26 14:09:09 +08:00
yanyongyu
956ee7e321 📝 add bot api doc 2022-01-26 12:30:05 +08:00
Ju4tCode
ba8dfb6d94 🔀 Merge pull request #739
Plugin: nonebot-general-rss
2022-01-26 11:02:59 +08:00
Mix
1a202e918d 🔥 remove plugins with wrong dependencies 2022-01-25 21:43:10 +08:00
mobyw
2e78de3d5d 🍻 publish plugin nonebot-general-rss 2022-01-25 11:27:15 +00:00
yanyongyu
f53e374521 ✏️ fix doc api link error 2022-01-25 16:03:49 +08:00
Ju4tCode
b773083b4e 🔀 Merge pull request #737
Fix wrong module name
2022-01-25 10:43:38 +08:00
Lan
ebd45dc5c1 🏷️ Update types 2022-01-25 10:19:37 +08:00
Lan
2f61c6a6f9 ✏️ Fix wrong module name 2022-01-25 10:09:20 +08:00
Mix
22597959cf 🔀 Merge pull request #736
Plugin: NoneBot的go-cqhttp启动器
2022-01-24 21:41:51 +08:00
mnixry
6b930cd7be 🍻 publish plugin NoneBot的go-cqhttp启动器 2022-01-24 13:41:00 +00:00
yanyongyu
c8369f599f 📝 add configuration and matcher operation 2022-01-24 20:32:46 +08:00
Ju4tCode
c09ecb4a88 🔀 Merge pull request #734
Plugin: NoneBot 数据存储
2022-01-24 16:39:11 +08:00
Ju4tCode
74c3961998 🔀 Merge pull request #732
修改自己几个插件的Tag
2022-01-24 16:38:23 +08:00
Ju4tCode
e7b2dde44a ✏️ fix trailing comma 2022-01-24 16:25:40 +08:00
风屿
77faa027bd 删掉了v:voice的tag 2022-01-24 15:37:24 +08:00
he0119
40f7c4013b 🍻 publish plugin NoneBot 数据存储 2022-01-24 07:24:19 +00:00
风屿
ba6a440bbd 修改自己几个插件的Tag 2022-01-24 14:23:38 +08:00
Ju4tCode
d0d6e0fc25 🔀 Merge pull request #730
Update plugins.json
2022-01-24 10:15:37 +08:00
KafCoppelia
26934124a1 Update plugins.json
修改nonebot_plugin_fortune "module_name" 与 nonebot_plugin_tarot 标签"alpha only" to "beta first",tarot插件已适配beta.1并已发行pypi,beta.1适配优先
2022-01-23 23:10:50 +08:00
Ju4tCode
05f4a8b363 🔀 Merge pull request #729
Plugin: 今天吃什么
2022-01-23 21:17:45 +08:00
KafCoppelia
cb92bb7007 🍻 publish plugin 今天吃什么 2022-01-23 13:13:15 +00:00
Ju4tCode
bc2abc9c51 🔀 Merge pull request #726
Plugin: emoji 合成器
2022-01-23 21:12:48 +08:00
Ju4tCode
ebd7e4df19 🔀 Merge pull request #727
Fix wrong module name
2022-01-23 21:12:01 +08:00
yanyongyu
48b507e272 📝 add config docs 2022-01-23 21:09:47 +08:00
Lancercmd
6a17ce5fda ✏️ Fix wrong module name 2022-01-23 20:59:02 +08:00
MeetWq
44ca11cceb 🍻 publish plugin emoji 合成器 2022-01-23 12:15:55 +00:00
Ju4tCode
12d28eb77d 🔀 Merge pull request #724
Plugin: Fix homepage for 2 plugins
2022-01-23 17:23:51 +08:00
Jigsaw
0513b5884d 🍺 Fix homepage of nonebot-plugin-manager & nonebot-plugin-puppet 2022-01-23 17:09:26 +08:00
yanyongyu
97563a0090 🐛 fix missing api docs include 2022-01-23 13:35:09 +08:00
Ju4tCode
596f763c46 🔀 Merge pull request #691
:construction_workerusing: nb-autodoc to generate api docs
2022-01-23 12:07:51 +08:00
yanyongyu
5f3902fe61 ✏️ fix hook typo 2022-01-23 11:48:35 +08:00
Mix
ceb7589b27 🔀 Merge pull request #723
Plugin: 塔罗牌
2022-01-23 11:09:39 +08:00
KafCoppelia
fa8a3987e7 🍻 publish plugin 塔罗牌 2022-01-23 03:01:21 +00:00
Ju4tCode
8f51aff483 🔀 Merge pull request #720
Plugin: nonebot_plugin_fortune
2022-01-22 23:47:12 +08:00
KafCoppelia
c1084cc437 🍻 publish plugin nonebot_plugin_fortune 2022-01-22 15:35:38 +00:00
yanyongyu
46757a315b ⬆️ upgrade dependencies 2022-01-22 17:09:45 +08:00
yanyongyu
4316990aab ⬆️ upgrade dependencies 2022-01-22 15:50:11 +08:00
yanyongyu
7d81e079de 🎨 improve tree style 2022-01-22 15:35:52 +08:00
yanyongyu
12d9a68351 🐛 fix typing error for mutex 2022-01-22 15:26:22 +08:00
yanyongyu
c4e204001e 💡 add docstrings 2022-01-22 15:23:07 +08:00
yanyongyu
f9674da6ea 💡 add di docstrings 2022-01-21 21:04:17 +08:00
Ju4tCode
794a640681 🔀 Merge pull request #718
Adapter: mirai2
2022-01-21 11:07:12 +08:00
ieew
1bdb27d109 🍻 publish adapter mirai2 2022-01-21 02:36:08 +00:00
yanyongyu
aef585c60c 💡 add adapter docstring 2022-01-20 14:49:46 +08:00
Ju4tCode
215cfc90f4 🔀 Merge pull request #716
👷 checkout with PAT
2022-01-20 13:42:12 +08:00
hemengyang
b671a9658b 👷checkout with PAT
CI can be triggered when github action pushes a commit.
2022-01-20 13:35:58 +08:00
Ju4tCode
017049f321 🔀 Merge pull request #715
Plugin: 天气查询
2022-01-20 12:16:12 +08:00
zjkwdy
10733e7520 🍻 publish plugin 天气查询 2022-01-20 04:05:30 +00:00
Ju4tCode
b343fb8e6f 🔀 Merge pull request #711
Fix: single_session potential bug
2022-01-20 10:59:10 +08:00
AkiraXie
f6308916ad 🐛 fix bug and improve test coverage 2022-01-20 03:16:04 +08:00
pre-commit-ci[bot]
b3d0e7c548 🚨 auto fix by pre-commit hooks 2022-01-19 18:10:30 +00:00
AkiraXie
67f5b87492 🐛 fix single_session bug 2022-01-20 02:05:57 +08:00
Ju4tCode
30a14eb99c 🔀 Merge pull request #710
Update plugins.json
2022-01-19 19:19:49 +08:00
meetwq
92714de522 Update plugins.json 2022-01-19 18:53:55 +08:00
yanyongyu
98ef09585a 💡 add docstrings 2022-01-19 16:16:56 +08:00
Ju4tCode
13e021fa1e 🔀 Merge pull request #708
商店链接指向错误
2022-01-19 15:12:45 +08:00
wzl19371
82224da9ab Fix store link 2022-01-19 14:59:22 +08:00
Ju4tCode
2877c39288 🔀 Merge pull request #707
Plugin: 移除冷却事件插件
2022-01-19 01:06:43 +08:00
Satoshi Jek
af0b0ae823 Plugin: 移除冷却事件插件
由于 OneBot v11 适配器自 v2.0.0b1 起提供了命令冷却支持,且该插件已无力继续维护,故将该插件从商店移除。
2022-01-19 00:33:10 +08:00
yanyongyu
4701537a48 💡 add docstrings 2022-01-18 23:46:10 +08:00
yanyongyu
608cf859c8 💡 add log, exception, consts docstring 2022-01-18 16:12:12 +08:00
yanyongyu
27b1ded9a1 💡 add config docstring 2022-01-18 12:31:08 +08:00
Ju4tCode
60800b1d9e 🔀 Merge pull request #706
更新插件tag
2022-01-17 22:32:03 +08:00
felinae98
c675addeef 更新插件tag 2022-01-17 21:58:29 +08:00
yanyongyu
a07919ad5c 📝 rewrite docstring 2022-01-17 15:06:53 +08:00
Ju4tCode
ce0e230887 🔀 Merge pull request #705
Feature: Advanced message slice support
2022-01-17 10:59:26 +08:00
Mix
b037be4485 add unit test for message slice 2022-01-17 00:29:09 +08:00
Mix
3b4c4d3081 Implement .count and optimize .get performance for message slice 2022-01-17 00:28:36 +08:00
Mix
1221baaa94 Implement .get and .index methods for Message 2022-01-16 17:13:26 +08:00
pre-commit-ci[bot]
39822378a7 🚨 auto fix by pre-commit hooks 2022-01-16 05:26:55 +00:00
Mix
3041650b4b add advanced message slice support 2022-01-16 13:17:05 +08:00
yanyongyu
3a9a5a9ce9 📝 add frontmatter config 2022-01-16 11:30:09 +08:00
yanyongyu
34c086a046 ⚗️ reduce prettier file 2022-01-16 10:52:12 +08:00
Ju4tCode
cf819af179 🔀 Merge pull request #704
Plugin: 彩云小梦AI续写
2022-01-16 10:40:03 +08:00
yanyongyu
9b6d8b6efa 📝 test autogen docs 2022-01-15 23:53:36 +08:00
MeetWq
478dff512f 🍻 publish plugin 彩云小梦AI续写 2022-01-15 14:19:20 +00:00
yanyongyu
cc1dc10b5d add nb-autodoc 2022-01-15 22:16:31 +08:00
yanyongyu
b7a0ba11d5 🔀 Merge branch dev 2022-01-15 22:12:50 +08:00
yanyongyu
93aec6d3f6 🏷️ add pre-commit flow 2022-01-15 21:27:43 +08:00
Ju4tCode
9c729d194b 🔀 Merge pull request #702
Docs: remove unsupported char
2022-01-15 19:46:00 +08:00
StarHeart
dcfba4e94a 🐛 remove unsupported char 2022-01-15 17:41:22 +08:00
Mix
55b1f962ac 🔀 Merge pull request #701
Plugin: 人生重开模拟器
2022-01-15 16:58:15 +08:00
MeetWq
6c0ab74956 🍻 publish plugin 人生重开模拟器 2022-01-15 08:54:07 +00:00
Mix
9cbac0b4ca 🔀 Merge pull request #699
Plugin: 新冠疫情查询😷
2022-01-15 10:16:49 +08:00
hemengyang
8d0951a816 📝 fix wrong syntax and link 2022-01-15 09:35:30 +08:00
Zeta-qixi
8a896b42a3 🍻 publish plugin 新冠疫情查询😷 2022-01-14 19:32:35 +00:00
hemengyang
d26fda7320 🐛 fix docs build fail 2022-01-14 22:05:56 +08:00
Ju4tCode
9af7079fdd 🔀 Merge pull request #697
Plugin: 疯狂星期四
2022-01-14 21:53:15 +08:00
KafCoppelia
1d49defdfa 🍻 publish plugin 疯狂星期四 2022-01-14 13:35:22 +00:00
Ju4tCode
0e31a5fbf4 🔀 Merge pull request #695
Plugin: 扔骰子
2022-01-14 21:19:01 +08:00
KafCoppelia
ad5a011b45 🍻 publish plugin 扔骰子 2022-01-14 13:11:42 +00:00
hemengyang
341ee94848 🔥remove sphinx 2022-01-14 20:04:19 +08:00
hemengyang
a47b8c68c0 👷using nb-autodoc to generate api docs 2022-01-14 19:58:22 +08:00
yanyongyu
cc343c981f 💩 add logger format todo 2022-01-14 12:32:03 +08:00
Ju4tCode
10395d6bce 🔀 Merge pull request #686
Cross platform code coverage test
2022-01-13 18:17:15 +08:00
yanyongyu
6713f4d9b0 add test flags for os, python version 2022-01-13 18:11:00 +08:00
yanyongyu
8494768a89 🔥 remove pypy test 2022-01-13 18:06:07 +08:00
yanyongyu
88bd49de45 👷 support cross platform test 2022-01-13 17:58:35 +08:00
yanyongyu
b52ccc3690 👷 reuse workflow setup step 2022-01-13 16:41:01 +08:00
Ju4tCode
a8a1b4d65d 🔀 Merge pull request #683
📝 prepare docstring for autodoc
2022-01-13 11:14:03 +08:00
hemengyang
98deadb4d6 粗略过一遍,修复一眼可见的问题 2022-01-12 19:41:42 +08:00
hemengyang
ec06010298 令标题符合 markdown 语法 2022-01-12 19:24:01 +08:00
hemengyang
cd69b22d43 令 tip 符合格式 2022-01-12 19:20:59 +08:00
hemengyang
f298930f9d 更新依赖参数的注释 2022-01-12 19:15:56 +08:00
hemengyang
0e97022d3b 调整缩进 2022-01-12 19:10:29 +08:00
hemengyang
6d21cbed55 令用法符合格式 2022-01-12 18:53:30 +08:00
hemengyang
edb20a4786 令异常符合格式 2022-01-12 18:45:35 +08:00
hemengyang
187532930b 令返回符合格式 2022-01-12 18:43:07 +08:00
hemengyang
456d333568 令参数符合标准 2022-01-12 18:31:12 +08:00
hemengyang
a5f32febbd 令参数列表符合 autodoc 格式 2022-01-12 18:25:25 +08:00
hemengyang
4ba1a09fb7 使用 markdown 格式的强调语法 2022-01-12 18:19:21 +08:00
hemengyang
0099364838 删除说明前缀 2022-01-12 18:16:05 +08:00
hemengyang
0e11959347 删除默认值 2022-01-12 18:02:08 +08:00
hemengyang
705a6f7fbf 删除类型 2022-01-12 18:00:56 +08:00
Ju4tCode
eeb54c8f8a 🔀 Merge pull request #682
Docs: format adapter name
2022-01-12 17:25:15 +08:00
StarHeart
c9056c6fd0 📝 format adapter name 2022-01-12 16:46:56 +08:00
yanyongyu
e29db806cc 📝 update changelog 2022-01-12 11:54:01 +08:00
Ju4tCode
f837e5f3fa Merge pull request #673 from A-kirami/dev
从 Fastapi 的文档中排除驱动器的 HTTP 上报地址
2022-01-11 15:12:37 +08:00
yanyongyu
d82f0c6310 ⚗️ add config option for fastapi 2022-01-11 15:03:17 +08:00
Ju4tCode
18082d0dc7 🔀 Merge pull request #681
Remove mirai-api-http related info from readme
2022-01-11 14:51:23 +08:00
yanyongyu
6ca54574ce ✏️ fix context shell command typo 2022-01-11 12:53:19 +08:00
Mix
85fc2422d1 🔥 remove mirai-api-http adapter from store 2022-01-11 00:04:36 +08:00
Mix
bb7313f12c 📝 remove mirai-api-http related info from readme, fix #470
Mirai-API-HTTP will no longer be maintained by NoneBot officialy.
2022-01-10 23:41:57 +08:00
yanyongyu
742d1f1f02 ⚗️ fix load builtin plugin 2022-01-10 22:52:10 +08:00
yanyongyu
1b035ed19b 🔥 add State() deprecation warning 2022-01-10 22:24:45 +08:00
yanyongyu
ea65ee5b4f 👷 update eci python version 2022-01-10 12:07:11 +08:00
yanyongyu
6572622e8a improve test performance 2022-01-10 11:53:02 +08:00
yanyongyu
00de3bcc54 📝 update changelog 2022-01-10 11:22:35 +08:00
yanyongyu
2ccdc218e0 improve state detect #677 2022-01-10 11:21:01 +08:00
Ju4tCode
c11c62f622 🔀 Merge pull request #678
Docs: fix di import path
2022-01-10 10:44:25 +08:00
HibiKier
59c77d312a 📝 fix di import path 2022-01-09 23:49:24 +08:00
Ju4tCode
a14cfc8d77 🔀 Merge pull request #679
Fix: plugin load fail process
2022-01-09 23:29:53 +08:00
yanyongyu
d6f5216d29 🐛 fix plugin load fail 2022-01-09 23:15:33 +08:00
Ju4tCode
d549087db2 🔀 Merge pull request #676
Fix: fix matcher receive and arg detect
2022-01-09 20:45:19 +08:00
yanyongyu
3fa8bd2cd0 🐛 fix receive and got missing detect error 2022-01-09 20:34:03 +08:00
yanyongyu
8674d18543 🐛 fix pagination display error 2022-01-09 20:27:43 +08:00
明见
096f0d72f1 从 Fastapi 的文档中排除驱动器的 HTTP 上报地址 2022-01-08 22:19:45 +08:00
Ju4tCode
f0e935d4ff 🔀 Merge pull request #672
Plugin: Add tags for j1g5awi's plugins
2022-01-08 21:51:43 +08:00
Jigsaw
490a8146bc ✏️ Fix typo 2022-01-08 21:17:31 +08:00
Jigsaw
a74c6e220b ✏️ Fix typo 2022-01-08 21:05:39 +08:00
Jigsaw
0e8ef3def2 🍻 Add tags for j1g5awi's plugins 2022-01-08 20:57:36 +08:00
Ju4tCode
ba4e90b14f 🔀 Merge pull request #671
Adapter: 开黑啦
2022-01-08 20:18:35 +08:00
Tian-que
d02d8f06b2 🍻 publish adapter 开黑啦 2022-01-08 12:11:08 +00:00
yanyongyu
95415659ce 🐛 fix doc plugin build fail 2022-01-08 19:36:19 +08:00
yanyongyu
304118c98e 👷 fix ci 2022-01-08 18:23:17 +08:00
yanyongyu
3fe3c1351f 🐛 fix doc error 2022-01-08 17:47:29 +08:00
github-actions
b0536edab3 🔖 Release 2.0.0-beta.1 2022-01-08 09:34:38 +00:00
yanyongyu
ff330e1536 👷 fix release ci permission error 2022-01-08 17:29:07 +08:00
Ju4tCode
6c00432c10 🔀 Merge pull request #669
Docs: fix messenger css error
2022-01-08 17:05:44 +08:00
yanyongyu
1c37024699 🐛 fix messenger css error 2022-01-08 16:58:09 +08:00
Ju4tCode
ad2ebc3818 🔀 Merge pull request #668
CI: Fix build upload error
2022-01-08 16:55:00 +08:00
yanyongyu
92fd6fb669 👷 fix ci build 2022-01-08 16:49:50 +08:00
Ju4tCode
a904becfe0 🔀 Merge pull request #667
Docs: add example for plugin
2022-01-08 13:38:16 +08:00
yanyongyu
7a8b38bd07 🔀 Merge back branch master 2022-01-08 13:05:48 +08:00
yanyongyu
cd94672999 📝 write doc messenger component 2022-01-08 13:00:08 +08:00
Mix
3e66bc73a6 🔀 Merge pull request #666
Plugin: 转发姬
2022-01-08 10:04:30 +08:00
ninthseason
f01694dfe7 🍻 publish plugin 转发姬 2022-01-08 01:59:18 +00:00
yanyongyu
d13ca9aee6 📝 update doc message 2022-01-07 21:03:03 +08:00
yanyongyu
0a10a3c18b 📝 add examples 2022-01-07 18:38:04 +08:00
yanyongyu
6b2d8d2674 🐛 fix param missing name 2022-01-07 16:27:35 +08:00
Ju4tCode
cf1333f8a8 🔀 Merge pull request #663
Plugin: 群文件直链提取器
2022-01-06 23:18:53 +08:00
ninthseason
0cbcc04396 🍻 publish plugin 群文件直链提取器 2022-01-06 15:16:19 +00:00
Ju4tCode
f396f76425 🔀 Merge pull request #661
Docs: update handler and plugin docs
2022-01-06 17:58:57 +08:00
yanyongyu
89ae275793 📝 update handler doc 2022-01-06 17:51:32 +08:00
Ju4tCode
381e5e4a76 🔀 Merge pull request #660
Docs: 更新商店插件发布流程
2022-01-06 14:50:11 +08:00
yanyongyu
ac6eed9217 👷 fix deploy preview 2022-01-06 14:48:59 +08:00
XZhouQD
abf4d57987 📝 更新插件发布流程
增加对标签内容的介绍,增加发布issue修改提醒
2022-01-06 12:23:20 +08:00
XZhouQD
1393318bce 📝 更新插件发布流程
修复了PyPI项目名输入介绍,增加标签介绍,进行相关图片更新
2022-01-06 12:02:29 +08:00
Ju4tCode
1ee1ed80c0 🔀 Merge pull request #659
Feature: add sitemap and test cases
2022-01-05 21:02:33 +08:00
yanyongyu
20751e8ee5 📝 add sitemap 2022-01-05 20:39:47 +08:00
yanyongyu
1030b73555 add test cases 2022-01-05 20:32:00 +08:00
yanyongyu
e39539a3be add rule test cases 2022-01-05 18:29:11 +08:00
Ju4tCode
159fc12fb9 🔀 Merge pull request #658
Docs: disable service worker globally
2022-01-05 17:46:53 +08:00
StarHeartHunt
93b76894bb 📝 import js based on domain 2022-01-05 16:51:12 +08:00
StarHeartHunt
2b5f3268c8 📝 disable service worker globally 2022-01-05 16:30:44 +08:00
Ju4tCode
87f9ccd058 🔀 Merge pull request #657
Plugin 插件管理器
2022-01-05 13:47:58 +08:00
CherryGS
402de4bb8a 🍻 publish plugin 插件管理器 2022-01-05 05:47:12 +00:00
Ju4tCode
1af67b4431 🔀 Merge pull request #653
Optimize readme expression and styling
2022-01-05 13:47:06 +08:00
Ju4tCode
493a4e5880 🔀 Merge pull request #652
Plugin 群聊复读机
2022-01-05 13:46:23 +08:00
Mix
ef386af2bc 📝 optimize readme expression and styling 2022-01-05 00:03:56 +08:00
ninthseason
896f1d6596 🍻 publish plugin 群聊复读机 2022-01-04 15:41:12 +00:00
Ju4tCode
69b4c29dcb 🔀 Merge pull request #650
Docs: update Algolia search key
2022-01-04 23:28:18 +08:00
StarHeartHunt
dd5112ff99 🎨 fix quote 2022-01-04 23:23:25 +08:00
StarHeart
3bede1581f 🔧 update Algolia search config 2022-01-04 22:34:14 +08:00
Ju4tCode
e54b80f739 🔀 Merge pull request #649
update publish bot config
2022-01-04 20:40:01 +08:00
hemengyang
bd7ee0a1ba 👷 update publish bot config 2022-01-04 20:23:21 +08:00
Ju4tCode
aaed95cae1 🔀 Merge pull request #644
Pre Release: 2.0.0-beta.1 preview
2022-01-04 16:12:42 +08:00
yanyongyu
7f54468868 ✏️ fix typo 2022-01-04 16:04:30 +08:00
yanyongyu
07cb96864c 📝 add alpha doc link 2022-01-04 15:27:51 +08:00
yanyongyu
96749bde83 add matcher updater tests 2022-01-04 15:19:59 +08:00
yanyongyu
bbbb5bbecd ⬆️ upgrade dependencies 2022-01-04 14:36:32 +08:00
yanyongyu
7053f0ee72 📝 update readme 2022-01-04 13:18:22 +08:00
yanyongyu
6950e5b34d 📝 add driver configs 2022-01-03 20:30:04 +08:00
yanyongyu
5fe5273f8f ⚗️ add card action 2022-01-02 20:21:08 +08:00
yanyongyu
479952777b ⬆️ upgrade dependency 2022-01-02 18:18:37 +08:00
Ju4tCode
0541008fb5 🔀 Merge pull request #645
Support user-defined format spec for message template
2022-01-02 16:25:43 +08:00
Mix
be1915381e add tests for message template 2022-01-02 14:29:04 +08:00
Mix
43938a004e ♻️ refactor template format_field to improve readability 2022-01-02 13:13:43 +08:00
Mix
983e5aefdb support user-defined format spec for message template 2022-01-01 21:52:54 +08:00
yanyongyu
620938c26c 🐛 fix modal hidden 2022-01-01 21:11:46 +08:00
yanyongyu
338c41abd5 improve const performance 2022-01-01 16:43:48 +08:00
yanyongyu
2bb365c70e ⬆️ upgrade nonepress 2022-01-01 16:43:35 +08:00
yanyongyu
574d4366a6 🎨 improve tag style 2022-01-01 12:07:33 +08:00
yanyongyu
feadffebcd 🔀 Merge master into dev 2022-01-01 00:01:25 +08:00
yanyongyu
78d0ec847e 🚧 add handler di example 2021-12-31 23:58:59 +08:00
yanyongyu
ec35f292bd 🐛 fix matcher got receive type error 2021-12-31 22:43:29 +08:00
yanyongyu
c48231454e 🚧 add tag type picker 2021-12-31 18:21:32 +08:00
yanyongyu
56677616b4 🚧 add tag selection 2021-12-31 11:27:37 +08:00
yanyongyu
ab2c73856d 🚧 add modal 2021-12-31 02:06:20 +08:00
yanyongyu
21a958ffd9 👷 update ci version 2021-12-30 23:29:32 +08:00
yanyongyu
e4691f0525 🚧 add store tags 2021-12-30 22:46:15 +08:00
yanyongyu
2beed6bf16 🚧 process store pagination 2021-12-30 16:05:05 +08:00
yanyongyu
d1706e438b 🚧 add store pagination 2021-12-30 12:56:10 +08:00
yanyongyu
23d0b2509e 🐛 fix ws close exception not catch in server 2021-12-30 12:11:31 +08:00
yanyongyu
80c0ac5456 ✏️ fix typo 2021-12-29 23:06:47 +08:00
yanyongyu
af03188f88 🐛 fix on_command block cannot set 2021-12-29 22:23:35 +08:00
yanyongyu
4bd2156929 🐛 fix matcher.skip missing 2021-12-29 21:52:46 +08:00
yanyongyu
c7f428795b 🎨 add store components 2021-12-29 21:09:36 +08:00
yanyongyu
39fd8b2dcd 📝 add store base layout 2021-12-29 13:33:36 +08:00
yanyongyu
0aea7f13e3 📝 add handler doc 2021-12-29 00:24:52 +08:00
yanyongyu
f06b78054c 🔥 remove debug option 2021-12-28 15:19:53 +08:00
yanyongyu
3323393261 📝 add create matcher doc 2021-12-28 15:06:28 +08:00
yanyongyu
5cfeb4e79d 🐛 fix log level bug 2021-12-28 14:33:03 +08:00
yanyongyu
86c859fec2 📝 add create matcher doc 2021-12-28 11:51:14 +08:00
yanyongyu
9379182f04 ⬆️ upgrade dependencies 2021-12-28 10:00:47 +08:00
yanyongyu
db826caff4 📝 add load plugin and config doc 2021-12-28 01:02:04 +08:00
yanyongyu
0f5a4473ab 📝 add plugin docs 2021-12-27 22:08:59 +08:00
yanyongyu
7690f0e640 📝 add register adapter doc 2021-12-27 16:06:47 +08:00
yanyongyu
3b1dd6d5db 📝 update choose driver doc 2021-12-27 15:29:34 +08:00
yanyongyu
7e9dabfd5f 📝 annotate links 2021-12-27 13:51:38 +08:00
yanyongyu
c815ac7ca3 🔥 temp remove link in advanced 2021-12-27 13:37:08 +08:00
yanyongyu
91262d68bc 📝 add codecov badge 2021-12-27 13:26:34 +08:00
yanyongyu
717fbd1b95 📝 update readme 2021-12-27 13:22:58 +08:00
yanyongyu
2ec04e5a4c 🔥 remove unused files 2021-12-27 13:22:48 +08:00
yanyongyu
c1e06c2ec0 🐛 fix aiohttp config trierule bugs 2021-12-27 02:26:02 +08:00
Jigsaw
fd9ec5e6fa Compatible with cross-platform superusers (#642) 2021-12-26 18:46:54 +08:00
yanyongyu
8093c5d154 add websocket close exception 2021-12-26 14:20:09 +08:00
yanyongyu
e64f399370 change websocket client to context manager 2021-12-26 13:45:26 +08:00
yanyongyu
7b204d72e6 change websocket client to context manager 2021-12-26 13:42:13 +08:00
yanyongyu
00c2ee8490 🐛 fix command rule type annotation error 2021-12-25 20:17:12 +08:00
yanyongyu
d773fea709 🐛 fix echo message error 2021-12-25 18:46:44 +08:00
yanyongyu
7ebae277d1 🔥 remove unused import 2021-12-25 17:44:53 +08:00
yanyongyu
9b9941e6c5 💡 write config docs 2021-12-25 14:57:29 +08:00
yanyongyu
188eb110c5 ⚗️ add proxy support 2021-12-25 14:04:53 +08:00
yanyongyu
e62ce93011 📝 update create project doc 2021-12-25 13:52:28 +08:00
yanyongyu
2f5e523b5a 📝 write install guide and init tutorial 2021-12-25 00:11:48 +08:00
Ju4tCode
495053f83b 🔀 Merge pull request #641
Plugin: Memes generator
2021-12-25 00:04:44 +08:00
MeetWq
5c67290f00 🍻 publish plugin Memes generator 2021-12-24 16:01:37 +00:00
yanyongyu
80258fe2d4 ⚗️ add support for data json file 2021-12-24 23:15:28 +08:00
yanyongyu
75e2ca77df 📝 write start docs 2021-12-24 19:02:11 +08:00
yanyongyu
6ed87f1910 🔊 add trace logs 2021-12-24 15:04:18 +08:00
yanyongyu
6643f951ef 🐛 fix cannot reject preset arg 2021-12-24 14:09:43 +08:00
Ju4tCode
e968b71239 🔀 Merge pull request #639
Plugin: nonebot-plugin-logo
2021-12-24 14:09:02 +08:00
MeetWq
a51158cfc0 🍻 publish plugin nonebot-plugin-logo 2021-12-23 16:48:05 +00:00
yanyongyu
17f3c8fd09 🐛 fix arg message store 2021-12-23 22:16:55 +08:00
yanyongyu
76104d3237 🐛 fix rule checker not parsed 2021-12-23 19:36:29 +08:00
yanyongyu
e3aba26080 ♻️ rewrite builtin rule and permission 2021-12-23 17:50:59 +08:00
yanyongyu
8fb394e4c3 ⚗️ new driver combine expr support 2021-12-23 17:20:26 +08:00
yanyongyu
b9f1890d80 🐛 fix command parse error 2021-12-23 16:01:09 +08:00
yanyongyu
0839d6d062 🐛 fix import error for extra dependencies 2021-12-23 14:29:21 +08:00
Ju4tCode
e870fcceab 🔀 Merge pull request #637
Plugin: 简易群管
2021-12-23 11:29:26 +08:00
yzyyz1387
ee7f4daef7 🍻 publish plugin 简易群管 2021-12-22 20:38:42 +00:00
yanyongyu
cda49551a8 ⬆️ upgrade asgi test client 2021-12-23 01:34:20 +08:00
yanyongyu
b984f99643 🐛 fix missing endpoint name for routing 2021-12-22 18:50:16 +08:00
Ju4tCode
71caa4a0ae 🔀 Merge pull request #635
Plugin: 通过浏览器来生成图片
2021-12-22 16:56:12 +08:00
yanyongyu
fecdb5367a ⬆️ upgrade dependencies 2021-12-22 16:53:55 +08:00
kexue-z
9e316bff77 🍻 publish plugin 通过浏览器来生成图片 2021-12-22 08:46:54 +00:00
yanyongyu
9b2fa46921 ✏️ add typing 2021-12-21 18:22:14 +08:00
yanyongyu
b900133ab4 🐛 fix duplicate plugin check 2021-12-21 11:18:34 +08:00
yanyongyu
cf8670c167 ⚗️ add more reject case 2021-12-21 10:57:47 +08:00
yanyongyu
e9b8515cf1 add got receive tests 2021-12-21 00:39:12 +08:00
yanyongyu
d549cdf26a ⬆️ bump dependency version 2021-12-20 16:06:23 +08:00
Ju4tCode
1a602b68e3 🔀 Merge pull request #633
Plugin: OlivOS.nb2
2021-12-20 16:02:50 +08:00
yanyongyu
883ea18224 improve echo matcher 2021-12-20 15:53:05 +08:00
j1g5awi
e5fdb1e07a 🍻 publish plugin OlivOS.nb2 2021-12-20 07:50:19 +00:00
yanyongyu
ea8f7717b9 ♻️ rewrite quart driver 2021-12-20 15:46:23 +08:00
yanyongyu
c49059f9d3 add more depend test case 2021-12-20 14:50:11 +08:00
yanyongyu
0d24a79840 add param tests 2021-12-20 14:31:48 +08:00
yanyongyu
6968d34fc2 👷 update codecov 2021-12-20 10:10:22 +08:00
yanyongyu
008c6fd036 🔒 fix netlify action #631 2021-12-20 10:08:39 +08:00
yanyongyu
44e5182322 🐛 fix parent plugin detect error 2021-12-20 00:31:00 +08:00
yanyongyu
c2c3d5ef4b add test cases 2021-12-20 00:28:02 +08:00
yanyongyu
ca045b2f73 🚧 rewrite fastapi driver implementation 2021-12-18 23:19:37 +08:00
yanyongyu
ec9e159ef6 ♻️ rewrite driver request and response class 2021-12-17 23:20:19 +08:00
yanyongyu
c0f321116a ⬆️ update nonebug 2021-12-16 23:42:03 +08:00
yanyongyu
3d762fcbab improve dependency cache 2021-12-16 23:22:25 +08:00
yanyongyu
fe69735ca0 add test cases 2021-12-16 17:28:57 +08:00
yanyongyu
acbb886942 ⬆️ update dependency 2021-12-16 16:20:33 +08:00
Ju4tCode
3dac49f271 🔀 Merge pull request #630
Bot: SeaBot_QQ
2021-12-15 20:39:27 +08:00
B1ue1nWh1te
14f88d4062 🍻 publish bot SeaBot_QQ 2021-12-15 12:02:12 +00:00
yanyongyu
de7c51a518 ⚗️ add regex and shell command di function 2021-12-14 22:40:47 +08:00
yanyongyu
329a1fd226 add di functions 2021-12-14 01:08:48 +08:00
Ju4tCode
9613e47682 🔀 Merge pull request #628
Plugin: lol比赛信息
2021-12-13 20:39:41 +08:00
Diaosi1111
ec1249f5fb 🍻 publish plugin lol比赛信息 2021-12-13 11:25:33 +00:00
Ju4tCode
0316033a57 🔀 Merge pull request #626
Plugin: 剧集更新列表
2021-12-13 16:32:32 +08:00
kexue-z
baabf2a83a 🍻 publish plugin 剧集更新列表 2021-12-13 08:11:01 +00:00
Ju4tCode
85ee0ce420 🔀 Merge pull request #624
Plugin: picsbank
2021-12-13 13:50:52 +08:00
Diaosi1111
27f8d6aa28 🍻 publish plugin picsbank 2021-12-12 17:47:24 +00:00
yanyongyu
e942f4076c 🐛 fix builtin bug 2021-12-13 00:37:07 +08:00
Ju4tCode
8f3978f2b2 🔀 Merge pull request #622
Docs: style tweaks
2021-12-12 18:59:04 +08:00
yanyongyu
3b8ba6ee3a 📝 update doc 2021-12-12 18:44:12 +08:00
StarHeart
60461c767e 📝 style tweaks 2021-12-12 18:34:52 +08:00
yanyongyu
66ba25494a ♻️ rewrite dependency injection system 2021-12-12 18:19:08 +08:00
yanyongyu
6b5a5e53eb 🔥 remove state factory 2021-12-11 17:35:12 +08:00
yanyongyu
344c3576b1 📝 update readme 2021-12-10 18:14:48 +08:00
yanyongyu
5efdc71d9f 🔧 add config file 2021-12-10 17:13:07 +08:00
yanyongyu
f160310aea add nonebug as dev dependency 2021-12-10 17:09:12 +08:00
yanyongyu
5aedc52537 add pytest 2021-12-10 17:02:16 +08:00
yanyongyu
a0d13822c0 ♻️ change matcher run function 2021-12-10 15:46:06 +08:00
Ju4tCode
6963047af2 🔀 Merge pull request #620
change: 按照新格式修改商店发布数据
2021-12-08 20:15:25 +08:00
hemengyang
4de01d7d4f 按照新格式修改商店发布数据 2021-12-08 19:48:09 +08:00
yanyongyu
61e17d0de7 🏷️ fix missing type 2021-12-08 16:46:10 +08:00
yanyongyu
b64b02bb45 ✏️ add missing annotationo 2021-12-07 02:16:18 +08:00
yanyongyu
47d4909b31 ⬆️ update dependencies 2021-12-06 23:00:10 +08:00
yanyongyu
d80c02ae46 ♻️ rewrite adapter abc class 2021-12-06 22:19:05 +08:00
yanyongyu
180aaadda9 🐛 fix coroutine check error 2021-12-06 20:34:14 +08:00
yanyongyu
a85ee6555f 🐛 fix error on python 3.9+ 2021-12-06 11:27:25 +08:00
yanyongyu
bbaf156826 📝 update change log 2021-12-06 10:28:31 +08:00
yanyongyu
5b75b72720 ♻️ use class rule and permission 2021-12-06 10:10:51 +08:00
yanyongyu
ca4d7397f8 🐛 add skip handle for process 2021-12-06 00:17:52 +08:00
Mix
02ef337bc4 🔀 Merge pull request #617
Plugin: 随机黑丝
2021-12-05 23:56:50 +08:00
yzyyz1387
d82ab12948 🍻 publish plugin 随机黑丝 2021-12-05 15:52:19 +00:00
yanyongyu
c25ee1cb56 check param first then dependencies 2021-12-05 17:29:38 +08:00
yanyongyu
59e139724b 💩 find errors need to fix 2021-12-04 22:57:44 +08:00
Ju4tCode
b52954a240 Merge pull request #615 from nonebot/fix/httpx-http2
Fix: http2 for fastapi driver
2021-12-04 15:03:17 +08:00
Ju4tCode
aea961b346 Update nonebot/drivers/fastapi.py 2021-12-04 14:15:00 +08:00
yanyongyu
a148ef7bfe 📝 fix handler doc link 2021-12-03 23:34:58 +08:00
yanyongyu
3c428d98c4 📝 add di docs 2021-12-03 23:30:15 +08:00
yanyongyu
2ce305da2a 📝 update homepage 2021-12-03 16:21:24 +08:00
yanyongyu
226fc0feb3 🐛 fix http2 for fastapi 2021-12-02 20:52:39 +08:00
yanyongyu
534119eaf0 👷 fix api docs build error 2021-12-02 15:12:36 +08:00
yanyongyu
c037c7a196 ⬆️ update theme version 2021-12-02 15:00:55 +08:00
yanyongyu
b4e49d8b8d 👷 fix missing directory 2021-12-02 14:11:13 +08:00
yanyongyu
b47869198d 👷 fix ci syntax 2021-12-02 14:07:52 +08:00
yanyongyu
dcb6f69f21 🐛 fix build and ci bug 2021-12-02 14:03:06 +08:00
yanyongyu
7d8a60b033 👷 update doc ci 2021-12-02 03:17:10 +08:00
yanyongyu
0236746e65 🐛 fix rule and permission not handle skip 2021-12-01 19:21:31 +08:00
Ju4tCode
2dc5a7e1b1 🔀 Merge pull request #613
Plugin: 在线运行代码
2021-12-01 16:30:43 +08:00
yanyongyu
a414406039 🏗️ change doc theme 2021-12-01 16:28:55 +08:00
yzyyz1387
5a7af6d6e2 🍻 publish plugin 在线运行代码 2021-12-01 08:15:04 +00:00
Ju4tCode
f2b15d4efa 🔀 Merge pull request #611
Plugin: 虚拟朋友
2021-12-01 11:25:49 +08:00
snowyfirefly
4570baa57b 🍻 publish plugin 虚拟朋友 2021-11-30 14:46:02 +00:00
yanyongyu
b92c1a0b33 ⚗️ add option for ws reconnect 2021-11-30 12:24:09 +08:00
Ju4tCode
319b03acd8 🔀 Merge pull request #609
Plugin: ShindanMaker
2021-11-29 18:43:35 +08:00
MeetWq
44356154fa 🍻 publish plugin ShindanMaker 2021-11-29 08:52:54 +00:00
yanyongyu
a6112fdf64 support for mock api result (resolve #605) 2021-11-28 02:34:01 +08:00
Mix
d0821cd12f 🔀 Merge pull request #607
Plugin: nonebot-plugin-petpet
2021-11-27 21:21:22 +08:00
MeetWq
ebdc8c7004 🍻 publish plugin nonebot-plugin-petpet 2021-11-27 12:37:48 +00:00
yanyongyu
37f55652d9 ♻️ separate fastapi driver 2021-11-27 12:16:31 +08:00
Ju4tCode
bd55cd19e3 🔀 Merge pull request #603
Plugin: nonebot-plugin-asoulcnki
2021-11-25 21:02:43 +08:00
MeetWq
a369d7dcbc 🍻 publish plugin nonebot-plugin-asoulcnki 2021-11-25 12:45:32 +00:00
yanyongyu
030237fe22 🐛 fix receive reject 2021-11-25 20:42:48 +08:00
Ju4tCode
6cf7f1f1fc 🔀 Merge pull request #601
Plugin: 诺基亚手机图生成
2021-11-24 01:01:45 +08:00
kexue-z
f9b244b0d6 🍻 publish plugin 诺基亚手机图生成 2021-11-23 16:21:24 +00:00
yanyongyu
29f14a20ce 📝 update readme 2021-11-23 16:59:48 +08:00
yanyongyu
286729f703 🔥 remove cqhttp files 2021-11-23 16:21:21 +08:00
yanyongyu
db5d4d7acf 👷 update ci 2021-11-22 23:31:03 +08:00
yanyongyu
a98d98cd12 🎨 format code using black and isort 2021-11-22 23:21:26 +08:00
Ju4tCode
602185a34e 🔀 Merge pull request #588
Feature: `Handler` Dependency Injection
2021-11-22 21:16:36 +08:00
yanyongyu
3120abacb3 allow extra param with default value 2021-11-22 11:38:42 +08:00
Ju4tCode
225e48d420 🔀 Merge pull request #599
Plugin: 工作性价比计算器
2021-11-21 18:02:35 +08:00
yzyyz1387
91bd5aa708 🍻 publish plugin 工作性价比计算器 2021-11-21 09:20:12 +00:00
yanyongyu
23c237cb2a 💡 add depends example 2021-11-21 17:09:31 +08:00
nonebot
9a29966e2d 📝 update api docs 2021-11-21 08:13:56 +00:00
yanyongyu
760ac693c0 🔥 remove dependency override provider 2021-11-21 16:12:36 +08:00
nonebot
a864b36e9f 📝 update api docs 2021-11-21 07:48:02 +00:00
yanyongyu
75d4cd9565 🐛 fix cache concurrency 2021-11-21 15:46:48 +08:00
nonebot
d22630e768 📝 update api docs 2021-11-21 04:37:46 +00:00
yanyongyu
b4d12d905d ⚗️ change permission to use handler 2021-11-21 12:36:44 +08:00
Ju4tCode
d1c03208e4 🔀 Merge pull request #597
Plugin: gocqapi
2021-11-19 20:45:55 +08:00
FYWinds
8ee9697cc0 🍻 publish plugin gocqapi 2021-11-19 12:06:44 +00:00
nonebot
a5948fb5e3 📝 update api docs 2021-11-19 10:20:20 +00:00
yanyongyu
471d306e13 ⚗️ change rule to use handler 2021-11-19 18:18:53 +08:00
Ju4tCode
81e1cf23c7 🔀 Merge pull request #594
Plugin: nonebot_plugin_youthstudy
2021-11-18 20:55:23 +08:00
ayanamiblhx
203e1c1897 🍻 publish plugin nonebot_plugin_youthstudy 2021-11-18 12:14:38 +00:00
Ju4tCode
646eedb2ad 🔀 Merge pull request #592
Plugin: 插件重命名 nonebot-hk-reporter -> nonebot-bison
2021-11-18 16:21:23 +08:00
felinae98
4150e4d771 Plugin: 插件重命名 nonebot-hk-reporter -> nonebot-bison 2021-11-18 16:10:41 +08:00
Ju4tCode
c1163bed8d 🔀 Merge pull request #591
Plugin: lolheroes
2021-11-18 13:48:45 +08:00
cjladmin
1b9a6cb2ca 🍻 publish plugin lolheroes 2021-11-18 04:46:13 +00:00
nonebot
ee619a33a9 📝 update api docs 2021-11-17 12:38:35 +00:00
yanyongyu
36d93b8a3a ⬆️ update dependencies 2021-11-17 20:36:10 +08:00
yanyongyu
dc31afbd18 improve command rule types 2021-11-17 00:27:58 +08:00
yanyongyu
4cbdd726e5 🏗️ change code structure 2021-11-16 18:30:16 +08:00
yanyongyu
ea502c1fff 🔊 add deprecation warning for toml load 2021-11-15 23:05:05 +08:00
yanyongyu
d1c6eeb6c2 ♻️ allow dynamic param types 2021-11-15 21:44:24 +08:00
yanyongyu
cafe5c9af0 🚧 add generator dependency support 2021-11-15 01:28:47 +08:00
yanyongyu
0a1ae75b70 finish matcher process 2021-11-14 21:01:28 +08:00
yanyongyu
7495fee2a2 add bot event type check 2021-11-14 01:34:25 +08:00
yanyongyu
9d708a6723 🚧 process handler call 2021-11-13 19:38:01 +08:00
yanyongyu
f7eadb48b5 🚧 create processor 2021-11-12 20:55:59 +08:00
yanyongyu
c454cf0874 🚧 process handler dependency 2021-11-12 18:10:40 +08:00
yanyongyu
57e826a835 ⬆️ update lock file 2021-11-12 12:12:41 +08:00
yanyongyu
ecb9d6bc28 🚨 remove linter warning 2021-11-12 11:53:42 +08:00
Ju4tCode
512d77de0d 🔀 Merge pull request #587
Feature: remove namespace
2021-11-11 22:52:56 +08:00
nonebot
618753bd3a 📝 update api docs 2021-11-11 10:11:50 +00:00
yanyongyu
fdffaf4e85 💡 add docstring 2021-11-11 18:10:39 +08:00
nonebot
7c27fbe1d5 📝 update api docs 2021-11-11 10:04:37 +00:00
yanyongyu
554ad156c0 📝 update plugin doc build 2021-11-11 18:03:26 +08:00
nonebot
8be2de4cfc 📝 update api docs 2021-11-11 09:52:50 +00:00
yanyongyu
2ccbc93e48 ♻️ remove plugin namespace 2021-11-11 17:33:30 +08:00
Ju4tCode
b796f3cabc 🔀 Merge pull request #586
Plugin: IT咨讯
2021-11-10 23:52:28 +08:00
yzyyz1387
4e482685ae 🍻 publish plugin IT咨讯 2021-11-10 14:49:43 +00:00
yanyongyu
08f56db385 🚧 process matcher module 2021-11-09 00:57:59 +08:00
yanyongyu
72f5aeea54 🚧 refactor plugin loading 2021-11-08 01:02:35 +08:00
Ju4tCode
1236abe507 Merge pull request #580 from nonebot/publish/issue579
Plugin: 另一个图片搜索
2021-11-03 15:17:02 +08:00
bakashigure
06c1978260 🍻 publish plugin 另一个图片搜索 2021-11-03 05:51:11 +00:00
Ju4tCode
f1b204f421 🔀 Merge pull request #578
Plugin: leetcode提醒机器人
2021-10-31 12:51:19 +08:00
zxz0415
2b26f519af 🍻 publish plugin leetcode提醒机器人 2021-10-31 04:04:07 +00:00
Ju4tCode
069e7024ec 🔀 Merge pull request #575
Plugin: nonebot-plugin-setu-now
2021-10-28 10:30:15 +08:00
kexue-z
2d7d5f73c2 🍻 publish plugin nonebot-plugin-setu-now 2021-10-27 17:38:38 +00:00
Mix
75774d34bc 🔀 Merge pull request #573
Bot: PixivBot
2021-10-23 13:20:51 +08:00
ssttkkl
0c2c2717ac 🍻 publish bot PixivBot 2021-10-23 04:45:28 +00:00
yanyongyu
d10f557212 ⬆️ upgrade dependencies 2021-10-21 00:37:09 +08:00
yanyongyu
32e3c17552 🚨 remove linter warning 2021-10-21 00:08:37 +08:00
Ju4tCode
e632e99feb 🔀 Merge pull request #566
Plugin: nb2chan
2021-10-12 15:33:27 +08:00
yucongo
e38772435d 🍻 publish plugin nb2chan 2021-10-12 06:00:09 +00:00
Ju4tCode
d9093a20e0 🔀 Merge pull request #564
Plugin: Twitter推送
2021-10-11 23:25:54 +08:00
kanomahoro
130f11ac68 🍻 publish plugin Twitter推送 2021-10-11 14:48:13 +00:00
Ju4tCode
9a44a2ff2f 🔀 Merge pull request #561
Fix: fastapi driver forward header error
2021-10-11 18:00:17 +08:00
yanyongyu
c81c0578e3 🐛 fix fastapi forward header duplicate (fix #560) 2021-10-11 17:53:49 +08:00
Ju4tCode
b01db74e0b 🔀 Merge pull request #559
Bot: 剑网三bot
2021-10-08 22:48:29 +08:00
JustUndertaker
4c40acb09d 🍻 publish bot 剑网三bot 2021-10-08 14:42:39 +00:00
Ju4tCode
3722547f1c 🔀 Merge pull request #557
Feature: template support raw string
2021-10-05 19:53:23 +08:00
yanyongyu
e12e18022b ⚗️ template support raw string 2021-10-04 22:00:32 +08:00
Ju4tCode
9a84bd175c 🔀 Merge pull request #556
Fix: fix cqhttp MessageSegment bugs
2021-10-04 00:17:06 +08:00
AkiraXie
ac87107556 🐛 fix bug in cqhttp MessageSegment 2021-10-03 23:20:17 +08:00
Ju4tCode
33f605a947 🔀 Merge pull request #555
Feature: support use MessageSegment factory method as message template format spec
2021-10-03 16:49:23 +08:00
nonebot
2a08f6bdf6 📝 update api docs 2021-10-03 08:41:04 +00:00
Mix
b9c91dc5c3 💡 add document for extended format spec 2021-10-03 16:39:43 +08:00
Mix
6b79106cd1 support use MessageSegment method as template format spec 2021-10-03 16:26:55 +08:00
Ju4tCode
0fa85be0e4 🔀 Merge pull request #554
Release: bump version of adapters
2021-10-03 11:13:25 +08:00
yanyongyu
69f8821acb 🐛 fix plugin publish guide typo 2021-10-03 11:07:22 +08:00
yanyongyu
ff96a11dc5 🐛 fix image link error 2021-10-03 11:00:17 +08:00
yanyongyu
042f7faa71 ⬆️ bump version of adapters 2021-10-03 02:10:50 +08:00
Ju4tCode
0d5849759f 🔀 merge pull request #551
📝 修复插件发布指引文档图片无法显示
2021-10-03 01:48:04 +08:00
SK-415
391a899045 📝 fix plugin publish doc image urls 2021-10-02 13:40:38 -04:00
yanyongyu
b72583b8c8 ⬆️ bump version of cqhttp adapter 2021-10-03 00:59:10 +08:00
StarHeart
cbb3ec1fb8 🔀 Merge pull request #550
Bump version of feishu adapter
2021-10-03 00:46:12 +08:00
StarHeartHunt
9f70daca59 ⬆️ bump version of feishu adapter 2021-10-03 00:41:03 +08:00
Ju4tCode
cfd992b6b1 🔀 Merge pull request #547
Release 2.0.0a16
2021-10-02 20:31:49 +08:00
yanyongyu
6ec1159f95 🔥 remove outdated versions 2021-10-02 18:01:26 +08:00
nonebot
38ac45f687 📝 update api docs 2021-10-02 09:51:48 +00:00
yanyongyu
1331cbf8a3 🔀 Merge master into dev 2021-10-02 17:48:56 +08:00
yanyongyu
a6fc0e408c 📝 update readme 2021-10-02 17:44:43 +08:00
yanyongyu
66b2153493 🔖 bump version 2.0.0a16 2021-10-02 17:35:10 +08:00
yanyongyu
94b98b74b9 ⚗️ add fastapi/quart uvicorn configs 2021-10-02 15:35:15 +08:00
Ju4tCode
f3abd2f1a3 🔀 Merge pull request #546
Feature: Add support for mirai adapter NudgeEvent
2021-10-02 15:10:32 +08:00
yanyongyu
1280cf9ba3 🎨 fix docstring format 2021-10-02 15:07:32 +08:00
nonebot
bac56635c0 📝 update api docs 2021-10-02 06:42:39 +00:00
Mix
6d9caadffc add support for mirai adapter NudgeEvent, fix #494 2021-10-02 14:30:02 +08:00
Mix
4a7c07a7ac 🔀 Merge pull request #545
Feature: support use `Message` object as message template
2021-10-02 14:14:03 +08:00
nonebot
910d18e79f 📝 update api docs 2021-10-02 06:07:16 +00:00
Mix
5cff80812e 🔥 remove Message.__init__ method of mirai adapter 2021-10-02 14:06:00 +08:00
Mix
c8a8ff28ec support use Message object as message template 2021-10-02 14:05:54 +08:00
yanyongyu
292b8e6366 ⬆️ update dependencies 2021-10-02 11:25:30 +08:00
yanyongyu
9e9608abd8 📝 update changelog 2021-10-01 23:45:47 +08:00
yanyongyu
3452880b16 ⚗️ add fastapi reload include/exclude 2021-09-30 01:22:12 +08:00
Ju4tCode
ef2c98c6af 🔀 Merge pull request #543
Plugin: pornhub风格图标生成
2021-09-29 00:52:57 +08:00
kexue-z
246b8ccbe7 🍻 publish plugin pornhub风格图标生成 2021-09-28 16:45:05 +00:00
Ju4tCode
2355c6385d 🔀 Merge pull request #541
Docs: 插件发布指引文档
2021-09-29 00:07:37 +08:00
XZhouQD
75811c0b64 📝 update api docs 2021-09-28 15:12:40 +00:00
XZhouQD
3a510e3888 📝 plugin publish docs 2021-09-28 23:09:34 +08:00
yanyongyu
161cfbe1b8 ⚗️ add more uvicorn config 2021-09-28 21:20:29 +08:00
yanyongyu
0b08d23e34 ⬆️ upgrade uvicorn 2021-09-28 20:56:05 +08:00
Mix
2ebf7fc096 🔀 Merge pull request #539
Fix: remove return value in event handle
2021-09-27 22:33:57 +08:00
yanyongyu
041b59011b 🔥 remove return value in event handle 2021-09-27 12:52:21 +08:00
yanyongyu
92a411e3b4 🎨 isort format code 2021-09-27 00:19:30 +08:00
Ju4tCode
81cbf84dca 🔀 Merge pull request #538
Bot: HarukaBot repository link update
2021-09-26 16:30:58 +08:00
SK
4364685b30 Fix HarukaBot repository link 2021-09-26 02:07:56 -04:00
yanyongyu
cfdebb30b7 🐛 fix log not escaped in forward driver 2021-09-25 19:14:16 +08:00
Mix
049d14295e 🔀 Merge pull request #536
完善飞书相关文档和部分事件Model
2021-09-25 10:04:35 +08:00
StarHeartHunt
3dc93f7997 🐛 fix __event__ value 2021-09-25 09:10:13 +08:00
StarHeartHunt
b19c2e4191 implement meeting, vc_meeting and attendance events 2021-09-25 09:05:48 +08:00
StarHeartHunt
d121a2080b implement drive, meeting and calendar events 2021-09-25 08:30:55 +08:00
StarHeartHunt
919e3ebf8c implement calendar acl event 2021-09-24 22:45:11 +08:00
StarHeartHunt
b0f4b8ffa1 implement contact events 2021-09-24 22:08:03 +08:00
StarHeart
b3bf9470cf 📝 improve doc
Co-authored-by: Mix <32300164+mnixry@users.noreply.github.com>
2021-09-24 21:33:24 +08:00
StarHeartHunt
16029a33e8 📝 format doc 2021-09-24 20:29:27 +08:00
StarHeartHunt
b31d04dc5d 🎨 improve code style 2021-09-24 20:26:50 +08:00
StarHeartHunt
e0f73ba193 📝 complete feishu doc 2021-09-24 20:26:12 +08:00
Mix
0b35d5e724 🔀 Merge pull request #534
Plugin: SimpleMusic
2021-09-21 23:26:56 +08:00
kanomahoro
c747342709 🍻 publish plugin SimpleMusic 2021-09-21 15:17:30 +00:00
Mix
244df12069 🔀 Merge pull request #532
Plugin: HTTP静态文件托管
2021-09-21 01:03:22 +08:00
mnixry
368afe6d63 🍻 publish plugin HTTP静态文件托管 2021-09-20 16:58:26 +00:00
StarHeartHunt
5cd61c09a8 🚨 re-export base adapter init
according to pep484
2021-09-18 20:22:38 +08:00
StarHeartHunt
1e55fbf6b1 🚨 re-export feishu init
according to pep484
2021-09-18 20:03:53 +08:00
yanyongyu
463ff260c4 🐛 fix doc build error 2021-09-18 18:04:19 +08:00
yanyongyu
89e32a3241 ⬆️ bump dependencies 2021-09-18 17:18:53 +08:00
yanyongyu
4f8771acbd 🚨 re-export according to pep484 2021-09-18 16:11:03 +08:00
Ju4tCode
a212baf90b 🔀 Merge pull request #528
Plugin: HanayoriBot
2021-09-18 13:10:34 +08:00
kanomahoro
5db8b124ab 🍻 publish plugin HanayoriBot 2021-09-18 02:59:21 +00:00
yanyongyu
a273d75b07 add send pause reject finish template 2021-09-17 23:28:08 +08:00
StarHeart
55a402203e Merge pull request #524 from nonebot/fix/feishu-private-msg
🐛 fix feishu private message event response
2021-09-17 20:46:27 +08:00
StarHeartHunt
64967e8807 🎨 resort dev dependencies 2021-09-17 20:36:08 +08:00
StarHeartHunt
43917b5aad ⬆️ bump nonebot-plugin-test to 0.3.0 2021-09-16 20:54:34 +08:00
nonebot
b97133fb59 📝 update api docs 2021-09-16 12:30:31 +00:00
StarHeartHunt
855f61d837 💚 fix missing module in API docs config 2021-09-16 20:29:06 +08:00
StarHeartHunt
e2003e27df parse data based on content-type of response 2021-09-16 20:29:05 +08:00
nonebot
d82749c48e 📝 update api docs 2021-09-16 20:29:05 +08:00
StarHeartHunt
0a802f9b13 add get_all_user_id for MessageEvent 2021-09-16 17:36:05 +08:00
yanyongyu
e0610fdcc0 🐛 fix publish field not required 2021-09-15 21:03:18 +08:00
Ju4tCode
20d0ecfc7f Merge pull request #526 from nonebot/ci/store-publish
👷 update store publish bot
2021-09-15 20:38:49 +08:00
hemengyang
fa15e5b0ee 👷 update store publish bot
仓库迁移至 NoneBot 组织
2021-09-15 17:16:15 +08:00
StarHeartHunt
d9cc912ccb 💥 use open_id to send private message instead 2021-09-14 21:52:31 +08:00
StarHeartHunt
09d9f414ce 🔊 add desc and name of NoticeEvent 2021-09-14 21:51:01 +08:00
yanyongyu
ca09fb8372 🔥 remove outdated doc version 2021-09-14 11:00:14 +08:00
Artin
b25a0387ba Merge pull request #521 from nonebot/fix-ding 2021-09-13 01:44:28 +08:00
artin
9931563d80 🐛 fix ding adapter issues
1. cannot send complicate message, such as actionCard
2. fix judge current connection mode
2021-09-13 01:19:14 +08:00
yanyongyu
53a576dae5 📝 update api doc 2021-09-11 19:49:32 +08:00
yanyongyu
44d13acc81 ♻️ rename message formatter into template 2021-09-11 19:48:46 +08:00
yanyongyu
59f567004f 🔥 remove outdated docs 2021-09-11 13:45:59 +08:00
yanyongyu
956e581d72 📝 update changelog 2021-09-11 13:45:07 +08:00
yanyongyu
b635d01519 💥 matcher prompt support message formatter 2021-09-11 13:45:03 +08:00
synodriver
12c1f6d764 🐛 fix USER bug 2021-09-09 23:17:54 +08:00
Ju4tCode
b66a4df4c5 🔀 Merge pull request #517
Plugin: ATRI语音包
2021-09-05 17:24:05 +08:00
FYWinds
46c61df081 🍻 publish plugin ATRI语音包 2021-09-05 09:05:30 +00:00
yanyongyu
b6ec81c21d 🐛 fix cqhttp get forward msg type error 2021-09-03 14:27:36 +08:00
StarHeart
f9f2f1b0bd 📝 update APScheduler doc link (x2) 2021-08-30 16:36:58 +08:00
StarHeart
45396e3163 📝 update APScheduler doc link 2021-08-30 16:34:34 +08:00
Mix
7ced508f9d 🔀 Merge pull request #514
🐛 Fix endswith match bug
2021-08-29 19:53:52 +08:00
ishkong
ed1f1c27e2 🐛 Fix endswith match bug 2021-08-29 19:18:36 +08:00
yanyongyu
3fa75b1c78 ♻️ separate adapter abstract classes 2021-08-29 00:24:28 +08:00
yanyongyu
258ef670e2 📝 update changelog 2021-08-29 00:11:52 +08:00
yanyongyu
5cf665fa21 🐛 fix format field error 2021-08-28 19:42:32 +08:00
yanyongyu
116f16b470 🐛 fix stringify when formatting 2021-08-28 19:39:54 +08:00
Ju4tCode
9518e3c568 🔀 Merge pull request #510
Feature: str.format like message formatting support
2021-08-28 13:06:02 +08:00
Mix
57827ea4bb 🔀 Merge pull request #513
Docs: Add FAQ link to `README.md`
2021-08-27 20:29:10 +08:00
Mix
8e41422055 📝 update faq link to official redirection domain
Co-authored-by: Ju4tCode <42488585+yanyongyu@users.noreply.github.com>
2021-08-27 19:58:08 +08:00
Mix
fcd168fd3e 📝 Add frequently asked questions link to README 2021-08-27 19:43:35 +08:00
Mix
fe1bd87ff8 📝 Add markdownlint ignore comment 2021-08-27 19:30:47 +08:00
Mix
efe1615d16 🔀 Merge pull request #512
Bot: Takker
2021-08-27 19:26:26 +08:00
nonebot
ca26609308 📝 update api docs 2021-08-27 11:25:23 +00:00
Mix
01e818f6a4 📝 allow document generate from nonebot.adapters._formatter 2021-08-27 19:24:12 +08:00
Mix
1c73a9adfa 💡 add comment to describe template formatter usage 2021-08-27 19:13:08 +08:00
FYWinds
a739b93561 🍻 publish bot Takker 2021-08-27 09:37:38 +00:00
yanyongyu
7cfdc2dd37 🔥 use Any for format type 2021-08-27 15:08:26 +08:00
yanyongyu
a6ff3711bb 🐛 fix link error in runtime hook doc 2021-08-27 14:52:17 +08:00
yanyongyu
58d10abd32 🎨 change typing for formatter 2021-08-27 14:46:15 +08:00
Mix
f0bc47ec5e Add message template formatter
ref: https://github.com/nonebot/discussions/discussions/27
2021-08-27 02:52:24 +08:00
yanyongyu
b5f2b1a76d 🐛 fix fastapi driver ws missing header 2021-08-25 23:04:48 +08:00
Mix
4f4a072dd7 🔀 Merge pull request #509
MessageSegment.image 的 BytesIO
2021-08-23 00:26:03 +08:00
jinser
fff7d3bff6 🐛 BytesIO cursor 可能不在开头 2021-08-23 00:12:47 +08:00
Ju4tCode
474fd10613 🔀 Merge pull request #508
Remove unsupported adapter
2021-08-21 22:50:57 +08:00
Jigsaw
9bea710e45 🔥 Remove unsupported adapter 2021-08-21 18:52:20 +08:00
Jigsaw
3c76c6ff8b 🔥 Remove unsupported adapter 2021-08-21 18:49:46 +08:00
Ju4tCode
a8a61623d2 🔀 Merge pull request #507
Bot: SetuBot
2021-08-19 19:55:04 +08:00
yuban10703
24ce531598 🍻 publish bot SetuBot 2021-08-19 11:12:18 +00:00
Ju4tCode
a6be0c370f 🔀 Merge pull request #503
Fix exception raised when constructing MessageChain from string
2021-08-19 10:12:57 +08:00
Mix
22c7371f2e 🐛 Fix exception raised when trying to construct message from plain 2021-08-19 01:36:51 +08:00
Ju4tCode
bfb77e9cdf 🔀 Merge pull request #501
Plugin: ELF_RSS
2021-08-17 10:36:30 +08:00
Quan666
9aa346fb1f 🍻 publish plugin ELF_RSS 2021-08-17 02:35:08 +00:00
Ju4tCode
1dfe5d49fc 🔀 Merge pull request #499
Plugin: Epic 限免游戏资讯
2021-08-17 10:34:50 +08:00
monsterxcn
e48788e41f 🍻 publish plugin Epic 限免游戏资讯 2021-08-17 01:56:10 +00:00
StarHeart
802c39da32 Merge pull request #495 from mri-moe/master
添加设置项,使得可以切换飞书和Lark API地址
2021-08-16 17:40:27 +08:00
mri-moe
0d23a9ab8d 📝 update api docs 2021-08-16 09:36:39 +00:00
StarHeartHunt
109cae6dac 🔧 add config for lark users 2021-08-16 17:35:22 +08:00
mri-moe
f63ef8d23b 📝 update desc
Co-authored-by: Ju4tCode <42488585+yanyongyu@users.noreply.github.com>
2021-08-16 17:35:13 +08:00
yanyongyu
3d4d3b0f24 🐛 fix got handler running more than once 2021-08-16 16:47:57 +08:00
mri-moe
a3fa1a36c9 📝 update api docs 2021-08-16 08:30:19 +00:00
mri-moe
45cec05bbc Update bot.py 2021-08-16 16:24:33 +08:00
mri-moe
e4d1462585 📝 update api docs 2021-08-16 08:10:42 +00:00
mri-moe
18c6bea451 ✏️ add switcher for lark 2021-08-14 13:04:15 +08:00
Ju4tCode
c4e3309026 🔀 Merge pull request #490
Release 2.0.0a15
2021-08-13 00:36:34 +08:00
yanyongyu
57a60ae45b 🏷️ add missing type hint 2021-08-13 00:20:41 +08:00
yanyongyu
e7f5097e17 📝 update archive doc 2021-08-12 23:50:46 +08:00
Ju4tCode
e437c13bb3 🔀 Merge pull request #492
feature: mirai multiple accounts support
2021-08-12 23:48:37 +08:00
Ju4tCode
edd7f3ccc8 🔀 Merge pull request #491
bugfix: catch setup factory exception
2021-08-12 23:27:24 +08:00
Mix
26f0d66017 add multiple account support for mirai adapter 2021-08-12 23:14:45 +08:00
Mix
5791018af1 🥅 catch exception raised in setup factory 2021-08-12 22:26:41 +08:00
yanyongyu
2c6b41f62c ⬆️ bump adapter version 2.0.0a15 2021-08-12 17:59:52 +08:00
yanyongyu
f2b23f1b44 🎨 escape message before colorful log 2021-08-12 16:45:22 +08:00
yanyongyu
a534f7b58c 🔖 bump version 2.0.0a15 2021-08-12 14:14:01 +08:00
yanyongyu
81398bb803 📝 update changelog 2021-08-12 14:01:09 +08:00
yanyongyu
3a0265b0f6 🐛 fix fastapi forward reconnect error 2021-08-12 13:59:01 +08:00
yanyongyu
59db66ef27 🐛 check data instead of object in to_me 2021-08-12 13:57:52 +08:00
Ju4tCode
a04957a354 🔀 Merge pull request #489
Bugfix: remove mirai session expiry
2021-08-11 22:50:54 +08:00
Mix
371cfd4a0e 🐛 Remove expiry check in nonebot.adapter.mirai.bot.SessionManager 2021-08-11 22:15:17 +08:00
Ju4tCode
037a5ccce0 🔀 Merge pull request #485
Plugin: nonebot-plugin-flexperm
2021-08-10 13:43:53 +08:00
rmuchan
879767df01 🍻 publish plugin nonebot-plugin-flexperm 2021-08-10 03:01:04 +00:00
Ju4tCode
31b18e36e7 🔀 Merge pull request #483
Plugin: 布谷机器人
2021-08-10 00:46:57 +08:00
Sclock
eb3e20abfb 🍻 publish plugin 布谷机器人 2021-08-09 16:45:05 +00:00
Ju4tCode
b96823b5bd 🔀 Merge pull request #481
Plugin: 孤寡机器人
2021-08-10 00:44:46 +08:00
Sclock
b098c8477b 🍻 publish plugin 孤寡机器人 2021-08-09 13:39:24 +00:00
Ju4tCode
02b2589eeb 🔀 Merge pull request #476
Plugin: nonebot-plugin-autohelp
2021-08-08 14:21:16 +08:00
ffreemt
05ea21becd 🍻 publish plugin nonebot-plugin-autohelp 2021-08-08 05:44:37 +00:00
Ju4tCode
2836f50e74 🔀 Merge pull request #474
飞书适配器重定向aiocache logging到统一logger
2021-08-08 11:18:40 +08:00
StarHeartHunt
7b3d66cd2a 🔊 force aiocache to use standard logger 2021-08-08 10:05:42 +08:00
yanyongyu
ceebe0e95d 🐛 fix absolute import 2021-08-06 15:13:36 +08:00
Ju4tCode
2fe01f33e0 Merge pull request #471 from nonebot/bugfix/mirai-tag-escape
Fix log tag escape error in `event.get_description` in mirai adapter
2021-08-06 02:32:53 +08:00
Mix
410266acb1 🐛 Fix log tag escape error in event.get_description 2021-08-05 23:11:57 +08:00
Ju4tCode
02924d56cd 🔀 Merge pull request #468
Plugin: 和风天气
2021-08-05 23:02:36 +08:00
kexue-z
0bd8d4fbbc 🍻 publish plugin 和风天气 2021-08-05 07:30:36 +00:00
Ju4tCode
547bebebd9 🔀 Merge pull request #466
Bot: DicePP
2021-08-05 00:31:53 +08:00
pear-studio
f8703557a0 🍻 publish bot DicePP 2021-08-04 16:23:52 +00:00
yanyongyu
8e97a84ad8 💥 correct message segment mapping funcs 2021-08-04 19:35:03 +08:00
yanyongyu
3564228183 🐛 fix message segment mapping error 2021-08-04 19:11:59 +08:00
Ju4tCode
bb93757f51 🔀 Merge pull request #464
Docs: update guide docs
2021-08-04 15:55:49 +08:00
yanyongyu
e18b3d04fb 📝 update mirai guide 2021-08-04 15:35:02 +08:00
yanyongyu
458085b317 📝 update guide doc 2021-08-04 15:02:24 +08:00
Ju4tCode
832875e7cf 🔀 Merge pull request #462
Release: 2.0.0a14
2021-08-04 14:08:55 +08:00
yanyongyu
73762e65bb Merge branch 'dev' of github.com:nonebot/nonebot2 into dev 2021-08-04 13:52:14 +08:00
Ju4tCode
26e627c36c Merge branch 'master' into dev 2021-08-04 13:50:18 +08:00
yanyongyu
8b93dc7769 🔖 Release 2.0.0a14 2021-08-04 13:42:21 +08:00
yanyongyu
6cfd44224d ⬆️ update dependencies 2021-08-04 12:55:30 +08:00
Ju4tCode
dc8b7887d7 🔀 Merge pull request #461
Add forward driver support for mirai-api-http adapter
2021-08-04 12:46:30 +08:00
nonebot
18f98e4cbc 📝 update api docs 2021-08-04 04:42:56 +00:00
yanyongyu
db73d2b621 📝 update doc 2021-08-04 12:41:53 +08:00
nonebot
7a3cd8c395 📝 update api docs 2021-08-03 16:44:13 +00:00
Mix
358528b495 👽 Add forward driver support for mirai-api-http adapter 2021-08-04 00:35:31 +08:00
yanyongyu
cda1ad093f 💥 change forward setup api 2021-07-31 12:24:11 +08:00
yanyongyu
f48c61c2e0 🐛 improve sub plugin detect 2021-07-29 17:31:28 +08:00
yanyongyu
571cdef826 📝 fix sphinx build errors 2021-07-28 16:32:50 +08:00
yanyongyu
0ce3ee6c20 💡 support sphinx 4.0 2021-07-26 12:14:29 +08:00
Ju4tCode
600fc4fffd 🔀 Merge pull request #452
修复由于 quart.exception在新版Quart被移除导致import出错
2021-07-26 11:16:00 +08:00
Mix
c1b10a0e48 👽 🐛 fix quart.exception removal caused import error 2021-07-26 10:41:38 +08:00
yanyongyu
904f285f62 ⬆️ update outdated dependencies 2021-07-25 12:09:25 +08:00
Ju4tCode
8680695586 Merge pull request #451 from nonebot/plugin/issue450
Adapter: feishu
2021-07-25 10:51:32 +08:00
StarHeartHunt
a1803553fb 🍻 publish adapter feishu 2021-07-25 01:40:55 +00:00
yanyongyu
9c647682e7 📌 update lock file 2021-07-23 15:34:02 +08:00
Ju4tCode
fb6e5a69f2 🔀 Merge pull request #448
飞书适配器import顺序格式化
2021-07-23 15:10:55 +08:00
Ju4tCode
cf85cbecb3 🔀 Merge pull request #449
修复依赖项git链接
2021-07-23 15:09:34 +08:00
nonebot
948ea93599 📝 update api docs 2021-07-23 07:00:01 +00:00
StarHeart
de48ed99a7 💚 fix git link 2021-07-23 14:58:03 +08:00
StarHeartHunt
8a6c26440c 🎨 sort imports in feishu adapter 2021-07-23 14:46:55 +08:00
yanyongyu
cf747f954c fastapi driver support forward connect 2021-07-23 00:51:19 +08:00
yanyongyu
54a7e4808c ⬆️ update lock file 2021-07-22 23:59:04 +08:00
yanyongyu
03f5683d52 ⬆️ update dependencies 2021-07-22 23:26:36 +08:00
Ju4tCode
58c922f042 🔀 Merge pull request #447
Publish plugin web-monitor
2021-07-22 13:01:56 +08:00
Abrahum
98e65ebdec 🍻 publish web monitor 2021-07-22 12:46:13 +08:00
Ju4tCode
e4a4a8127e 🔀 Merge pull request #444
Docs: 文档支持 algolia 全文搜索
2021-07-22 00:08:05 +08:00
yanyongyu
72b0ee0130 use pypi instead of aliyun 2021-07-22 00:07:20 +08:00
Ju4tCode
679ec94020 🔀 Merge pull request #446
Bot: dumbot傻瓜机器人
2021-07-21 23:49:31 +08:00
yanyongyu
1f0be1e1e3 improve aiohttp main loop performance 2021-07-21 23:47:18 +08:00
ffreemt
bcc55a9143 🍻 publish bot dumbot傻瓜机器人 2021-07-21 09:25:38 +00:00
StarHeartHunt
749d33478a 📝 add algolia search 2021-07-21 17:23:16 +08:00
yanyongyu
cb68e0ee1b 📝 update doc 2021-07-20 15:47:52 +08:00
yanyongyu
ecc613f6c5 add cqhttp forward support 2021-07-20 15:36:20 +08:00
yanyongyu
04b3fda40c cqhttp support forward websocket 2021-07-19 23:46:29 +08:00
yanyongyu
32787fdc1e ⚗️ experimenting aiohttp driver 2021-07-19 14:51:28 +08:00
yanyongyu
637c48aea7 🚧 update aiohttp driver 2021-07-19 01:20:17 +08:00
Ju4tCode
5768b5bdd6 🔀 Merge pull request #425
Feature: 添加飞书适配器支持
2021-07-18 22:42:37 +08:00
Ju4tCode
96d05cb521 🔀 Merge pull request #442
Plugin: nonebot_plugin_fr24
2021-07-18 19:43:23 +08:00
IronWolf-K
92e5b8ea88 🍻 publish plugin FlightRadar24查询模块 2021-07-18 10:28:27 +00:00
StarHeartHunt
59ed869ed0 📝 update api docs 2021-07-18 07:09:27 +00:00
yanyongyu
a14d475de2 🎨 format and update lock file 2021-07-18 15:07:30 +08:00
Ju4tCode
8ea4561f1c 🔀 Merge pull request #440
Optimize the description of multiple plugins
2021-07-18 13:50:48 +08:00
Lan
5ac43eb459 🚸 Improve user experience 2021-07-17 23:26:20 +08:00
Ju4tCode
c22d97fe47 🔀 Merge pull request #438
Plugin: nonebot_plugin_setu
2021-07-16 00:09:40 +08:00
ayanamiblhx
bb964213f1 🍻 publish plugin nonebot_plugin_setu 2021-07-15 13:04:43 +00:00
StarHeartHunt
ef1547cbfe Merge branch 'feishu-adapter' of https://github.com/StarHeartHunt/nonebot2-vercel-mirror into feishu-adapter 2021-07-14 10:43:03 +08:00
StarHeartHunt
f2295318a9 📝 update index 2021-07-14 10:42:47 +08:00
StarHeartHunt
66b54de869 📝 update copyright 2021-07-14 10:39:39 +08:00
StarHeartHunt
d802fad111 📝 update adapter store 2021-07-14 10:39:00 +08:00
StarHeartHunt
8acd561de6 📝 update api docs 2021-07-14 02:31:27 +00:00
StarHeartHunt
b4e20e00e4 Merge branch 'feishu-adapter' of https://github.com/StarHeartHunt/nonebot2-vercel-mirror into feishu-adapter 2021-07-14 10:29:12 +08:00
StarHeartHunt
3230dfc14a 📝 update main api doc 2021-07-14 10:28:48 +08:00
StarHeartHunt
607f338934 📝 update api docs 2021-07-14 02:24:35 +00:00
StarHeartHunt
758108229a 📝 add feishu api doc 2021-07-14 10:22:31 +08:00
StarHeartHunt
aac4571d43 📝 add feishu adapter doc 2021-07-14 10:19:37 +08:00
StarHeartHunt
0436c1b7b8 update test env 2021-07-14 09:26:53 +08:00
Ju4tCode
a740a9cfea 🔀 Merge pull request #435
Docs: scheduler docs typo
2021-07-11 15:21:51 +08:00
Ju4tCode
57ff73269b Update scheduler.md 2021-07-11 15:19:04 +08:00
StarHeartHunt
625c12fc12 implement all self-built app event 2021-07-11 12:26:11 +08:00
StarHeartHunt
4fc655323d 🎨 format code 2021-07-11 12:25:27 +08:00
Ju4tCode
f0482bb636 🔀 Merge pull request #434
Docs: 修复漏字
2021-07-11 12:20:40 +08:00
StarHeart
df6486f926 📝 fix docstring 2021-07-11 11:37:14 +08:00
Ju4tCode
141cd10651 🔀 Merge pull request #432
Bot: ATRI
2021-07-09 22:21:34 +08:00
Kyomotoi
711fffe3b0 🍻 publish bot ATRI 2021-07-09 09:09:14 +00:00
StarHeartHunt
2c056364c1 🚧 message read event should implement NoticeEvent 2021-07-09 16:18:19 +08:00
StarHeartHunt
c6921c731c update test file 2021-07-09 16:15:24 +08:00
StarHeartHunt
8c7498eeb5 🔥 self-built app hasn't MetaEvent 2021-07-09 16:14:25 +08:00
StarHeartHunt
30cb6be104 📝 tweak 2021-07-09 16:09:25 +08:00
StarHeartHunt
fbd60e30fc 🔥 remove check_reply 2021-07-09 16:09:01 +08:00
StarHeartHunt
2908cb3ce2 🐛 tweak 2021-07-09 16:02:54 +08:00
StarHeartHunt
b1c5013088 implement check_reply check_atme check_nickname 2021-07-09 16:01:32 +08:00
StarHeartHunt
70e424b58f ️ support cache tenant token 2021-07-09 09:22:56 +08:00
StarHeartHunt
730186cfd4 remove optional param 2021-07-08 23:06:48 +08:00
StarHeartHunt
d2ae2e2982 🚑 safely get dict value 2021-07-08 23:05:12 +08:00
StarHeartHunt
67770ffa6f implement at parser 2021-07-08 22:30:39 +08:00
StarHeartHunt
15ab958a70 🎨 format code 2021-07-08 22:30:21 +08:00
StarHeartHunt
af6f63dc44 🚧 add todo 2021-07-08 16:13:07 +08:00
StarHeartHunt
7c7994e2e2 implement rich text serializer 2021-07-08 16:12:43 +08:00
StarHeartHunt
f597303698 ♻️ improve segment-string parser 2021-07-08 14:52:34 +08:00
StarHeartHunt
1222972b73 ️ optimize import 2021-07-08 14:39:38 +08:00
StarHeartHunt
7df407056b implement text merger 2021-07-08 10:49:02 +08:00
StarHeartHunt
79b6601d12 🍻 tweak 2021-07-08 10:07:55 +08:00
Ju4tCode
53d98f3d2e 🔀 Merge pull request #430
修复mirai adapter中上传相关api操作报错
2021-07-08 09:27:36 +08:00
StarHeartHunt
fe43c8d69a 💩 should implement rich text parser 2021-07-07 22:36:08 +08:00
StarHeartHunt
e490be9eb0 🎨 tweak 2021-07-07 22:29:13 +08:00
Mix
3af8b55985 🐛 fix access denied for mirai adapter upload related action 2021-07-07 20:39:46 +08:00
yanyongyu
aaed345a20 🚨 remove linter error 2021-07-07 14:09:03 +08:00
yanyongyu
f42d578765 🐛 fix log tag unescaped 2021-07-07 14:08:44 +08:00
StarHeartHunt
f5843dd3ad 🔊 forgot to add backspace 2021-07-06 22:11:34 +08:00
StarHeartHunt
840580334f 🔊 optimize log 2021-07-06 22:08:38 +08:00
StarHeartHunt
5a8b5b5696 ️ optimize import 2021-07-06 22:08:22 +08:00
StarHeartHunt
dc5aa3d4bf 🔥 remove rich_text parser 2021-07-06 22:01:02 +08:00
StarHeartHunt
b9befc8350 🔇 remove print 2021-07-06 21:15:02 +08:00
StarHeartHunt
e3c3e370cb ️ remove unnecessary code 2021-07-06 21:12:49 +08:00
StarHeartHunt
603a63a629 implement message serializer & deserializer 2021-07-06 18:01:41 +08:00
Ju4tCode
276d09bb54 🔀 Merge pull request #428
Plugin: nonebot_plugin_statistical
2021-07-06 15:18:48 +08:00
StarHeartHunt
5635c83bfb 🐛 fix p2p model parse 2021-07-06 14:58:38 +08:00
StarHeartHunt
0ec7cdc3aa update testcase 2021-07-06 14:58:00 +08:00
HibiKier
932963e71c 🍻 publish plugin nonebot_plugin_statistical 2021-07-06 06:14:20 +00:00
StarHeartHunt
322ac98c50 🐛 validate schema field & fix request construct 2021-07-06 10:57:51 +08:00
StarHeartHunt
811e94e186 implement message target guessing 2021-07-06 10:45:00 +08:00
StarHeartHunt
0c39300f4b add call_api and implement send func 2021-07-05 11:10:49 +08:00
StarHeartHunt
33bd7582be 🎨 sort import 2021-07-05 11:10:49 +08:00
StarHeartHunt
b6979594a7 implement group and private message 2021-07-05 11:10:49 +08:00
StarHeartHunt
150ef30b73 add custom exception 2021-07-05 11:10:49 +08:00
StarHeartHunt
1042759d60 ️ make api_endpoint hard_encoded 2021-07-05 11:10:49 +08:00
StarHeartHunt
866149902c update testcase 2021-07-05 11:10:49 +08:00
StarHeartHunt
136b13b4cc ️ remove unused import 2021-07-05 11:10:49 +08:00
StarHeartHunt
cc11e2e885 🔧 add config api_endpoint 2021-07-05 11:10:49 +08:00
StarHeartHunt
f9f1e33262 implement message constructor 2021-07-05 11:10:49 +08:00
StarHeartHunt
7a8f881b04 implement event parser 2021-07-05 11:10:49 +08:00
StarHeartHunt
20c3c24a6d 👷 implement testcase 2021-07-05 11:10:49 +08:00
yanyongyu
f80ba8451f 🎨 fix linter error 2021-07-05 11:10:49 +08:00
StarHeartHunt
b1fa2bbb80 🔧 add configs 2021-07-05 11:10:49 +08:00
StarHeartHunt
406511496d 🏷️ add events 2021-07-05 11:10:49 +08:00
StarHeartHunt
24144a9474 implement check_permission procedure 2021-07-05 11:10:23 +08:00
yanyongyu
3571a5fdc0 🐛 fix missing json encode for cqhttp http 2021-07-04 23:23:39 +08:00
StarHeartHunt
4afd681ca9 🏷️ add segment schema 2021-07-03 13:56:47 +08:00
StarHeartHunt
48816308f8 add encryption support 2021-07-03 13:55:20 +08:00
StarHeartHunt
3e66eb2fdb add encryption dependency 2021-07-03 13:53:43 +08:00
StarHeartHunt
d669fed5e9 add testcase for feishu adapter 2021-07-03 13:53:01 +08:00
yanyongyu
8e915f808b 🎨 fix linter error 2021-07-03 11:50:56 +08:00
StarHeartHunt
46ace83106 🎉 init feishu adapter 2021-07-01 07:59:50 +08:00
Ju4tCode
da16bdbb96 🔀 Merge pull request #421
Docs: fix typo
2021-06-27 21:20:01 +08:00
StarHeart
c1b7b78929 ✏️ fix typo 2021-06-27 20:01:05 +08:00
midori
b9de8baac4 New: get_bot function (#419)
Co-authored-by: nonebot <nonebot@users.noreply.github.com>
Co-authored-by: Ju4tCode <42488585+yanyongyu@users.noreply.github.com>
2021-06-27 14:03:54 +08:00
yanyongyu
b3718c3042 ⚗️ add forward driver aiohttp 2021-06-21 01:25:58 +08:00
yanyongyu
69cee3844e support dot notation for driver config 2021-06-21 01:25:58 +08:00
Ju4tCode
1db462e4ad 🔀 Merge pull request #416
Plugin: nonebot_plugin_russian
2021-06-20 21:24:44 +08:00
HibiKier
23cfa5564a 🍻 publish plugin nonebot_plugin_russian 2021-06-20 06:04:57 +00:00
Ju4tCode
7879346ca1 Merge pull request #414 from nonebot/remove-print
remove unnecessary print
2021-06-20 09:58:19 +08:00
nonebot
ef5a49933f 📝 update api docs 2021-06-20 01:28:07 +00:00
StarHeart
e0bd7e11d5 🔥 remove unnecessary print 2021-06-20 09:25:55 +08:00
yanyongyu
0c5bbdaabe 🎨 remove linter error 2021-06-19 15:18:57 +08:00
yanyongyu
d8e29a81aa support absolute plugin import 2021-06-19 15:15:00 +08:00
yanyongyu
9f15b69724 allow change handlers list when running 2021-06-18 16:27:41 +08:00
yanyongyu
cd12718dcb 🐛 update mirai adapter 2021-06-18 01:23:13 +08:00
Ju4tCode
94c3c47523 🔀 Merge pull request #412
Plugin: nonebot_plugin_pixivrank_search
2021-06-17 18:00:33 +08:00
HibiKier
fde6181d3c 🍻 publish plugin nonebot_plugin_pixivrank_search 2021-06-17 08:10:24 +00:00
Ju4tCode
a4c6d834ff 🔀 Merge pull request #410
Bug: 修复shell_command多次--help时重复输出
2021-06-17 10:59:27 +08:00
rmuchan
c8e494ca83 📝 update api docs 2021-06-17 02:20:46 +00:00
Muchan
f87c23c9a7 🐛 fix duplicated help 2021-06-17 10:14:36 +08:00
yanyongyu
b2f21ab974 🎨 fix message typing error 2021-06-17 01:07:19 +08:00
yanyongyu
6749afe75e 🚨 remove linter error 2021-06-16 00:58:47 +08:00
Ju4tCode
8849cb73bb 🔀 Merge pull request #409
Docs: typo
2021-06-15 10:21:03 +08:00
yanyongyu
ad2060e651 📝 update api docs 2021-06-15 10:16:31 +08:00
yanyongyu
c76dae584e 🐛 fix quart implement 2021-06-15 10:16:17 +08:00
StarHeart
edb7c79acf 📝 typo 2021-06-15 09:53:25 +08:00
yanyongyu
76c830739c 🎨 change reverse driver abstract methods 2021-06-15 01:23:12 +08:00
yanyongyu
8e6f8fada8 🐛 fix import recursion when same plugin and file name (fix #401) 2021-06-15 01:13:05 +08:00
yanyongyu
ddd96271b0 🎨 improve typing 2021-06-14 19:52:35 +08:00
Ju4tCode
e9bc98e74d 🔀 Merge pull request #406
Feature: 支持自定义 Response
2021-06-14 14:14:43 +08:00
StarHeartHunt
af6e9217c7 📝 update api docs 2021-06-13 18:08:29 +00:00
StarHeartHunt
c0d78449be support custom response 2021-06-14 02:06:37 +08:00
Mix
d7f2837efe 🔀 Merge pull request #408
Docs: 完善文档 Python 版本描述
2021-06-12 16:47:36 +08:00
StarHeart
cf9b5fd980 📝 complete python version requirement 2021-06-12 15:34:27 +08:00
Ju4tCode
b42cafafd6 🔀 Merge pull request #407
修复Mirai加群通过时报错
2021-06-11 23:02:57 +08:00
Mix
136c9a2687 🐛 Fix Mirai group join event approve failed, fix #400 2021-06-11 20:20:14 +08:00
yanyongyu
cf45572211 ⬆️ upgrade fastapi 2021-06-11 01:48:52 +08:00
Ju4tCode
c9d80255ae 🔀 Merge pull request #405
Bot: 绪山真寻bot
2021-06-10 13:10:07 +08:00
HibiKier
393be3baa4 🍻 publish bot 绪山真寻bot 2021-06-10 00:21:43 +00:00
Ju4tCode
fd01213697 🔀 Merge pull request #403
Bot: YanXiBot
2021-06-09 23:42:10 +08:00
Melodyknit
2f5eb1a0f9 🍻 publish bot YanXiBot 2021-06-09 15:19:27 +00:00
StarHeart
ca31ec5fe3 Merge pull request #398 from nonebot/StarHeartHunt-patch-1
Docs: update tagline
2021-06-02 10:23:55 +08:00
StarHeart
2003dfd703 📝 update tagline in README 2021-06-02 08:45:14 +08:00
StarHeart
f3342722f5 📝 update tagline 2021-06-02 08:43:01 +08:00
yanyongyu
b2f5f93603 🐛 fix error inherit state in session when using state_factory 2021-05-31 21:54:17 +08:00
yanyongyu
830276d110 🐛 fix state error when matcher update(fix #397) 2021-05-31 21:49:25 +08:00
Ju4tCode
9342d03f4d 🔀 Merge pull request #396
Update plugins.json
2021-05-31 16:19:30 +08:00
HibiKier
fe588caebb Update plugins.json 2021-05-31 16:04:11 +08:00
Ju4tCode
b0026831d0 🔀 Merge pull request #395
Update plugins.json
2021-05-31 15:38:54 +08:00
HibiKier
46d7804c98 Update plugins.json 2021-05-31 12:20:13 +08:00
yanyongyu
accbf57776 🚨 remove some linter warning 2021-05-31 01:06:56 +08:00
yanyongyu
62c0dd6e74 💡 add docstring 2021-05-31 00:27:31 +08:00
yanyongyu
916bb5b0e6 💡 update docstring 2021-05-30 11:07:27 +08:00
yanyongyu
45e1126f37 🐛 fix missing update when reject or pause (fix #394) 2021-05-30 10:55:34 +08:00
yanyongyu
57cf8e9bd8 🐛 fix cqhttp event session id mismatch for group 2021-05-29 19:32:05 +08:00
Ju4tCode
f609a9fe0e 🔀 Merge pull request #392
Docs: update telegram links
2021-05-29 18:26:34 +08:00
Ju4tCode
4795f01583 Merge branch 'dev' into richardchien-patch-1 2021-05-29 18:15:32 +08:00
Richard Chien
06f9f795aa 🔗 add discord badge 2021-05-29 14:09:19 +08:00
Richard Chien
2d7d8992c0 🔗 update community links 2021-05-29 13:53:43 +08:00
Ju4tCode
15007feea7 🔀 Merge pull request #391
Docs: add discord server badge
2021-05-29 00:08:47 +08:00
nonebot
8095be9ab9 📝 update api docs 2021-05-28 14:31:02 +00:00
StarHeart
ea48b86310 📝 add discord server link 2021-05-28 22:27:49 +08:00
Ju4tCode
6402d8a4de Merge pull request #388 from HibiKier/patch-2
Update plugins.json
2021-05-28 13:25:43 +08:00
HibiKier
5ec30c5122 Update plugins.json 2021-05-28 13:20:59 +08:00
yanyongyu
c4b83a60f1 🚧 add http request and response class 2021-05-27 01:01:58 +08:00
Ju4tCode
0fec4c8592 🔀 Merge pull request #387 2021-05-26 17:42:18 +08:00
HibiKier
a09e09b942 Update plugins.json 2021-05-26 17:13:06 +08:00
Ju4tCode
7e8296b36e 🔀 Merge pull request #386
typo
2021-05-25 21:10:53 +08:00
nonebot
322477638a 📝 update api docs 2021-05-25 12:48:51 +00:00
StarHeart
e659b4b2b6 🐛 typo 2021-05-25 20:46:27 +08:00
yanyongyu
27fe6e4fcb 🔥 remove cqhttp api self_id arg 2021-05-25 16:59:26 +08:00
Ju4tCode
7d8b0843a0 Merge pull request #382 from nonebot/plugin/issue381
Plugin: Nonebot2 消息撤回插件
2021-05-24 21:31:38 +08:00
MeetWq
e44b427b7a 🍻 publish plugin Nonebot2 消息撤回插件 2021-05-24 12:42:34 +00:00
Ju4tCode
2ff6f87842 🔀 Merge pull request #380
Update plugins.json
2021-05-24 17:13:48 +08:00
HibiKier
84dfe18f39 Update plugins.json 2021-05-24 16:59:05 +08:00
yanyongyu
918b375ece 💥 drop self_id call_api support 2021-05-24 16:49:27 +08:00
StarHeart
c82a4820f7 Merge pull request #377 from Cosmos-Break/patch-3
Docs: Readme.md 增加 awesome-nonebot 资源库
2021-05-23 20:26:34 +08:00
StarHeartHunt
c6e62957ab 📝 tweak expression 2021-05-23 15:48:13 +08:00
Cosmos-Break
8a14177219 📝 add link to awesome-nonebot 2021-05-23 15:45:30 +08:00
StarHeart
24268072fc Merge pull request #378 from Cosmos-Break/patch-4
Docs: Add mirai adapter port config
2021-05-23 15:33:40 +08:00
Cosmos-Break
3c65f2dd19 📝 add mirai port config 2021-05-23 15:28:48 +08:00
Jigsaw
3f14a92a3e Merge pull request #374 from nonebot/docs/mah-user-guide
更新 Mirai-API-HTTP 用户指南
2021-05-23 01:31:52 +08:00
Mix
adf2016f4e 📝 Update Mirai-API-HTTP user guide, fix #373 2021-05-23 01:29:52 +08:00
Ju4tCode
81bb8be7f3 🔀 Merge pull request #371
Plugin: nonebot-plugin-alias
2021-05-22 18:53:10 +08:00
MeetWq
744f9e9f5d 🍻 publish plugin nonebot-plugin-alias 2021-05-22 09:59:57 +00:00
Ju4tCode
e2de13e122 🔀 Merge pull request #369
Flow: add .DS_store to .gitignore
2021-05-22 11:32:46 +08:00
StarHeartHunt
3939dfa024 🙈 ignore .DS_Store 2021-05-22 11:27:16 +08:00
yanyongyu
8680a954f8 ♻️ separate driver 2021-05-21 17:06:20 +08:00
Ju4tCode
20001764bf 🔀 Merge pull request #367
Plugin: remove todo plugin
2021-05-21 15:18:09 +08:00
yanyongyu
61512ff01f 🏷️ add type hint for logger 2021-05-21 15:15:04 +08:00
Jigsaw
2488c6295e 📝 Remove nonebot_plugin_todo 2021-05-21 13:26:42 +08:00
Ju4tCode
100f560558 🔀 Merge pull request #366
Docs: update permission doc
2021-05-21 00:51:14 +08:00
StarHeartHunt
01678005f0 🎨 reformat docs 2021-05-21 00:46:09 +08:00
StarHeartHunt
00dc72b6c4 🔥 remove .DS_Store 2021-05-20 22:41:54 +08:00
AkiraXie
ca21fb8202 📝 fix typo 2021-05-20 20:28:11 +08:00
AkiraXie
5989c3fecd 📝 update permission doc 2021-05-20 20:20:51 +08:00
yanyongyu
7376933c31 📝 update api doc build 2021-05-20 15:09:59 +08:00
Ju4tCode
a573266cab Merge pull request #364 from nonebot/plugin/issue363
Plugin: nonebot_plugin_gamedraw
2021-05-17 11:28:00 +08:00
HibiKier
8374f86fde 🍻 publish plugin nonebot_plugin_gamedraw 2021-05-17 03:08:42 +00:00
Ju4tCode
4a18772d2c 🔀 Merge pull request #362
Plugin: Nonebot2插件轻量帮助列表
2021-05-17 10:07:42 +08:00
XZhouQD
5d0ac94bfe 🍻 publish plugin Nonebot2插件轻量帮助列表 2021-05-17 00:50:29 +00:00
Ju4tCode
a636ddfab4 🔀 Merge pull request #360
Docs: 添加中国大陆文档镜像
2021-05-15 10:45:32 +08:00
StarHeartHunt
5c2840ca27 📝 add chinese mainland docs mirror 2021-05-14 22:56:11 +08:00
Ju4tCode
44850a279d 🔀 Merge pull request #359
Docs: update cqhttp implementations name
2021-05-12 12:09:27 +08:00
XZhouQD
17f3258207 📝 update api docs 2021-05-12 04:03:04 +00:00
Xiaowei Zhou
b95fed69b0 [Docs] Fix: oicq-plugin-onebot -> node-onebot
Also fixed url there
2021-05-12 09:38:25 +08:00
Xiaowei Zhou
059935aedb [Docs] Update: oicq-plugin-onebot renmae 2021-05-12 09:20:51 +08:00
Xiaowei Zhou
c99e1880d3 [Doc] Update: Onebot-Kotlin rename
Update: cqhttp-mirai / cqhttp-mirai-embedded has been renamed to Onebot-Mirai / Onebot-Kotlin by its author [yyuueexxiinngg](https://github.com/yyuueexxiinngg). Since the embedded branch was abandoned, both links here point to master branch of [onebot-kotlin](https://github.com/yyuueexxiinngg/onebot-kotlin).
2021-05-12 08:54:19 +08:00
yanyongyu
faf7a3b500 📝 update doc 2021-05-10 18:42:32 +08:00
yanyongyu
41c5ac0ac7 improve plugin matcher system 2021-05-10 18:39:59 +08:00
yanyongyu
f8ad9ef278 ⚗️ support segment typing for message 2021-05-10 00:54:15 +08:00
Mix
5146a30836 🔀 Merge pull request #356
Plugin: Minecraft 服务器状态查询
2021-05-09 22:51:56 +08:00
Jigsaw111
db59cd9578 🍻 publish plugin Minecraft 服务器状态查询 2021-05-09 14:26:01 +00:00
yanyongyu
4b38afdcd7 cqhttp message segment support more types 2021-05-04 11:08:31 +08:00
Ju4tCode
b87971247a 🔀 Merge pull request #350
Docs: fix store link
2021-05-03 15:00:13 +08:00
yanyongyu
dcf4838fda 📝 fix store link 2021-05-03 14:56:24 +08:00
StarHeart
6f40365407 🐛 fix store link 2021-05-03 14:10:12 +08:00
Ju4tCode
315fdb97d3 🔀 Merge pull request #349
Adapter: gocq
2021-05-02 16:39:04 +08:00
yanyongyu
9a3e974063 🐛 fix adapter publish id link error 2021-05-02 16:37:57 +08:00
Jigsaw111
6b3183cdfa 🍻 publish adapter gocq 2021-05-02 08:37:17 +00:00
yanyongyu
5189a182b5 ✏️ fix typo 2021-05-02 16:26:47 +08:00
yanyongyu
884a7b966f 🐛 fix missing bool to str convert in cqhttp message segment 2021-05-02 14:24:12 +08:00
Ju4tCode
fa73c13800 🔀 Merge pull request #344
Docs: update load a plugin
2021-05-01 10:59:14 +08:00
Ju4tCode
593d593a62 📝 update doc 2021-05-01 10:53:18 +08:00
Jigsaw
c2c8906b7d 📝 update loading-a-plugin docs 2021-04-30 16:24:23 +08:00
Ju4tCode
71f68fc1ce 🔀 Merge pull request #343 2021-04-29 22:58:14 +08:00
Jigsaw111
add2bda2c1 🍻 publish plugin nonebot_plugin_puppet 2021-04-29 14:22:11 +00:00
Ju4tCode
beef2ad8cf 🔀 Merge pull request #338
Bot: Github Bot
2021-04-26 22:43:03 +08:00
yanyongyu
554865f97f 🍻 publish bot Github Bot 2021-04-26 14:35:25 +00:00
Ju4tCode
d3e7ed4a71 🔀 Merge pull request #336
Docs: update handlers overload
2021-04-25 13:23:05 +08:00
yanyongyu
56e489b458 📝 update doc 2021-04-25 13:18:36 +08:00
AkiraXie
5f3bd91321 📝 update description in handler-overload doc 2021-04-25 02:31:37 +08:00
AkiraXie
4655bf1df8 📝 update handlers-overload docs 2021-04-25 02:08:52 +08:00
yanyongyu
9052214e6d raise ImportError when exec_module 2021-04-21 18:26:58 +08:00
Ju4tCode
59405bbe7a 🔀 Merge pull request #335
Bot: change repository url
2021-04-20 01:08:39 +08:00
Ailitonia
260d119711 Bot: change repository url
Updated new repository url for Bot: Omega Miya
2021-04-19 23:30:42 +08:00
yanyongyu
5abc0d9614 📝 update changelog 2021-04-19 21:51:36 +08:00
Ju4tCode
4ba6ff106c Merge pull request #334 from nonebot/yanyongyu/issue332
Fix: log module name error
2021-04-19 21:50:11 +08:00
Ju4tCode
9e51df9116 🔀 Merge pull request #333
New: support custom log level config
2021-04-19 21:44:25 +08:00
yanyongyu
64d51448b8 🐛 fix log module name error 2021-04-19 21:43:28 +08:00
yanyongyu
79d3bbcdfe 🔊 change log level add level config 2021-04-19 21:15:10 +08:00
yanyongyu
c24d0def09 🔖 bump adapter cqhttp version 2021-04-18 23:30:57 +08:00
Ju4tCode
e08843dd5c 🔀 Merge pull request #331
Docs: 一点小修改
2021-04-16 15:47:35 +08:00
StarHeart
ec35ef041a 📝 tweak 2021-04-16 09:03:00 +08:00
Ju4tCode
efe8dd98b5 🔀 Merge pull request #330
Plugin: 待办事项提醒(闹钟)
2021-04-15 01:14:09 +08:00
Jigsaw111
3fb9b25284 🍻 publish plugin 待办事项提醒(闹钟) 2021-04-14 12:28:02 +00:00
Ju4tCode
06deb13826 🔀 Merge pull request #328
Docs: 文档优化
2021-04-13 13:09:38 +08:00
StarHeartHunt
7d189392d2 📝 recommend pylance 2021-04-13 00:24:49 +08:00
StarHeartHunt
2a07b49cb7 📝 tweak 2021-04-12 23:35:51 +08:00
yanyongyu
0be145491d 🚸 add question template 2021-04-12 13:06:03 +08:00
Ju4tCode
58dd4a2183 🔀 Merge pull request #326
优化 issue 模板 bug 报告
2021-04-12 12:44:15 +08:00
StarHeart
810477749b 🚸 implement bug report template 2021-04-12 12:08:54 +08:00
Ju4tCode
92b035bea8 🔀 Merge pull request #322
New: `handle_event` will return excecption
2021-04-09 12:50:47 +08:00
yanyongyu
9801a8cebd 🎨 format code 2021-04-09 12:26:27 +08:00
Mix
f5a22b3d4b 🥅 return event handling exception 2021-04-08 23:35:08 +08:00
Ju4tCode
abbcb36131 🔀 Merge pull request #321
add documentation issue template
2021-04-08 00:43:21 -05:00
Ju4tCode
d4860af85f 🔀 Merge pull request #320
忽略 yarn.lock 防止意外提交
2021-04-08 00:41:46 -05:00
Ju4tCode
50a4cbdb80 🔀 Merge pull request #319
Docs: 更新 go-cqhttp 配置文件
2021-04-08 00:38:51 -05:00
StarHeart
dff9a74f35 🚸 add doc issue template 2021-04-08 13:26:34 +08:00
StarHeartHunt
a5c2b06493 🙈 ignore yarn.lock 2021-04-08 13:05:41 +08:00
StarHeartHunt
7bb49f0b3c 📝 update go-cqhttp config file 2021-04-08 12:34:01 +08:00
Mix
00b4b880e9 🔀 Merge pull request #316
Docs: 写明所需 Python 最低版本小版本号
2021-04-07 01:18:17 +08:00
StarHeart
87d93def62 📝 declare patch version of minimal supported python version 2021-04-07 01:13:44 +08:00
Ju4tCode
0315aa7d8f 🔀 Merge pull request #314
Doc: update store style
2021-04-05 03:49:06 -05:00
yanyongyu
b9812ea11b 🎨 revert v-row 2021-04-05 16:39:26 +08:00
yanyongyu
207750774d 🎨 improve format 2021-04-05 16:35:29 +08:00
StarHeartHunt
176dbd5830 📝 update api docs 2021-04-05 05:52:25 +00:00
StarHeartHunt
1c6711355e 🎨 format files 2021-04-05 13:49:01 +08:00
StarHeartHunt
20e1bf9624 📝 improve store display effect 2021-04-05 13:34:35 +08:00
yanyongyu
d1a438a287 ⚗️ support tuple prefix in startswith 2021-04-04 12:28:10 +08:00
yanyongyu
0d467d9275 add startswith endswith ignorecase option #312 2021-04-04 12:19:03 +08:00
yanyongyu
c402b7599f 🐛 fix missing matcher when load external plugin with dot 2021-04-03 17:32:01 +08:00
Ju4tCode
916d620012 🔀 Merge pull request #311
Pre Release 2.0.0a13.post1
2021-04-01 12:42:58 -05:00
yanyongyu
0fd82d4f54 📝 archive doc 2021-04-02 01:38:42 +08:00
yanyongyu
e425571b08 🐛 fix protocol not found in py37 2021-04-02 01:17:33 +08:00
yanyongyu
85f0023350 🔥 improve matcher store 2021-04-02 01:09:40 +08:00
yanyongyu
0eadf5f4e9 🐛 fix load error 2021-04-02 00:05:27 +08:00
Ju4tCode
b09a7518f5 🔀 Merge pull request #310
Pre Release 2.0.0a13
2021-04-01 07:44:52 -05:00
yanyongyu
0235af770f 📌 bump version 2021-04-01 20:34:49 +08:00
yanyongyu
e03e3f6130 📝 update doc 2021-04-01 20:27:27 +08:00
yanyongyu
f0a6ff4627 ⚗️ add called api hook 2021-04-01 20:23:55 +08:00
Ju4tCode
6b763e20d0 🔀 Merge pull request #309
Fix: matcher got  recursion
2021-04-01 07:09:08 -05:00
yanyongyu
fcb1c5d316 🚑 fix matcher got recursion 2021-04-01 20:05:31 +08:00
Ju4tCode
953328903c 🔀 Merge pull request #308
Pre Release 2.0.0a12
2021-03-31 08:55:18 -05:00
yanyongyu
afba90838f 📝 archive doc 2021-03-31 21:37:01 +08:00
nonebot
f1ed783776 📝 update api docs 2021-03-31 13:27:02 +00:00
yanyongyu
59ec5bacde 📝 update changelog 2021-03-31 21:20:07 +08:00
yanyongyu
ca08c56df7 🐛 fix import hook export 2021-03-31 20:38:00 +08:00
yanyongyu
d1e8925fe0 ⬆️ bump version 2021-03-31 20:25:45 +08:00
yanyongyu
68ba1c1af2 🐛 fix reply get fail broken down 2021-03-31 20:09:00 +08:00
Ju4tCode
03ac119313 🔀 Merge pull request #307
New: add call_api hook
2021-03-31 04:00:18 -05:00
yanyongyu
8f99b01fb5 ⚗️ add call_api hook 2021-03-31 16:53:10 +08:00
yanyongyu
4e7592de98 🔒 ensure cqhttp str radd escaped 2021-03-30 16:21:56 +08:00
Ju4tCode
5db819738e 🔀 Merge pull request #300
Fix: mirai empty message chain when check at
2021-03-30 02:55:02 -05:00
SinonJZH
ade5d923ab 🐛 fix mirai message chain empty 2021-03-30 12:16:12 +08:00
yanyongyu
43b185a3b8 🔊 add log for event handle 2021-03-27 14:42:43 +08:00
yanyongyu
65ec4828a9 📝 update changelog 2021-03-26 14:27:05 +08:00
yanyongyu
1f585d8bcb store message in ParserExit exception 2021-03-26 11:25:13 +08:00
yanyongyu
b861149e0b add argparse help message 2021-03-25 18:22:56 +08:00
Ju4tCode
534b51bc73 🔀 Merge pull request #294
Doc: update hook docs
2021-03-25 02:14:41 -05:00
AkiraXie
430b3467cc 📝 fix typo 2021-03-24 20:04:48 +08:00
AkiraXie
2dc7107990 📝 update hook docs 2021-03-24 19:52:47 +08:00
Ju4tCode
81edb535a4 🔀 Merge pull request #293
Docs: runtime hook
2021-03-24 12:09:34 +08:00
yanyongyu
f00ce8b4f6 🐛 matcher.send returned none 2021-03-24 00:28:37 +08:00
StarHeartHunt
696ae2da6b 📝 update api docs 2021-03-23 15:11:34 +00:00
StarHeartHunt
b7e5ce88ea 📝 Correct params of hook functions 2021-03-23 23:10:05 +08:00
Ju4tCode
8fc8cb6112 🔀 Merge pull request #291
Plugin: 本地数据存储
2021-03-22 17:28:48 +08:00
yanyongyu
48fae782d7 📝 update plugin doc 2021-03-22 17:27:31 +08:00
yanyongyu
f3e78cc82e 🍻 publish plugin 本地数据存储 2021-03-22 09:25:11 +00:00
yanyongyu
45199a247b 🐛 fix plugin matcher data 2021-03-22 16:41:29 +08:00
yanyongyu
f0a8b47c06 💩 remove __manager__ 2021-03-22 01:23:09 +08:00
yanyongyu
6371cd6bfe 🐛 fix error matcher module when import 2021-03-22 01:15:15 +08:00
yanyongyu
d738f8674d 📝 update doc and chqnglog 2021-03-20 16:38:42 +08:00
Ju4tCode
abfda3113b 🔀 Merge pull request #276
Breaking: change cqhttp ding session id
2021-03-20 16:36:22 +08:00
yanyongyu
a941b32dd5 📝 update changelog 2021-03-20 16:33:16 +08:00
yanyongyu
1527fb55f5 💡 update handler docstring 2021-03-20 16:33:16 +08:00
Ju4tCode
ffc1cd7d8d 🔀 Merge pull request #290
Fix: cqhttp post secret checking error
2021-03-20 16:32:51 +08:00
Reverier-Xu
7f27957164 💥 change cqhttp ding session id 2021-03-20 16:13:02 +08:00
yanyongyu
f8c057b135 📌 update lock file 2021-03-20 15:13:08 +08:00
yanyongyu
2166595e50 🐛 fix cqhttp secret checking #289 2021-03-20 14:49:58 +08:00
yanyongyu
22033e1cfb 🐛 fix typing 2021-03-19 15:02:01 +08:00
yanyongyu
fc334ec7b9 add logger id 2021-03-19 00:24:38 +08:00
yanyongyu
e7dc4e1eec ⚗️ finish handler class 2021-03-18 21:30:52 +08:00
yanyongyu
6bd12b7f2c ⚗️ add handler class 2021-03-18 19:16:18 +08:00
Ju4tCode
5d48a92d1d 🔀 Merge pull request #287
Plugin: bilibili视频、番剧解析
2021-03-16 18:08:03 +08:00
mengshouer
4bc87ca747 🍻 publish plugin bilibili视频、番剧解析 2021-03-16 10:04:32 +00:00
yanyongyu
62135dc117 🔊 fix logger color tag 2021-03-16 16:20:58 +08:00
yanyongyu
1e294b8fbe 🐛 fix config load due to pydantic breaking change 2021-03-16 16:17:34 +08:00
Ju4tCode
9258bb09b4 🔀 Merge pull request #285
Doc: backword for 2.0.0a11 archive
2021-03-14 11:52:55 +08:00
StarHeartHunt
b31317720b 📝 add tips for separated adapters in 2.0.0a11 docs 2021-03-14 08:49:22 +08:00
yanyongyu
211c571508 🐛 fix reimport by require 2021-03-13 18:21:56 +08:00
yanyongyu
785eac1345 🏷️ fix regex rule typing error 2021-03-13 15:35:13 +08:00
yanyongyu
bb64c6fb71 🐛 fix type and permission updater 2021-03-12 16:28:56 +08:00
Ju4tCode
782232fb1a 🔀 Merge pull request #282
Bug: typo in built-in plugin
2021-03-11 14:57:09 +08:00
Artin
0fec9915de ding: send by webhook
close: #189

Feature: 钉钉添加 `send_by_webhook` 方法 #189
2021-03-11 13:26:16 +08:00
StarHeart
efacff698d 🐛 typo 2021-03-11 10:55:18 +08:00
Ju4tCode
36d0628e4f 🔀 Merge pull request #281
Fix: store bot display and readme
2021-03-11 00:39:08 +08:00
yanyongyu
46c65b919f 🐛 fix bot display bug 2021-03-11 00:27:32 +08:00
Ju4tCode
0b9aad09cf 🔀 Merge pull request #280
Bot: Omega Miya
2021-03-11 00:23:55 +08:00
Ailitonia
717e74f01d 🍻 publish bot Omega Miya 2021-03-10 16:22:39 +00:00
Ju4tCode
ef4f8df5a7 🔀 Merge pull request #278
Bot: HarukaBot
2021-03-11 00:21:13 +08:00
SK-415
dce1187750 🍻 publish bot HarukaBot 2021-03-10 14:45:43 +00:00
yanyongyu
5ee6beb4b8 🚑 fix test reload 2021-03-10 17:32:14 +08:00
Mix
3af8cc45ea 🔀 Merge pull request #274
Fix: Plugin Store link in README
2021-03-08 17:27:58 +08:00
yanyongyu
89ff2dd3c5 📝 update readme 2021-03-08 17:16:37 +08:00
SK-415
e7101a1f39 fix: Plugin Store link in README 2021-03-08 16:39:33 +08:00
Ju4tCode
2af7f2bedb 🔀 Merge pull request #273
Fix: mah friend request
2021-03-07 09:08:35 -06:00
notnotype
ad70fac377 📝 update api docs 2021-03-07 14:41:18 +00:00
notnotype
2885e6053c fix: mah adapter 不能接受好友请求 2021-03-07 22:36:38 +08:00
Ju4tCode
4661adc564 🔀 Merge pull request #272
Fix: errors in doc
2021-03-07 08:34:03 -06:00
yanyongyu
edc6da9e61 ✏️ fix plugin link 2021-03-07 22:24:04 +08:00
Ju4tCode
d49749e5a1 🔀 Merge pull request #269
Fix typo
2021-03-07 08:22:05 -06:00
Ju4tCode
8544fb2f69 🔀 Merge pull request #268
Doc: add adapter install guide
2021-03-07 08:20:52 -06:00
Ju4tCode
80e41d26e2 🔀 Merge pull request #270
Fix: doc plugin publish
2021-03-07 08:19:22 -06:00
StarHeart
8d6bb3768b 🐛 correct params order 2021-03-07 19:09:03 +08:00
StarHeart
c54007d7a4 🐛 typo 2021-03-07 18:54:00 +08:00
Ju4tCode
35bf3ef772 🔀 Merge pull request #267
Plugin: 插件管理器
2021-03-07 04:40:55 -06:00
StarHeartHunt
06e1459667 Merge branch 'docs' of github.com:StarHeartHunt/nonebot2-vercel-mirror into docs 2021-03-07 18:13:43 +08:00
StarHeartHunt
da97a18497 📝 remove redundant characters 2021-03-07 18:12:14 +08:00
StarHeartHunt
61e33e24e9 📝 update api docs 2021-03-07 10:04:53 +00:00
StarHeartHunt
f49a581193 📝 replace inaccurate words 2021-03-07 18:01:30 +08:00
StarHeartHunt
f30b9e4fb9 📝 tips for getting adapters list 2021-03-07 17:59:25 +08:00
StarHeartHunt
c3a8dc709f 📝 tips for installing separated adapters 2021-03-07 17:55:29 +08:00
Jigsaw111
63d6f173d6 🍻 publish plugin 插件管理器 2021-03-07 08:42:10 +00:00
Ju4tCode
8d80b610d1 🔀 Merge pull request #265
ci: 更新商店发布议题机器人
2021-03-06 11:19:58 -06:00
hemengyang
80a54914e2 👷 update publish issue bot 2021-03-07 00:43:12 +08:00
yanyongyu
ac613b5839 🐛 fix subplugin detect bug 2021-03-06 22:25:50 +08:00
yanyongyu
33412f9bd2 ⚗️ add reload dir config for fastapi 2021-03-06 11:56:58 +08:00
Ju4tCode
51304fdd8e 🔀 Merge pull request #262
Fix: exclude all `__init__.py` in adapter packaging
2021-03-05 11:46:22 -06:00
yanyongyu
e139c883a3 🚑 exclude all __init__ in packaging 2021-03-06 01:40:20 +08:00
Ju4tCode
662c5c09a6 🔀 Merge pull request #261
Fix: fix adapter override namespace file
2021-03-05 10:40:39 -06:00
yanyongyu
a99d33198f 🐛 fix override 2021-03-06 00:09:26 +08:00
yanyongyu
e6ac07e608 🔀 Merge branch 'dev' 2021-03-05 20:49:16 +08:00
yanyongyu
d476c7e999 👷 update release drafter 2021-03-05 20:48:44 +08:00
Ju4tCode
22655005f9 🔀 Merge pull request #260
Pre Release 2.0.0a11
2021-03-05 06:39:19 -06:00
yanyongyu
f7dd898379 📝 update api doc 2021-03-05 20:29:47 +08:00
nonebot
d568a31684 📝 update api docs 2021-03-05 12:17:22 +00:00
yanyongyu
46795ecd4b 📌 update lock file 2021-03-05 20:09:42 +08:00
yanyongyu
f1f510604e 📝 archive 2.0.0a11 doc 2021-03-05 20:01:55 +08:00
yanyongyu
611049681a change publish and issue 2021-03-05 16:27:43 +08:00
Ju4tCode
15c6f30fc3 🔀 Merge pull request #259
Plugin: biliav小程序转换器
2021-03-04 04:58:51 -06:00
nonebot
59a855f2ed 📝 update api docs 2021-03-04 10:55:07 +00:00
knva
db61a93de8 🍻 publish biliav小程序转换器 2021-03-04 10:52:37 +00:00
yanyongyu
4ed5b06db0 📝 update changelog 2021-03-03 16:09:37 +08:00
yanyongyu
9e04e497b7 ⚗️ add type and permission updater hook 2021-03-03 16:06:19 +08:00
yanyongyu
464f0d4a89 🔀 Merge branch 'master' 2021-03-02 15:59:38 +08:00
Ju4tCode
1df24a683e 🔀 Merge pull request #255
Fix: prompt type error
2021-03-02 01:57:45 -06:00
nonebot
873aa62825 📝 update api docs 2021-03-02 07:41:23 +00:00
yanyongyu
cb6c1cccca 🐛 fix upload ci bug 2021-03-02 15:38:47 +08:00
yanyongyu
f6289ff1b3 🐛 fix prompt error 2021-03-02 14:35:02 +08:00
Ju4tCode
7b61cd370e 🔀 Merge pull request #254 2021-03-01 08:53:17 -06:00
anlen123
7f4ee24f87 🍻 publish 缩写查询器 2021-03-01 22:48:23 +08:00
yanyongyu
3c8dca67fa ⬆️ bump dependency 2021-03-01 19:24:03 +08:00
yanyongyu
b962bc43e6 ⬆️ bump httpx 2021-03-01 17:39:44 +08:00
Ju4tCode
e70b29bb9e 🔀 Merge pull request #251
Plugin: 缩写查询器
2021-03-01 01:59:31 -06:00
anlen123
94a55fead5 🍻 publish 缩写查询器 2021-03-01 06:47:51 +00:00
yanyongyu
b23e845726 ⬆️ fit pydantic 1.8 2021-03-01 00:30:06 +08:00
Ju4tCode
dc17d514b4 🔀 Merge pull request #249
Plugin: 猜猜看
2021-02-28 21:43:10 +08:00
ffreemt
5e24300619 🍻 publish 猜猜看 2021-02-28 12:29:11 +00:00
yanyongyu
dc38a98180 ⬆️ bump and fit pydantic 1.8 2021-02-28 00:35:40 +08:00
Ju4tCode
af27e8f3f5 🔀 Merge pull request #246
Docs: 添加 Vercel 文档镜像链接
2021-02-27 15:32:35 +08:00
StarHeart
01af05742c 📝 Add link to docs mirror (hosted on Vercel) 2021-02-26 22:51:33 +08:00
Ju4tCode
11052dbcd1 🔀 Merge pull request #245
Plugin: nonebot-plugin-r6s
2021-02-26 17:29:45 +08:00
Ju4tCode
f9e4d077d4 🔀 Merge pull request #243
Bug: adapter can be register more than once
2021-02-26 17:28:04 +08:00
abrahum
3477c0d8b4 🍻 publish nonebot-plugin-r6s 2021-02-26 09:25:35 +00:00
yanyongyu
8c9e096a84 🐛 ignore adapter register with same name 2021-02-26 17:22:39 +08:00
Ju4tCode
19a780eabb 🔀 Merge pull request #242
Docs: update how-to-work doc
2021-02-26 17:06:26 +08:00
yanyongyu
3c312d9759 📝 update how to work doc
Co-authored-by: AkiraXie <l997460364@outlook.com>
2021-02-26 17:00:38 +08:00
yanyongyu
bb37d757da 💡 remove comment 2021-02-26 12:03:48 +08:00
Ju4tCode
9ea80abf8c 🔀 Merge pull request #238
fix builtin plugin single session
2021-02-25 10:56:20 +08:00
AkiraXie
117758658e Merge branch 'bug/single_session-bug' of https://github.com/AkiraXie/nonebot2 into bug/single_session-bug 2021-02-24 23:57:29 +08:00
AkiraXie
da290dad07 🥅 fix ValueError to Exception 2021-02-24 23:56:52 +08:00
AkiraXie
00daaed074 📝 update api docs 2021-02-24 14:27:44 +00:00
AkiraXie
6f2b9a1d13 🐛 fix single_session bug 2021-02-24 22:21:47 +08:00
yanyongyu
04e11c3b3e 💡 update docstring 2021-02-24 17:56:43 +08:00
yanyongyu
eb8e5aa39d add plugin loading using json/toml 2021-02-24 17:48:08 +08:00
Ju4tCode
93ffc93a80 🔀 Merge pull request #236
fix nonebot_plugin_cocdicer link error
2021-02-24 12:24:41 +08:00
Abrahum
d3091cdb3e fix nonebot_plugin_cocdicer link error 2021-02-24 11:51:23 +08:00
yanyongyu
869df38238 ✏️ fix typo 2021-02-23 23:34:24 +08:00
yanyongyu
507000b63b 🐛 fix command match #235 2021-02-23 22:50:25 +08:00
Ju4tCode
6ab18f2d14 🔀 Merge pull request #232
Plugin: 跑团记录记录器
2021-02-23 17:20:37 +08:00
Jigsaw111
80714c9b61 🍻 publish 跑团记录记录器 2021-02-23 06:45:19 +00:00
Ju4tCode
42157f3dd1 🔀 Merge pull request #231
Fix: deploy ci
2021-02-23 10:12:18 +08:00
Ju4tCode
854c2ae499 🔀 Merge pull request #230
Plugin: nonebot-plugin-cocdicer
2021-02-23 10:09:03 +08:00
yanyongyu
f397789516 👷 fix deploy ci 2021-02-23 10:08:32 +08:00
abrahum
fe8d711108 🍻 publish nonebot-plugin-cocdicer 2021-02-22 15:02:17 +00:00
yanyongyu
f31318b7f4 🚸 wrap version with try 2021-02-22 10:44:42 +08:00
Ju4tCode
74ce56817c 🔀 Merge pull request #226
Update installation.md
2021-02-21 15:55:24 +08:00
danuonuo
31682f5f28 Update installation.md
根据我之前的一个issue,完善文档
2021-02-21 15:26:15 +08:00
Ju4tCode
7d3b397ff4 🔀 Merge pull request #224
New: Import hook
Fix: literal event type
2021-02-21 11:09:52 +08:00
nonebot
352f9f85c1 📝 update api docs 2021-02-21 03:06:51 +00:00
yanyongyu
f9d4bcba3d ⚗️ change allowed types for cqhttp #222
Co-authored-by: synodriver <624805065@qq.com>
2021-02-21 11:00:45 +08:00
yanyongyu
2c85b2aa19 👷 update ci 2021-02-21 10:52:37 +08:00
yanyongyu
9bbadddfa9 🐛 fix sub plugin relative import 2021-02-20 11:09:16 +08:00
yanyongyu
247456df56 📝 update docs 2021-02-19 15:24:52 +08:00
yanyongyu
be674c0efc ⚗️ add load all plugin function 2021-02-19 15:15:46 +08:00
yanyongyu
f26fb9d6fb ⚗️ change import hook 2021-02-19 14:58:26 +08:00
yanyongyu
6cd6750729 📝 update change log 2021-02-18 19:59:18 +08:00
Ju4tCode
19c4602354 🔀 Merge pull request #218
Breaking: change nonebot project structure
2021-02-17 23:31:49 +08:00
nonebot
60ef01b66f 📝 update api docs 2021-02-17 15:23:23 +00:00
yanyongyu
f40f1788df 📝 update README 2021-02-17 23:16:43 +08:00
Ju4tCode
c855ebcfb1 🔀 Merge pull request #217
Doc: Add launching from IDE warning
2021-02-17 21:58:28 +08:00
yanyongyu
24f3900c69 👷 udpate ci 2021-02-17 21:55:19 +08:00
StarHeart
70581abcef 📝 Add tips for IDE start-ups 2021-02-17 20:55:31 +08:00
Ju4tCode
f2c732722f 🔀 Merge pull request #215
Fix: `nonebot-plugin-ncm` repo link error
2021-02-17 14:28:09 +08:00
Ju4tCode
e76430a43b ✏️ fix plugin ncm repo link 2021-02-17 14:21:40 +08:00
Ju4tCode
20e19d34b8 Merge pull request #214 from nonebot/plugin/issue213
Plugin: 网易云无损音乐下载
2021-02-13 19:09:16 +08:00
kitUIN
f58eb61f2d 🍻 publish 网易云无损音乐下载 2021-02-13 10:59:06 +00:00
yanyongyu
35e9321feb 👷 disable commit comment 2021-02-12 13:38:48 +08:00
yanyongyu
631743171f 📝 update authors 2021-02-12 13:30:11 +08:00
yanyongyu
fc2694497e add adapter publish template 2021-02-11 17:55:57 +08:00
yanyongyu
31b8a5ff77 🏗️ change nonebot project structure 2021-02-11 17:29:16 +08:00
Ju4tCode
6ce034ca20 🔀 Merge pull request #211
Add Docs ci/cd
2021-02-10 14:08:27 +08:00
yanyongyu
3cc738c205 👷 update ci 2021-02-10 13:53:41 +08:00
yanyongyu
7b2af1b2f3 👷 update ci 2021-02-10 13:42:09 +08:00
yanyongyu
eeec690e71 👷 update ci 2021-02-10 13:00:25 +08:00
yanyongyu
aba18a2f68 👷 update ci 2021-02-10 12:58:24 +08:00
yanyongyu
17c7903bee 👷 update ci 2021-02-10 12:23:52 +08:00
yanyongyu
ad47c24b60 👷 update ci 2021-02-10 12:19:32 +08:00
yanyongyu
6eab05d57f 👷 update ci 2021-02-10 12:15:11 +08:00
yanyongyu
f4d623be25 👷 update ci 2021-02-10 12:09:37 +08:00
yanyongyu
4a961d8584 👷 update ci 2021-02-10 12:02:12 +08:00
yanyongyu
36e6f5b5c1 👷 update ci 2021-02-10 11:52:34 +08:00
yanyongyu
332a3a4f93 👷 update ci 2021-02-10 11:46:00 +08:00
yanyongyu
145caee37a 👷 update ci 2021-02-10 11:44:49 +08:00
yanyongyu
2fa7b7ca00 👷 update ci 2021-02-10 11:38:56 +08:00
yanyongyu
d60fca90f6 👷 update doc publish ci 2021-02-10 11:35:54 +08:00
Ju4tCode
4abfa2cf2b 🔀 Merge pull request #210
Plugin: hk-reporter
2021-02-10 10:33:55 +08:00
felinae98
ada964e5aa 🍻 publish hk-reporter 2021-02-09 15:29:52 +00:00
Ju4tCode
16cf694a77 🔀 Merge pull request #208
Plugin: Arcaea 查分器
2021-02-09 10:56:55 +08:00
iyume
362b8724fc 🍻 publish Arcaea 查分器 2021-02-09 02:54:24 +00:00
Ju4tCode
d06a927085 🔀 Merge pull request #206
update doc
2021-02-08 11:09:20 +08:00
Ju4tCode
031faa5923 🔀 Merge pull request #205
update doc
2021-02-08 11:04:08 +08:00
yanyongyu
a2c1e5fd26 📝 update README 2021-02-08 11:00:11 +08:00
StarHeartHunt
ac35c13727 📝 tweak 2021-02-08 10:27:21 +08:00
StarHeartHunt
f7b8c7ab8d 📝 add runtime hook doc 2021-02-08 10:26:39 +08:00
StarHeartHunt
802250eb71 📝 tweak 2021-02-08 10:25:58 +08:00
Ju4tCode
3fb002c977 🔀 Merge pull request #204 2021-02-07 23:47:41 +08:00
yanyongyu
98d1d407c3 📝 archive docs 2021-02-07 23:44:58 +08:00
Ju4tCode
8821218bfd 🔀 Merge pull request #202
Pre Release 2.0.0a10
2021-02-07 23:42:08 +08:00
Ju4tCode
27b9b413df Restore .env.dev 2021-02-07 23:36:56 +08:00
yanyongyu
2b67b0f12e 🔇 remove unused type hint 2021-02-07 23:36:04 +08:00
nonebot
d26d7bba55 📝 update api docs 2021-02-07 13:30:19 +00:00
Mix
0761a60443 🩹 fix reply process in mirai adapter 2021-02-07 21:28:58 +08:00
yanyongyu
217b1a5fac revert command change 2021-02-07 20:57:08 +08:00
yanyongyu
ef98a6f23c 🔖 bump version 2.0.0a10 2021-02-07 20:51:09 +08:00
nonebot
c6a6dc6e21 📝 update api docs 2021-02-07 09:17:49 +00:00
Mix
f3b77a7f60 ✏️ fix typo in docs 2021-02-07 17:16:12 +08:00
Mix
f625c34269 📝 update descriptions about plugin 2021-02-07 17:10:29 +08:00
Mix
ac5c4acf09 🔖 bump version 2.0.0a9.post2 2021-02-07 16:39:34 +08:00
Ju4tCode
9a3464744f 🔀 Merge pull request #201
Hotfix: error module name for plugin wordbank
2021-02-07 14:10:25 +08:00
yanyongyu
91bdfc4704 🚑 hotfix error module name for plugin-wordbank 2021-02-07 14:06:48 +08:00
Ju4tCode
6f8aa49d0e 🔀 Merge pull request #200
Doc typo
2021-02-07 14:03:23 +08:00
StarHeartHunt
be57798eac 📝 update api docs 2021-02-07 05:39:13 +00:00
StarHeart
4855e65b1a 📝 typo 2021-02-07 13:37:15 +08:00
Ju4tCode
a3fe3a1ad8 🔀 Merge pull request #199
Fix mirai adapter command process
2021-02-07 12:55:49 +08:00
Mix
382a9b6e12 🔊 improve message logging 2021-02-07 12:40:31 +08:00
Mix
24349953e3 update test case 2021-02-07 12:17:34 +08:00
Mix
85aba9e36f 🐛 fix bug founded during test in mirai adapter 2021-02-07 12:17:21 +08:00
Mix
49010bf5b7 ⚗️ trying to change mirai adapter message processing behavior 2021-02-07 11:52:50 +08:00
yanyongyu
b1c7f309f8 📝 update doc 2021-02-07 11:09:20 +08:00
Ju4tCode
458ddaa167 🔀 Merge pull request #196
New: Quart driver
2021-02-07 11:02:23 +08:00
Ju4tCode
ab97334cf8 🔀 Merge pull request #197
Docs: export and require
2021-02-07 11:01:20 +08:00
Ju4tCode
112fdf7ed3 📝 update export require doc 2021-02-07 10:59:13 +08:00
Mix
b59ff03abf revert changes to change implement method
This reverts commit bf7b2a8cbe.
2021-02-07 10:15:18 +08:00
Mix
bdd9f5ae30 🐛 fix bad type hinting 2021-02-07 02:27:09 +08:00
Mix
abcdbc4de9 💥 🐛 add support for non-plaintext start message 2021-02-07 02:21:31 +08:00
AkiraXie
1715139494 📝 update docs 2021-02-06 20:53:25 +08:00
AkiraXie
b862c506e4 📝 update export-and-require doc 2021-02-06 17:34:06 +08:00
nonebot
4fd4fbfb08 📝 update api docs 2021-02-06 03:44:30 +00:00
Mix
6cb9fda53a 🎨 remove unused imports 2021-02-06 11:43:01 +08:00
Mix
4f7a033b9c use dynamic routing in quart driver 2021-02-06 11:38:21 +08:00
Mix
c537841bc1 📝 add index in document for quart driver 2021-02-06 11:15:46 +08:00
Mix
7d9a8eaf19 💚 add extra install in document build 2021-02-06 11:15:46 +08:00
Mix
86965ee06d 💡 add comments in quart driver 2021-02-06 11:15:30 +08:00
Mix
496f64f103 🐛 fix bugs in quart driver 2021-02-06 10:34:52 +08:00
Mix
9e0862bc97 finish quart driver implement 2021-02-06 09:41:17 +08:00
Mix
6b43ad5575 add quart as a extra requirement 2021-02-06 09:40:57 +08:00
yanyongyu
bf7b2a8cbe matcher.send will return bot.send 2021-02-05 23:13:35 +08:00
Ju4tCode
7232c89292 🔀 Merge pull request #195
Fix: mirai adapter not escape tag in log
2021-02-05 20:55:54 +08:00
Mix
bc164ca2f2 add a dependcies for quart 2021-02-05 20:29:53 +08:00
Mix
ad8429e7fa 🐛 fix log escape in mirai adapter 2021-02-05 20:09:19 +08:00
yanyongyu
c268e0105d 🐛 fix escape comma 2021-02-05 14:26:03 +08:00
Ju4tCode
050137fb3f 🔀 Merge pull request #194
Pre Release 2.0.0a9.post1
2021-02-05 13:41:35 +08:00
yanyongyu
f2d04c598c 📝 update doc 2021-02-05 13:34:38 +08:00
nonebot
49307a3df2 📝 update api docs 2021-02-05 05:32:52 +00:00
yanyongyu
ff9f0bc74a 📝 update doc 2021-02-05 13:31:33 +08:00
yanyongyu
f929f25abd 🔖 Pre Release 2.0.0a9.post1 2021-02-05 13:05:46 +08:00
Ju4tCode
6af0a2574d 🔀 Merge pull request #193
Fix: MatcherGroup rule override
2021-02-05 11:56:05 +08:00
nonebot
c61a159eff 📝 update api docs 2021-02-05 03:51:53 +00:00
yanyongyu
59bdd03b1e 🐛 fix rule override bug 2021-02-05 11:49:12 +08:00
yanyongyu
35ea1e78ec 📝 update readme 2021-02-03 14:47:26 +08:00
yanyongyu
7db386b752 🔖 bump version a9.post1 2021-02-03 11:29:51 +08:00
yanyongyu
e6a68feb0c 🚑 hotfix missing return when rule check failed 2021-02-03 11:23:13 +08:00
Ju4tCode
78b0450d66 🔀 Merge pull request #188
update doc
2021-02-02 22:01:49 +08:00
Ju4tCode
bd5fb46e0a 🔥 Delete yarn.lock 2021-02-02 21:56:12 +08:00
Ju4tCode
cc3ed735f1 📝 update doc 2021-02-02 21:55:18 +08:00
StarHeartHunt
3f0c3f1f37 🔧 revert e1ff0a7 and add yarn.lock 2021-02-02 20:00:49 +08:00
StarHeartHunt
e1ff0a7221 🔧 ignore yarn.lock 2021-02-02 19:45:17 +08:00
StarHeartHunt
2bf8b4d313 📝 docs grammar 2021-02-02 19:45:17 +08:00
StarHeartHunt
188aa8a50a 🎨 lint 2021-02-02 19:45:17 +08:00
StarHeart
1538d2094a 📝 Update runtime-hook.md 2021-02-02 19:44:52 +08:00
StarHeart
16eb74e88b 📝 Update scheduler.md 2021-02-02 18:32:08 +08:00
Ju4tCode
3460d445b8 🔀 Merge pull request #187
Pre Release 2.0.0a9
2021-02-02 15:00:48 +08:00
yanyongyu
461b65700f 📝 archive doc 2021-02-02 14:36:51 +08:00
yanyongyu
e809c7c500 📝 update readme 2021-02-02 13:17:29 +08:00
yanyongyu
8e0572d5d3 📝 update changelog 2021-02-02 13:13:27 +08:00
yanyongyu
7555051df6 🔖 Pre Release 2.0.0a9 2021-02-02 13:09:20 +08:00
yanyongyu
d913be5c0d 🐛 fix matcher 2021-02-02 12:48:16 +08:00
yanyongyu
98b67ad829 📝 update docstring 2021-02-02 12:39:23 +08:00
Ju4tCode
0d8e51ff3f 🔀 Merge pull request #186
New shell like command support
2021-02-02 12:20:53 +08:00
AkiraXie
223b9bc887 📝 update api docs 2021-02-02 04:16:37 +00:00
yanyongyu
a54fd2f235 💡 update docstring 2021-02-02 12:15:20 +08:00
AkiraXie
88bbb57c66 📝 update api docs 2021-02-02 04:06:57 +00:00
Ju4tCode
c9a8e7ff0d Merge branch 'dev' into master 2021-02-02 12:04:01 +08:00
yanyongyu
9e4e9f29d1 rewrite shell command 2021-02-02 11:59:14 +08:00
AkiraXie
c8ebaf38b6 📝 update api docs 2021-02-01 17:22:53 +00:00
AkiraXie
f8fb36a1f7 Support shell-like command 2021-02-02 01:20:36 +08:00
Ju4tCode
bbeeb11502 🔀 Merge pull request #179
New mah adapter
2021-02-01 21:16:20 +08:00
yanyongyu
27c6457c20 📝 update README 2021-02-01 21:11:41 +08:00
nonebot
02a780f3b0 📝 update api docs 2021-02-01 13:00:25 +00:00
yanyongyu
00858416f9 🎨 format code and bump dependency 2021-02-01 20:58:12 +08:00
nonebot
9b79c83c3d 📝 update api docs 2021-02-01 11:30:11 +00:00
Mix
d6ae1ca01c 📄 add agpl v3 license for mirai adapter 2021-02-01 19:28:56 +08:00
Mix
f446411f08 📝 add start guide for mirai adapter 2021-02-01 18:37:30 +08:00
Mix
ad3a08f514 💡 🗑️ remove some invalid comments in mirai adapter 2021-02-01 16:53:06 +08:00
nonebot
f2ab618083 📝 update api docs 2021-02-01 08:39:38 +00:00
Mix
da1218221c add specified test for mirai adapter 2021-02-01 16:38:15 +08:00
Mix
c0fa137fed 🚸 add support of rule to_me in mirai adapter 2021-02-01 16:38:15 +08:00
Mix
5a63827f22 💬 💡 rename MiraiBot to Bot, fix a comment style 2021-02-01 16:38:15 +08:00
Mix
a739e71df6 📝 update scheduler.md @StarHeartHunt (#184) 2021-02-01 14:05:55 +08:00
nonebot
6c0b20e5b7 📝 update api docs 2021-02-01 05:51:45 +00:00
Mix
d2a62ebd3d 📝 💡 fix some typo and style in mirai adapter 2021-02-01 13:50:25 +08:00
StarHeart
b67d2ebce6 Update scheduler.md 2021-02-01 13:45:31 +08:00
nonebot
6a273a8eea 📝 update api docs 2021-02-01 05:21:33 +00:00
Mix
35d34a787b 📝 update document building struct to fit changes in mirai adapter 2021-02-01 13:20:09 +08:00
Mix
8fe562e864 💡 🚸 complete comments and optimize usage in mirai adapter 2021-02-01 13:19:37 +08:00
Ju4tCode
34c2ba8faa 🔀 Merge pull request #183
Fix rule override state
2021-02-01 11:52:48 +08:00
nonebot
616e07cd2d 📝 update api docs 2021-02-01 03:49:26 +00:00
yanyongyu
f6c24ec92f 🐛 change matcher check-run 2021-02-01 11:42:05 +08:00
Ju4tCode
68945d2f20 Merge pull request #182 from nonebot/plugin/issue181
Plugin: 风格化字符串管理
2021-02-01 11:03:34 +08:00
jks15satoshi
977c10524e 🍻 publish 风格化字符串管理 2021-01-31 18:31:29 +00:00
nonebot
923cbd3b8c 📝 update api docs 2021-01-31 17:05:56 +00:00
Mix
56592fc413 🚧 💡 add comments for message etc. in mirai adapter 2021-02-01 01:04:41 +08:00
nonebot
7fdfd89525 📝 update api docs 2021-01-31 16:02:54 +00:00
Mix
7c9cbe7b58 💬 💡 rename some dataclass, add comments for events in mirai adapter 2021-02-01 00:01:31 +08:00
nonebot
ceeb37f8ec 📝 update api docs 2021-01-31 14:45:07 +00:00
Mix
858639bebe 💡 📝 add some comments in code, add document build struct for mirai adapter 2021-01-31 22:43:43 +08:00
Mix
a39785d6d9 💡 add some comments in mirai adapter 2021-01-31 18:00:40 +08:00
nonebot
7b04854b43 📝 update api docs 2021-01-31 18:00:40 +08:00
Mix
20b299c758 🚸 add .approve and .reject method for request event in mirai adapter 2021-01-31 17:01:04 +08:00
Mix
3f56da9245 🚧 add support of reverse post and forward ws for mirai adapter 2021-01-31 16:03:15 +08:00
Ju4tCode
0428b1dd81 Merge pull request #178 from nonebot/plugin/issue177
Plugin: songpicker2
2021-01-31 13:10:07 +08:00
maxesisn
95aad49fb4 🍻 publish songpicker2 2021-01-31 05:07:38 +00:00
Mix
73be9151b0 🚸 add factory classmethods in MessageSegment at mirai adapter 2021-01-30 21:51:51 +08:00
Mix
95f27824ee 🚧 add api methods define 2021-01-30 20:40:00 +08:00
Mix
c82ceefc8b revert call method to http post, add api handle 2021-01-30 19:11:17 +08:00
Ju4tCode
ea615946f6 Merge pull request #175 from nonebot/plugin/issue174
Plugin: 消息交互式 python 解释器
2021-01-30 18:40:23 +08:00
iyume
84504c9daf 🍻 publish 消息交互式 python 解释器 2021-01-30 10:37:12 +00:00
Ju4tCode
6137c1f341 Merge pull request #173 from nonebot/plugin/issue172
Plugin: mqtt接入
2021-01-30 13:46:04 +08:00
Mix
5b3ef53301 🎨 add support for on_bot_* event handler 2021-01-30 13:45:55 +08:00
Mix
8b3eb4e076 add retry for mirai adapter when websocket connection down 2021-01-30 13:36:31 +08:00
synodriver
9cbe182ff4 🍻 publish mqtt接入 2021-01-30 05:31:40 +00:00
yanyongyu
b140ebd149 🐛 fix wrong data in CQ:share #170 2021-01-30 10:56:58 +08:00
Mix
e2f837055e add dependency of websockets 2021-01-30 10:55:06 +08:00
Mix
5de41a18f9 🎨 sort imports in file 2021-01-30 06:10:04 +08:00
Mix
02af1c1227 🚧 finish forward websocket receive 2021-01-30 05:58:30 +08:00
Mix
0bb0d16d93 🚧 basically completed event serialize 2021-01-29 21:19:13 +08:00
Mix
5a9798121c 🚧 add some support for mirai basic events 2021-01-29 17:38:39 +08:00
Mix
8574b2ec72 🚧 start working on mirai-api-http adapter 2021-01-29 17:37:44 +08:00
Artin
5f6a2fffc5 📝 update ding-guide 2021-01-29 14:41:04 +08:00
Artin
27e06dd4e8 🐛 fix ding adapter
1. fix send `at_sender`
2. fix event parse error
3. `MessageSegment` add `atDingtalkIds`/`code`
2021-01-29 14:31:36 +08:00
Artin
06837d4a56 📝 add ding-guide 2021-01-29 14:29:29 +08:00
Ju4tCode
62cb63aa1d Merge pull request #168 from nonebot/plugin/issue167
Plugin: 冷却事件
2021-01-28 11:09:46 +08:00
jks15satoshi
d43dcdf03f 🍻 publish 冷却事件 2021-01-27 15:56:14 +00:00
yanyongyu
a6fcc1ea2a 📝 add group link to doc 2021-01-27 12:08:22 +08:00
Ju4tCode
3047214676 🔀 Merge pull request #166
New: common config loading from .env
2021-01-27 11:54:27 +08:00
nonebot
115132a188 📝 update api docs 2021-01-27 03:46:47 +00:00
yanyongyu
5e3f1b5435 new common config loading from .env 2021-01-27 11:39:34 +08:00
yanyongyu
2e75671d56 ⚗️ add processor to ensure single matcher 2021-01-26 15:03:37 +08:00
yanyongyu
f8304406c5 ⚗️ add new builtin plugin 2021-01-25 18:15:25 +08:00
Ju4tCode
e8d892ebc8 Merge pull request #164 from nonebot/plugin/issue161
Plugin: nonebot-plugin-wordbank
2021-01-25 13:49:08 +08:00
Joenothing-lst
9f37fb23d6 🍻 publish nonebot-plugin-wordbank 2021-01-25 05:45:55 +00:00
yanyongyu
853b797cd9 🐛 change USER perm and temp matcher type 2021-01-24 18:16:18 +08:00
yanyongyu
eb330c3260 🐛 fix plugin store pagination error 2021-01-24 14:36:11 +08:00
yanyongyu
109125b583 🐛 remove args in creating bot 2021-01-21 12:41:52 +08:00
Ju4tCode
c06e9bd432 🔀 Merge pull request #160
Plugin: 模拟抽卡
2021-01-21 11:18:06 +08:00
Ju4tCode
30132e21e8 🔀 Merge pull request #158
fix doc typo
2021-01-21 11:17:51 +08:00
yanyongyu
fbf2eb638e ✏️ fix typo 2021-01-21 11:14:35 +08:00
abrahum
a729b8fa3c 🍻 publish 模拟抽卡 2021-01-21 03:09:57 +00:00
StarHeartHunt
de0bca5c51 📝 update api docs 2021-01-20 23:42:48 +00:00
StarHeart
a028766cf8 Update creating-a-matcher.md 2021-01-21 07:41:12 +08:00
yanyongyu
8973e66ec5 👷 update ci add cache 2021-01-18 14:43:06 +08:00
yanyongyu
b0a71b461f missing aiofiles dependency for docs plugin 2021-01-18 14:38:08 +08:00
yanyongyu
9685a4b1bf ⚗️ seperate configs 2021-01-17 13:46:29 +08:00
yanyongyu
7c3b2b514a add request event approve reject 2021-01-16 11:47:48 +08:00
yanyongyu
fcac6f8a0f improve session id support 2021-01-16 11:10:54 +08:00
Ju4tCode
27189ebfbe 🔀 Merge pull request #149
add fastapi driver configs
2021-01-12 18:07:17 +08:00
yanyongyu
a1d801ba14 ⚗️ new fastapi config settings 2021-01-12 18:02:05 +08:00
yanyongyu
9d047daef5 🚧 move cqhttp config into adapter 2021-01-12 17:55:27 +08:00
yanyongyu
719858168e 📝 update change log 2021-01-12 17:27:23 +08:00
yanyongyu
01fa2ece6e 🐛 fix wrong space strip 2021-01-12 15:48:31 +08:00
yanyongyu
e7993a4485 🐛 fix plain text escaped 2021-01-08 18:14:18 +08:00
yanyongyu
b6bf477551 ⚗️ add got receive overload #142 2021-01-06 18:29:41 +08:00
Ju4tCode
a211f09a99 🔀 Merge pull request #143
fix config typo
2021-01-05 23:11:35 +08:00
theprimone
fe3122adbd 📝 update api docs 2021-01-05 15:08:58 +00:00
yanyongyu
0c517acee2 ✏️ fix config typo 2021-01-05 23:06:36 +08:00
theprimone
9d31fcce2e 📝 update api docs 2021-01-05 14:51:38 +00:00
云生
5abac36647 Fix typo 2021-01-05 22:48:59 +08:00
yanyongyu
60fd092410 🐛 fix none message 2021-01-05 12:12:41 +08:00
Artin
877fa1a75a 🐛 Fix cqhttp Message null parameter 2021-01-04 22:24:43 +08:00
yanyongyu
2218fa2b33 🐛 fix missing return after close ws 2021-01-04 18:09:42 +08:00
Ju4tCode
6b26cecd17 🔀 Merge pull request #140
fix empty array process error
2021-01-04 13:32:16 +08:00
yanyongyu
bc5391d711 🐛 ensure message is not empty 2021-01-04 13:27:49 +08:00
Ju4tCode
3ea2c27e17 🔀 Merge pull request #138
PreRelease 2.0.0a8.post2
2021-01-02 04:10:10 -06:00
yanyongyu
17960b2868 🔖 PreRelease 2.0.0a8.post2 2021-01-02 18:04:44 +08:00
Ju4tCode
22416bf512 🔀 Merge pull request #137 2021-01-02 01:10:43 -06:00
yanyongyu
a4cb7f13be 🐛 fix error guess when reply to event #136 2021-01-02 14:42:13 +08:00
Ju4tCode
822709ceeb 🔀 Merge pull request #135
fix incorrect removing temp matcher
2021-01-01 21:02:18 -06:00
yanyongyu
4dffc879d9 🐛 fix incorrect remove temp matcher 2021-01-02 10:57:55 +08:00
Ju4tCode
f036057b2b 🔀 Merge pull request #133
Pre Release 2.0.0a8.post1
2021-01-01 09:55:13 -06:00
yanyongyu
38ab392b91 🚑 Fix Release 2.0.0a8.post1 2021-01-01 23:47:51 +08:00
Ju4tCode
a45d88ef29 🔀 Merge pull request #132
Fix doc typo
2021-01-01 09:32:06 -06:00
Lan
996c57df62 📝 Update creating-a-handler.md 2021-01-01 19:23:51 +08:00
Lan
8f69b2449d 📝 Update creating-a-matcher.md 2021-01-01 19:21:46 +08:00
Lan
db7e10cb4d ✏️ Fix typo 2021-01-01 18:21:02 +08:00
yanyongyu
b446fcc929 🐛 fix action failed info display error 2021-01-01 18:18:01 +08:00
yanyongyu
5cc5375cb5 🐛 fix missing group_id when PokeNotifyEvent 2021-01-01 18:01:05 +08:00
Ju4tCode
ebf3766cfb 🔀 Merge pull request #131
Fix GroupMessageEvent parse error
2021-01-01 15:25:45 +08:00
Mix
fbaf19e454 :critical: fix group event serialization error 2021-01-01 15:16:55 +08:00
Ju4tCode
a966f82192 🔀 Merge pull request #128
PreRelease 2.0.0a8
2020-12-31 20:19:07 +08:00
yanyongyu
210496f760 📝 update changelog 2020-12-31 20:10:26 +08:00
yanyongyu
13adfa5b55 📝 update doc 2020-12-31 19:56:27 +08:00
yanyongyu
d7e4b52d10 📌 bump version 2.0.0a8 2020-12-31 18:07:38 +08:00
yanyongyu
53c8028646 ⬆️ update dependency 2020-12-31 18:05:49 +08:00
yanyongyu
49201f5346 📝 update doc 2020-12-31 17:58:09 +08:00
yanyongyu
938b5bf275 🐛 fix message construct typing and plugins loading 2020-12-31 14:00:59 +08:00
Ju4tCode
a98417a878 🔀 Merge pull request #127
Update ding adapter
2020-12-30 20:29:18 +08:00
Ju4tCode
1bd223eab2 Restore test_permission.py 2020-12-30 20:19:24 +08:00
yanyongyu
55f1bd1f2d ✏️ update code style 2020-12-30 20:08:22 +08:00
nonebot
380977bc67 📝 update api docs 2020-12-30 10:35:51 +00:00
Artin
086a998b20 improve ding adapter
add tests/test_ding.py
add some log
2020-12-30 18:33:54 +08:00
yanyongyu
d4f344d247 improve command 2020-12-30 12:42:10 +08:00
nonebot
3cb2b44130 📝 update api docs 2020-12-29 16:38:15 +00:00
yanyongyu
c8cd6de2f2 improve ding adapter 2020-12-30 00:36:29 +08:00
nonebot
0221d02ca7 📝 update api docs 2020-12-29 06:51:55 +00:00
Artin
a5947922b6 Update nonebot/adapters/__init__.py
Co-authored-by: Ju4tCode <42488585+yanyongyu@users.noreply.github.com>
2020-12-29 14:50:24 +08:00
Artin
13f6a692a7 Update nonebot/adapters/__init__.py
Co-authored-by: Ju4tCode <42488585+yanyongyu@users.noreply.github.com>
2020-12-29 14:50:15 +08:00
Artin
f13befc4d8 Update nonebot/adapters/__init__.py
Co-authored-by: Ju4tCode <42488585+yanyongyu@users.noreply.github.com>
2020-12-29 14:50:07 +08:00
nonebot
f4ba97ebab 📝 update api docs 2020-12-29 04:20:09 +00:00
Artin
1bdbbca12f Update ding adapter event logic 2020-12-29 12:12:35 +08:00
Ju4tCode
5028f6408a 🔀 Merge pull request #125
typo fixed
2020-12-29 02:10:27 +08:00
jinser
f53cf80221 Update creating-a-plugin.md 2020-12-29 02:02:23 +08:00
Ju4tCode
e052692a57 🔀 Merge pull request #124
Add scheduler doc
2020-12-28 17:42:12 +08:00
yanyongyu
ab61be26a9 improve radd support for messagesegment 2020-12-28 17:39:33 +08:00
yanyongyu
e02b5f1de8 📝 update scheduler doc 2020-12-28 16:53:53 +08:00
Ju4tCode
de5ca44d6b fix warning block syntax 2020-12-28 15:57:43 +08:00
Lan
9de421b2d2 Revert changes 2020-12-28 15:51:46 +08:00
Lan
82abd2e6ce 📝 Update scheduler.md 2020-12-28 15:43:03 +08:00
Lan
13fb2de964 ✏️ Fix typo 2020-12-28 15:23:18 +08:00
Lan
53de7eab96 📝 Add scheduler.md 2020-12-28 15:18:16 +08:00
Ju4tCode
e14d3d8d73 🔀 Merge pull request #123
New: WebSocket Connection Hook
2020-12-28 14:12:04 +08:00
nonebot
c23a777a9f 📝 update api docs 2020-12-28 06:01:32 +00:00
yanyongyu
1c9df5ac02 🎨 change method into private 2020-12-28 13:59:54 +08:00
nonebot
0c43d83494 📝 update api docs 2020-12-28 05:57:28 +00:00
yanyongyu
299c259d50 🐛 fix hook block event receiving bug 2020-12-28 13:53:24 +08:00
yanyongyu
c993f15bca ⚗️ add ws connection hook 2020-12-28 13:36:00 +08:00
yanyongyu
2d63eb32e1 🚑 hotfix due to cq security problem 2020-12-28 00:24:18 +08:00
yanyongyu
2ae76ff78b ⚗️ new stop propagation method 2020-12-24 22:19:08 +08:00
yanyongyu
41663e1b08 🚧 update cqcode 2020-12-23 17:12:53 +08:00
yanyongyu
c3df90c541 📝 update changelog 2020-12-22 20:14:52 +08:00
yanyongyu
ab256e57b1 🐛 fix missing escape in builtin plugin #117 2020-12-22 20:12:00 +08:00
yanyongyu
054df580eb 📝 update docs 2020-12-22 09:59:48 +08:00
yanyongyu
5fecb5f506 📝 update readme badge 2020-12-22 00:41:33 +08:00
yanyongyu
44a15d684b ✏️ fix typo 2020-12-21 19:32:58 +08:00
yanyongyu
f3243f8989 📝 update changelog 2020-12-21 16:23:29 +08:00
yanyongyu
bc459b5ff4 🐛 fix non text cqcode not unescaped 2020-12-21 16:19:02 +08:00
Ju4tCode
338d5e6f17 🔀 Merge pull request #115
Add default state factory support
2020-12-20 12:20:22 +08:00
nonebot
340e8c3760 📝 update api docs 2020-12-20 04:15:01 +00:00
yanyongyu
e44cde0600 add test case 2020-12-20 12:09:30 +08:00
yanyongyu
1b00fe7921 add state factory support #113 2020-12-20 11:59:51 +08:00
yanyongyu
168cc3801a 📝 build api doc 2020-12-19 15:31:14 +08:00
yanyongyu
4ec4adf003 💡 add adapter docstring 2020-12-19 15:30:34 +08:00
yanyongyu
a88a2f4a4f 🔊 revert log string 2020-12-19 14:16:47 +08:00
yanyongyu
a539fd0062 🔊 improve adapter not found log 2020-12-19 11:20:41 +08:00
yanyongyu
83addf045f improve actionfailed info 2020-12-19 00:50:17 +08:00
yanyongyu
00305a8436 🎨 change event log 2020-12-19 00:26:24 +08:00
yanyongyu
799144e64d finish typing change 2020-12-17 21:09:30 +08:00
yanyongyu
6bd69e6708 🐛 fix typing 2020-12-17 01:52:16 +08:00
yanyongyu
784bc7b0cf ⚗️ new dynamic handler args 2020-12-16 23:13:00 +08:00
yanyongyu
ca8f764b8b 📝 update changelog 2020-12-16 13:36:40 +08:00
yanyongyu
a63a5fea3c 🐛 fix invalid cq code catched 2020-12-16 13:35:34 +08:00
Ju4tCode
a068040cbf Merge pull request #112 from nonebot/plugin/issue111
Plugin: translator
2020-12-15 13:55:03 +08:00
Lancercmd
f5d3ae9efb 🍻 publish translator 2020-12-15 05:43:04 +00:00
yanyongyu
e4377faa67 💄 update docs 2020-12-13 12:53:33 +08:00
yanyongyu
12ef3e7bf1 🚧 update cqhttp adapter event 2020-12-13 12:53:16 +08:00
yanyongyu
3d4adaa444 ⚗️ auto import plugin when require 2020-12-13 12:19:01 +08:00
yanyongyu
7d2a87b73e 🐛 fix plugin publish link 2020-12-12 17:20:37 +08:00
yanyongyu
6c08982ca7 🚧 update process 2020-12-11 16:29:12 +08:00
yanyongyu
f4cea065d8 ✏️ fix validator 2020-12-10 21:33:51 +08:00
Ju4tCode
b651f89865 🔀 Merge pull request #108
Plugin: 通用数据库连接
2020-12-10 17:14:46 +08:00
synodriver
ae73facd89 🍻 publish 通用数据库连接 2020-12-10 08:38:28 +00:00
yanyongyu
72653c6116 🚧 update messages 2020-12-10 02:13:25 +08:00
yanyongyu
a57cd396fa 🚧 update cqhttp event parse 2020-12-10 00:39:43 +08:00
yanyongyu
783efeaf0e 🚧 add event parser 2020-12-09 19:57:49 +08:00
yanyongyu
2c97902f4e 🚧 update cqhttp bot 2020-12-09 17:51:24 +08:00
yanyongyu
2bc05b2576 🚧 update event models 2020-12-09 14:39:25 +08:00
yanyongyu
73bda494d9 🏗️ update cqhttp models 2020-12-09 13:20:14 +08:00
Ju4tCode
e7b44710cc Merge pull request #106
Plugin: 图片搜索
2020-12-09 11:56:01 +08:00
synodriver
2d76209c8a 🍻 publish 图片搜索 2020-12-09 03:52:26 +00:00
yanyongyu
ddf044d6d3 🏗️ add model for cqhttp 2020-12-09 11:13:37 +08:00
yanyongyu
f220a01a30 📝 update doc 2020-12-07 22:15:26 +08:00
Artin
8443c01303 📝 update docs 2020-12-07 21:02:08 +08:00
yanyongyu
f8d0b691ec 📝 update docs typing 2020-12-07 14:09:43 +08:00
yanyongyu
e0d44f3fa7 📝 update api docs 2020-12-07 00:52:26 +08:00
yanyongyu
a420af75fc 🐛 fix type checking for bot 2020-12-07 00:31:14 +08:00
yanyongyu
6b3f6a46e6 🎨 impove typing 2020-12-07 00:06:09 +08:00
yanyongyu
629eed08b6 🎨 update typing support 2020-12-06 02:30:19 +08:00
Ju4tCode
9ab7176eaf 🔀 Merge pull request #104
Fix typing
2020-12-05 20:44:11 +08:00
yanyongyu
3345142db2 🔥 remove useless noreturn 2020-12-05 20:32:38 +08:00
Mix
b1ab5d91a4 🐛 Fix some wrong type hint 2020-12-05 17:19:23 +08:00
yanyongyu
3ba59da0ab 📌 update lock file 2020-12-05 15:58:37 +08:00
Ju4tCode
308acff19a 🔀 Merge pull request #103 2020-12-05 13:33:07 +08:00
Mix
de64e38a07 📝 Optimize expression in installation.md 2020-12-05 13:06:27 +08:00
Ju4tCode
4a22a50f19 🔀 Merge pull request #102
Plugin: 定时任务
2020-12-05 02:05:54 +08:00
yanyongyu
997114477c 🍻 publish 定时任务 2020-12-04 18:00:08 +00:00
Ju4tCode
700407ba98 🔀 Merge pull request #100
Plugin: 前端测试机器人插件
2020-12-05 01:59:44 +08:00
yanyongyu
d42d975d9e 🍻 publish 前端测试机器人插件 2020-12-04 17:56:08 +00:00
Ju4tCode
b6bbc7d228 🔀 Merge pull request #98
PreRelease 2.0.0a7
2020-12-05 01:46:47 +08:00
yanyongyu
621f93f75a 📝 update nonebot docstring 2020-12-05 01:43:58 +08:00
yanyongyu
5ebe7ff1cb 🔖 PreRelease 2.0.0a7 2020-12-05 01:22:28 +08:00
yanyongyu
d7a4593fcf 📝 update changelog 2020-12-04 02:11:20 +08:00
Ju4tCode
dc70f9a9cd 🔀 Merge pull request #97
Add MatcherGroup
2020-12-04 02:00:59 +08:00
yanyongyu
f6806c1d55 test matchergroup 2020-12-04 01:55:03 +08:00
yanyongyu
5b42454a55 add matcher group for plugin #90 2020-12-04 01:41:23 +08:00
Ju4tCode
b24649b6af 🔀 Merge pull request #94
Add dingding adapter
2020-12-03 19:33:58 +08:00
Ju4tCode
0838cdfbe7 🎨 improve format 2020-12-03 19:24:55 +08:00
Ju4tCode
71c5cdc445 revert plain text 2020-12-03 19:12:46 +08:00
Artin
be244f4538 🐛 Fix Message._construct error 2020-12-03 18:47:58 +08:00
yanyongyu
afd01796aa 🚧 update ding adapter 2020-12-03 17:08:16 +08:00
yanyongyu
dc691889e3 🎨 improve cqhttp 2020-12-03 16:04:14 +08:00
nonebot
4b764ccba3 📝 update api docs 2020-12-03 07:09:09 +00:00
yanyongyu
9658e446e5 🏗️ change exception structure 2020-12-03 15:07:03 +08:00
nonebot
8f89e0f26e 📝 update api docs 2020-12-03 05:23:47 +00:00
yanyongyu
7116532081 🚧 add exception 2020-12-03 13:22:12 +08:00
yanyongyu
b47bef3ef6 ✏️ fix builtin typo #96 2020-12-03 13:02:34 +08:00
Artin
3638da7f2d 🐛 Fix ding adapter exception 2020-12-03 12:22:45 +08:00
nonebot
da62e012c2 📝 update api docs 2020-12-03 04:09:54 +00:00
Artin
e718f25c3f 🏷️ 完善 typing 及注释 2020-12-03 12:08:09 +08:00
nonebot
f1a0ac099b 📝 update api docs 2020-12-02 17:49:14 +00:00
Artin
8c5c02f040 🏷️ Update BaseEvent typing 2020-12-03 01:46:55 +08:00
nonebot
33bd9d0fb8 📝 update api docs 2020-12-02 17:04:45 +00:00
Artin
edb4458031 Add ding adapter 2020-12-03 01:02:09 +08:00
Artin
f332199baa ♻️ Encapsulation MessageSegment
close: #93
2020-12-03 00:57:02 +08:00
Artin
8cda1b5417 ♻️ Split adapter by category 2020-12-03 00:56:25 +08:00
yanyongyu
45ceba47f3 👌 update changelog 2020-12-02 16:16:19 +08:00
yanyongyu
8a9a77656f 🍻 add funding 2020-12-02 16:11:46 +08:00
yanyongyu
064ed81758 📝 update adapter connection guide 2020-12-02 15:14:24 +08:00
Ju4tCode
0d5930fc3a 🔀 Merge pull request #92
Refactor: 更新内置 register_adapter 逻辑
2020-12-02 13:45:07 +08:00
yanyongyu
8601c61cd8 💄 update log style 2020-12-02 13:25:57 +08:00
yanyongyu
0738b275a5 💥 remove builtin adapter auto register 2020-12-02 13:17:27 +08:00
yanyongyu
6a25e42571 ⬆️ update lock file 2020-12-02 12:52:02 +08:00
yanyongyu
81d96888bd 📝 update plugin info 2020-12-01 19:10:05 +08:00
yanyongyu
c9d7b63f23 📝 update plugin installation guide 2020-12-01 18:53:03 +08:00
yanyongyu
4c179d9910 📝 update star guide 2020-12-01 17:08:15 +08:00
yanyongyu
a085b47eac 📝 update guide docs 2020-12-01 12:24:14 +08:00
yanyongyu
ad994f04fc 💬 update cqhttp links 2020-12-01 11:03:08 +08:00
yanyongyu
301e9093bd 📄 update license 2020-12-01 10:57:00 +08:00
yanyongyu
39a2658a25 👷 update release drafter 2020-12-01 10:48:46 +08:00
yanyongyu
d624f13f96 💥 remove nonebot test auto init 2020-12-01 10:44:58 +08:00
yanyongyu
6ac04d6507 remove extra dependency 2020-12-01 10:42:59 +08:00
yanyongyu
cc7ebe2f73 ⬆️ bump dependency version 2020-12-01 10:40:21 +08:00
Ju4tCode
bdb4d584e4 🔀 Merge pull request #91
Breaking change: remove built-in scheduler support
2020-12-01 10:33:20 +08:00
yanyongyu
38d502f7f5 💥 remove built-in scheduler support 2020-12-01 10:28:03 +08:00
yanyongyu
e931b535f1 📝 update readme 2020-12-01 00:56:19 +08:00
yanyongyu
0775a232ce ✏️ fix docstring typo 2020-11-30 12:43:44 +08:00
yanyongyu
e5463cc564 🎨 format docstring 2020-11-30 11:08:00 +08:00
Ju4tCode
5554c6e62d 🔀 Merge pull request #88
Plugin: 合并nonebot-plugin-docs
2020-11-28 12:24:14 +08:00
Ju4tCode
96cdb9c23e 🔀 Merge pull request #87
Plugin: 合并docs插件至官方仓库
2020-11-28 12:06:32 +08:00
yanyongyu
b75343d3e7 📝 update homepage and repo link 2020-11-28 11:59:26 +08:00
yanyongyu
62b93c1ba7 🔥 remove file header 2020-11-28 11:55:12 +08:00
yanyongyu
146134a1a7 🔖 update nonebot-plugin-docs author 2020-11-28 11:44:34 +08:00
yanyongyu
da5d63ae29 🔥 remove useless pull and lock file 2020-11-28 11:43:13 +08:00
pull[bot]
9cfcbc5b32 Merge pull request #18 from nonebot/master
[pull] master from nonebot:master
2020-11-26 19:34:04 +00:00
yanyongyu
ee80a4ea60 👷 update user info for pr 2020-11-26 23:54:24 +08:00
yanyongyu
dc0c634eab 🐛 fix workflow vulnerability #79 2020-11-26 23:54:24 +08:00
yanyongyu
168f366efc 📝 update guide 2020-11-26 23:54:24 +08:00
yanyongyu
39d96d9667 📝 add plugin publish guide 2020-11-26 23:54:24 +08:00
yanyongyu
47d1fab4bd 📝 add cross plugin guide 2020-11-26 23:54:24 +08:00
Ju4tCode
84756f3092 🔀Merge pull request #83
👷 update user info for pr
2020-11-26 21:05:16 +08:00
yanyongyu
309c6d1ed0 👷 update user info for pr 2020-11-26 20:53:28 +08:00
Ju4tCode
2bf63ce8aa 🔀 Merge pull request #81 2020-11-26 20:30:03 +08:00
Ju4tCode
b2902407d7 🔀 Merge pull request #80
Fix: GHSL-2020-244
2020-11-26 20:23:32 +08:00
yanyongyu
1fe38afa95 🐛 fix workflow vulnerability #79 2020-11-26 20:18:36 +08:00
pull[bot]
0200167ce2 Merge pull request #16 from nonebot/master
[pull] master from nonebot:master
2020-11-23 17:42:02 +00:00
yanyongyu
0dddbedd70 🍻 publish Sentry日志监控 2020-11-24 01:39:46 +08:00
Ju4tCode
458728ffdd Merge branch 'master' into master 2020-11-24 01:39:17 +08:00
Ju4tCode
df71a1e6ee 🔀 Merge pull request #77
Plugin: Sentry日志监控
2020-11-23 21:46:50 +08:00
yanyongyu
7e35f591d7 🍻 publish Sentry日志监控 2020-11-23 13:35:26 +00:00
yanyongyu
b7642394f4 📝 update guide 2020-11-23 14:15:30 +08:00
yanyongyu
bdd7e9514a 📝 add plugin publish guide 2020-11-23 13:46:36 +08:00
yanyongyu
f214c0b2cb 📝 add cross plugin guide 2020-11-23 13:41:57 +08:00
yanyongyu
5ff638f9e7 🔀 Merge branch 'origin/master' 2020-11-22 21:12:57 +08:00
yanyongyu
e92cbf2f50 🐛 bump version due to vuepress base error 2020-11-22 21:12:07 +08:00
yanyongyu
9d30f2dff3 👷 update release drafter 2020-11-22 09:18:27 +00:00
nonebot
f01295d936 🍻 publish NoneBot离线文档 2020-11-22 09:18:27 +00:00
yanyongyu
343a345ed2 👷 update release drafter 2020-11-22 16:40:06 +08:00
Ju4tCode
2965867516 🔀 Merge pull request #75
Plugin NoneBot离线文档
2020-11-22 16:31:29 +08:00
nonebot
68887086a6 🍻 publish NoneBot离线文档 2020-11-22 08:25:25 +00:00
pull[bot]
47b015a2d0 Merge pull request #5 from nonebot/master
[pull] master from nonebot:master
2020-11-21 21:18:25 +00:00
yanyongyu
1affeb8e20 🔖 release 2.0.0a6 2020-11-22 03:05:28 +08:00
yanyongyu
b5b8ff165c 👷 add release ci 2020-11-22 02:42:27 +08:00
yanyongyu
389211f740 🐛 fix error arg 2020-11-22 02:17:13 +08:00
yanyongyu
68ed443fa3 👽 update vuepress base 2020-11-21 18:00:59 +00:00
yanyongyu
9a819fc12c 💡 update docstring 2020-11-21 18:00:59 +00:00
yanyongyu
2b10f81326 ⚗️ add export require option 2020-11-21 18:00:59 +00:00
yanyongyu
689180ebe8 📝 update change log 2020-11-21 18:00:59 +00:00
yanyongyu
1aba139136 get plugin func 2020-11-21 18:00:59 +00:00
yanyongyu
e5213eb95a 🚑 fix not delete empty text 2020-11-21 18:00:59 +00:00
yanyongyu
5fb9799807 ✏️ fix typo 2020-11-21 18:00:59 +00:00
yanyongyu
9241f4df79 🐛 fix remain space after reply 2020-11-21 18:00:59 +00:00
yanyongyu
d55459cfcd 🚑 fix matcher check 2020-11-21 18:00:59 +00:00
yanyongyu
17747f94c8 🐛 fix #69 stop running expired matcher 2020-11-21 18:00:59 +00:00
yanyongyu
829f47c5e7 🐛 fix #66 resolve reply message 2020-11-21 18:00:59 +00:00
Muchan
557054cb8b feat(message): 传递matcher抛出的StopPropagation 2020-11-21 18:00:59 +00:00
yanyongyu
d726b75721 📝 add changelog 2020-11-21 18:00:59 +00:00
yanyongyu
47aede8f67 🐛 fix index error when check to me 2020-11-21 18:00:59 +00:00
synodriver
1557158cd9 修复了at机器人时的bug 2020-11-21 18:00:59 +00:00
Ju4tCode
de07a6594d 🔀 Merge pull request #73 2020-11-22 01:59:11 +08:00
yanyongyu
07b72f87d7 👽 update vuepress base 2020-11-22 01:51:23 +08:00
yanyongyu
8f4961613d 👷 update pull upstream ci 2020-11-22 01:25:13 +08:00
yanyongyu
339e6cd665 📦 add nonebot plugin docs 2020-11-22 01:20:14 +08:00
yanyongyu
1c87c83c45 👷 add pull upstream ci 2020-11-22 01:18:46 +08:00
yanyongyu
d70f622a24 💡 update docstring 2020-11-21 20:50:33 +08:00
yanyongyu
9373bd09ed ⚗️ add export require option 2020-11-21 20:40:09 +08:00
yanyongyu
b36f95862a 📝 update change log 2020-11-21 20:38:03 +08:00
yanyongyu
71fad44d23 get plugin func 2020-11-21 18:33:35 +08:00
Ju4tCode
cfbfeec69b 🔀 Merge pull request #72
👷 update plugin issue bot
2020-11-20 17:11:36 +08:00
hemengyang
318aa98c98 👷 update plugin issue bot 2020-11-20 16:39:52 +08:00
yanyongyu
009cca3c9d 👷 change ci secret 2020-11-20 13:38:28 +08:00
Ju4tCode
f53644ef26 🔀 Merge pull request #71
add plugin publish action
2020-11-20 13:31:44 +08:00
yanyongyu
7b15d0d01f 🚑 fix not delete empty text 2020-11-20 12:53:31 +08:00
yanyongyu
7fdddf4d8f ✏️ fix typo 2020-11-20 01:37:53 +08:00
yanyongyu
a734790bcf 🐛 fix remain space after reply 2020-11-20 01:07:24 +08:00
hemengyang
9e598cfa70 fix: 忘记改 push 的触发分支名 2020-11-20 00:36:07 +08:00
hemengyang
aca37736c4 ci: 添加插件议题机器人 2020-11-20 00:30:46 +08:00
yanyongyu
a5935e77c9 🚑 fix matcher check 2020-11-19 23:18:03 +08:00
Ju4tCode
93ee9a3b58 🔀 Merge pull request #70
Fix: running expired matcher
2020-11-19 22:08:31 +08:00
yanyongyu
0b6a1ca1a4 🐛 fix #69 stop running expired matcher 2020-11-19 22:04:44 +08:00
Ju4tCode
e9127f505a 🔀 Merge pull request #67
dynamic propagation block
2020-11-19 21:36:52 +08:00
Ju4tCode
30b839d736 🔀 Merge pull request #68
Fix: resolve reply message
2020-11-19 21:29:02 +08:00
yanyongyu
49ad65f449 🐛 fix #66 resolve reply message 2020-11-19 21:21:54 +08:00
Muchan
8b3af9fb47 feat(message): 传递matcher抛出的StopPropagation 2020-11-19 20:53:28 +08:00
yanyongyu
0c39b06355 📝 add changelog 2020-11-19 14:54:58 +08:00
Ju4tCode
73ce79472e 🔀 Merge pull request #64
修复了at机器人时的IndexError
2020-11-19 14:46:57 +08:00
yanyongyu
9e1eee166b 🐛 fix index error when check to me 2020-11-19 13:57:49 +08:00
synodriver
03c7b59df5 修复了at机器人时的bug 2020-11-19 13:07:02 +08:00
Ju4tCode
1654dffa4d 🔀 Merge pull request #63
Plugin: rauthman
2020-11-19 13:02:27 +08:00
yanyongyu
26a4daad33 🍻 publish rauthman 2020-11-19 12:58:35 +08:00
yanyongyu
c666366673 ✏️ fix bot send doc #62 2020-11-19 12:53:20 +08:00
synodriver
d5eb110626 Merge pull request #4 from nonebot/dev
Dev
2020-11-19 10:23:40 +08:00
Ju4tCode
04a3712bc7 🔀 Merge pull request #61
hot fix #60
2020-11-18 15:17:47 +08:00
yanyongyu
39f508bbdf 🔖 Pre Release 2.0.0a6 2020-11-18 15:12:48 +08:00
yanyongyu
0a6008ddc0 update changelog 2020-11-18 15:05:03 +08:00
Ju4tCode
9ba1dc614c 🔀 Merge pull request #60 2020-11-18 14:56:42 +08:00
hemengyang
31123b0573 修复阻止事件传递信号无效的问题 2020-11-18 14:43:12 +08:00
yanyongyu
aaa860de33 🚑 fix full extra apscheduler error 2020-11-18 12:02:26 +08:00
Ju4tCode
5efe1907ad 🔀 Merge pull request #58
Plugin Haruka Bot
2020-11-18 11:29:09 +08:00
yanyongyu
d0c19d09a3 🍻 publish Haruka Bot 2020-11-18 11:24:11 +08:00
yanyongyu
e6268f319d 📝 add advanced and changelog 2020-11-18 08:48:23 +08:00
yanyongyu
42e714ee7d 📝 add sub plugin guide 2020-11-17 17:35:53 +08:00
Ju4tCode
4bee48e9e5 🔀 Merge pull request #57
Pre Release 2.0.0a5
2020-11-17 17:01:41 +08:00
yanyongyu
c71c182834 📦 archive version doc 2020-11-17 16:50:37 +08:00
yanyongyu
9fc354af43 🔖 bump version to 2.0.0a5 2020-11-17 16:36:42 +08:00
Ju4tCode
bc8833ce8e 🔀 Merge pull request #54
fix temp matcher delete
2020-11-16 20:05:49 +08:00
nonebot
8524c32b93 📝 update api docs 2020-11-16 11:59:05 +00:00
yanyongyu
872df975f5 ✏️ fix rst typo 2020-11-16 19:57:49 +08:00
nonebot
36c0d995af 📝 update api docs 2020-11-16 11:42:47 +00:00
yanyongyu
1c31453ba0 🔥 remove unused exception 2020-11-16 19:39:51 +08:00
yanyongyu
2e2f3eee04 ✏️ fix config typo 2020-11-16 15:27:20 +08:00
yanyongyu
b3e6d1c803 💡 add message docstring 2020-11-16 15:06:37 +08:00
yanyongyu
829f085340 🐛 fix coding error 2020-11-16 12:35:04 +08:00
yanyongyu
6986232290 🎨 change temp matcher process #50 2020-11-16 11:25:42 +08:00
Ju4tCode
b5ea66359c 🔀 Merge pull request #53
Add __version__
2020-11-15 16:28:17 +08:00
yanyongyu
730cb82eb7 🥚 add __version__ 2020-11-15 16:18:23 +08:00
Ju4tCode
c4f99d8c77 🔀 Merge pull request #52
Plugin: nonebot-plugin-status
2020-11-15 15:30:41 +08:00
yanyongyu
218c8ea398 🍻 publish nonebot-plugin-status 2020-11-15 15:26:57 +08:00
yanyongyu
47869ccad5 👷 fix import typo 2020-11-15 15:20:15 +08:00
yanyongyu
bde256608b ✏️ fix doc typo 2020-11-15 13:26:20 +08:00
yanyongyu
bc00c1be82 💡 add message docstring 2020-11-13 17:15:45 +08:00
yanyongyu
781ec1ef67 🚑 fix index error in cqhttp check to_me 2020-11-13 16:51:14 +08:00
yanyongyu
c79a6df400 ✏️ fix issue template typo 2020-11-13 11:31:24 +08:00
yanyongyu
28e3177e60 💡 update source docstring #46 #49 2020-11-13 01:46:26 +08:00
yanyongyu
5c29abd724 ✏️ fix tip typo 2020-11-12 13:10:41 +08:00
yanyongyu
9803925bbb 📝 finish plugin guide 2020-11-12 09:32:35 +08:00
yanyongyu
47b1affc56 📝 update handler create doc 2020-11-11 16:49:11 +08:00
yanyongyu
b2a2234d5c 🎨 change permission check from driver into adapter #46 2020-11-11 15:14:29 +08:00
Ju4tCode
1f1f9cd7e6 🔀 Merge pull request #48 2020-11-10 17:42:08 +08:00
nonebot
3903b718cb 📝 update api docs 2020-11-10 09:36:13 +00:00
Artin
c3c2c7935d ♻️ add adapters/cqhttp directory 2020-11-10 17:34:02 +08:00
yanyongyu
09a511acf8 📝 add poetry install 2020-11-10 14:44:24 +08:00
yanyongyu
b3f7aaa580 📝 add create handler guide 2020-11-10 14:30:18 +08:00
yanyongyu
286036a936 ✏️ fix module docstring 2020-11-10 14:29:50 +08:00
synodriver
11889b57fe Merge pull request #2 from nonebot/dev
Dev
2020-11-10 01:16:35 +08:00
yanyongyu
9b3dffaab9 ⚗️ add prompt format support 2020-11-09 16:34:14 +08:00
yanyongyu
bb869b5263 📝 update matcher rule docs 2020-11-09 15:09:21 +08:00
yanyongyu
3528d38be1 📝 add create matcher guide 2020-11-09 12:47:59 +08:00
yanyongyu
17ad11212e 👷 add lint script 2020-11-09 12:46:28 +08:00
yanyongyu
50056228b6 📝 update plugin create 2020-11-09 12:33:17 +08:00
yanyongyu
946750a189 📝 add create plugin guide 2020-11-09 11:14:23 +08:00
yanyongyu
7ce69fb6f8 add processor test 2020-11-07 18:15:09 +08:00
Ju4tCode
b87df479a2 🔀 Merge pull request #45
add pre and post processors
2020-11-07 17:56:01 +08:00
nonebot
5458248403 📝 update api docs 2020-11-07 09:52:23 +00:00
yanyongyu
9b4121053c ⬆️ update lock file 2020-11-07 17:51:17 +08:00
yanyongyu
746b608d10 ⚗️ add pre and post processor #40 2020-11-07 17:35:44 +08:00
yanyongyu
9d7da873c4 📝 add plugin load doc 2020-11-07 12:36:47 +08:00
Ju4tCode
70c400da7f 🔀 Merge pull request #43
Pre Release 2.0.0a4
2020-11-04 13:46:05 +08:00
yanyongyu
2a5cfe712f 📝 update doc version 2020-11-04 13:41:52 +08:00
yanyongyu
533a045622 ⬆️ bump version and update dependency 2020-11-04 13:27:49 +08:00
Ju4tCode
93aa1791c9 🔀 Merge pull request #42
Fix: Plugin publish template
2020-11-02 20:25:28 +08:00
yanyongyu
06c76cc096 👷 fix plugin template 2020-11-02 20:20:41 +08:00
Ju4tCode
04df0e5f51 🔀 Merge pull request #41 2020-11-02 19:39:55 +08:00
yanyongyu
f99e029567 📌 update poetry lock file 2020-11-02 19:33:45 +08:00
yanyongyu
71ee9aee21 🚧 update plugin store 2020-11-02 19:07:53 +08:00
yanyongyu
d9ea95c67e 🚑 fix message segment get 2020-11-01 19:20:18 +08:00
yanyongyu
af7f42ac60 📝 update plugin store page 2020-11-01 18:21:31 +08:00
yanyongyu
15e59a1778 👷 update plugin template 2020-11-01 18:21:10 +08:00
yanyongyu
22962d55e1 👷 create plugin issue template 2020-11-01 16:18:57 +08:00
yanyongyu
70c7927006 💡 add docstring for cqhttp message 2020-10-30 16:49:31 +08:00
yanyongyu
89c3aa38a6 🎨 allow multi value for keyword rule 2020-10-30 16:26:04 +08:00
Ju4tCode
2eb330b8a8 🔀 Merge pull request #39 2020-10-30 15:57:31 +08:00
yanyongyu
383c0031a5 📝 update plugin 2020-10-30 01:59:45 +08:00
yanyongyu
06f20281a5 🔇 remove meta event logs #21 2020-10-29 17:06:07 +08:00
yanyongyu
a40f1a453c 📝 replace say with echo due to superuser perm 2020-10-29 16:27:20 +08:00
Ju4tCode
5d9f354209 🔀 Merge pull request #37 2020-10-28 13:49:53 +08:00
Ju4tCode
c3bd8ebf57 🚧 change result store 2020-10-28 13:45:54 +08:00
yanyongyu
c9c615c8cb 👷 try pull request target 2020-10-28 13:42:20 +08:00
Ju4tCode
47f491039c 💡 update regex docstring 2020-10-28 13:23:48 +08:00
yanyongyu
dc5c35a9ed 💡 update command docstrinrg 2020-10-28 13:17:41 +08:00
yanyongyu
c636186321 👷 update api doc action 2020-10-28 13:05:51 +08:00
Ju4tCode
aafc3dd060 🔀 Merge pull request #38 2020-10-28 12:52:27 +08:00
ayayaneru
38469611a4 Update README 2020-10-28 10:01:33 +08:00
rkroom
59a8bd8c97 add matched_string when rule regex
当使用正则匹配消息成功时,向state添加matched_string以保存匹配到的内容供接下来使用。
2020-10-26 17:18:26 +08:00
Ju4tCode
50cfd3c9b5 🔀 Merge pull request #36
Issue35:修改鉴权限制
2020-10-25 14:48:00 +08:00
yanyongyu
5d08d53c27 👽 update auth header 2020-10-25 14:42:46 +08:00
Ju4tCode
4f6f99146c 🔀 Merge pull request #33
修改 Command 实现逻辑
2020-10-22 22:36:23 +08:00
yanyongyu
32388d070d 🎨 improve command implementation 2020-10-22 22:08:19 +08:00
yanyongyu
d9f8bf38c6 🐛 fix matcher group send 2020-10-22 00:00:29 +08:00
yanyongyu
4e2b74af75 🚧 add plugin store page 2020-10-21 00:55:23 +08:00
yanyongyu
c2c28cebf5 👽 update nonebot theme 2020-10-21 00:54:09 +08:00
yanyongyu
24141b1a4b 🎨 remove shebang line #31 2020-10-20 22:40:16 +08:00
Ju4tCode
c85e50d73d 👷 Add release draft config 2020-10-20 17:28:51 +08:00
Ju4tCode
444156766a 👷 Update release drafter 2020-10-20 17:27:41 +08:00
yanyongyu
308824d0b1 🐛 fix matcher group args parser 2020-10-20 00:01:26 +08:00
yanyongyu
c3ed962837 add site cache to improve performance #29 2020-10-19 17:49:04 +08:00
Ju4tCode
2c13303d89 👷 Update issue templates 2020-10-19 00:00:11 +08:00
Ju4tCode
1304b94b61 🔀 Merge pull request #28
Update vuepress theme
2020-10-18 03:05:42 -05:00
yanyongyu
8ca677c271 👽 fix home link 2020-10-18 15:34:14 +08:00
yanyongyu
7c17412106 💡 add plugin docstring 2020-10-18 15:04:45 +08:00
yanyongyu
26207f762b 🏷️ fix class inherit in pyi 2020-10-18 15:02:56 +08:00
yanyongyu
8db70dbb0c 👽 fix theme smooth scroll 2020-10-18 02:30:01 +08:00
yanyongyu
1b6924a104 👽 update lock file 2020-10-18 02:04:32 +08:00
yanyongyu
c5a30a8a79 use custom theme 2020-10-18 01:39:34 +08:00
yanyongyu
56c9c24dc6 add kwargs support for matcher send/finish/pause/reject 2020-10-17 19:50:25 +08:00
yanyongyu
9ad629841b 📝 add uninstall nonebot 1.x tip 2020-10-16 17:15:40 +08:00
yanyongyu
78433bdae9 🚑 restore markdown 2020-10-16 16:08:51 +08:00
yanyongyu
5f44212faa 🚑 restore div 2020-10-16 16:07:04 +08:00
yanyongyu
df517b6b36 📝 use p instead of div 2020-10-16 16:03:49 +08:00
yanyongyu
6afe9b6f4f 📝 Update Readme (fix #27) 2020-10-16 15:59:34 +08:00
yanyongyu
1d79ac232f 🐛 fix missing param for on event 2020-10-16 15:12:15 +08:00
yanyongyu
0a64959973 💡 add driver docstring 2020-10-16 01:10:46 +08:00
yanyongyu
1e4b058681 👽 update repo link 2020-10-11 14:51:37 +08:00
yanyongyu
3c5d06a2de 📝 add todo tag 2020-10-11 13:49:58 +08:00
377 changed files with 40765 additions and 25509 deletions

20
.devcontainer/Dockerfile Normal file
View File

@@ -0,0 +1,20 @@
# See here for image contents: https://github.com/microsoft/vscode-dev-containers/tree/v0.233.0/containers/codespaces-linux/.devcontainer/base.Dockerfile
FROM mcr.microsoft.com/vscode/devcontainers/universal:linux
# ** [Optional] Uncomment this section to install additional packages. **
# USER root
#
# RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \
# && apt-get -y install --no-install-recommends <your-package-list-here>
USER codespace
# [Required] Poetry
RUN curl -sSL https://install.python-poetry.org | python - -y
RUN poetry config virtualenvs.in-project true
# [Required] Gitmoji CLI
# Deprecated: Maybe removed once nonemoji is done
RUN yarn global add gitmoji-cli
ENV PATH="$PATH:/home/codespace/.yarn/bin"

View File

@@ -0,0 +1,83 @@
// For format details, see https://aka.ms/devcontainer.json. For config options, see the README at:
// https://github.com/microsoft/vscode-dev-containers/tree/v0.233.0/containers/codespaces-linux
{
"name": "NoneBot",
"build": {
"dockerfile": "Dockerfile",
"context": ".."
},
"settings": {
"go.toolsManagement.checkForUpdates": "local",
"go.useLanguageServer": true,
"go.gopath": "/go",
"python.defaultInterpreterPath": "/opt/python/latest/bin/python",
"python.formatting.autopep8Path": "/usr/local/py-utils/bin/autopep8",
"python.formatting.blackPath": "/usr/local/py-utils/bin/black",
"python.formatting.yapfPath": "/usr/local/py-utils/bin/yapf",
"python.linting.banditPath": "/usr/local/py-utils/bin/bandit",
"python.linting.flake8Path": "/usr/local/py-utils/bin/flake8",
"python.linting.mypyPath": "/usr/local/py-utils/bin/mypy",
"python.linting.pycodestylePath": "/usr/local/py-utils/bin/pycodestyle",
"python.linting.pydocstylePath": "/usr/local/py-utils/bin/pydocstyle",
"python.linting.pylintPath": "/usr/local/py-utils/bin/pylint",
"python.analysis.diagnosticMode": "workspace",
"python.analysis.typeCheckingMode": "basic",
"[python]":{
"editor.defaultFormatter": "ms-python.black-formatter",
"editor.codeActionsOnSave": {
"source.organizeImports": true
}
},
"[javascript]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[html]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[typescript]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[javascriptreact]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[typescriptreact]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"lldb.executable": "/usr/bin/lldb",
"files.exclude": {
"**/__pycache__": true
},
"files.watcherExclude": {
"**/target/**": true,
"**/__pycache__": true
}
},
"remoteUser": "codespace",
"overrideCommand": false,
"mounts": ["source=codespaces-linux-var-lib-docker,target=/var/lib/docker,type=volume"],
"runArgs": [
"--cap-add=SYS_PTRACE",
"--security-opt",
"seccomp=unconfined",
"--privileged",
"--init"
],
// Add the IDs of extensions you want installed when the container is created.
"extensions": [
"GitHub.vscode-pull-request-github",
"ms-python.python",
"ms-python.vscode-pylance",
"ms-python.isort",
"ms-python.black-formatter",
"EditorConfig.EditorConfig",
"esbenp.prettier-vscode",
"bradlc.vscode-tailwindcss"
],
// Use 'forwardPorts' to make a list of ports inside the container available locally.
// "forwardPorts": [],
// "oryx build" will automatically install your dependencies and attempt to build your project
"postCreateCommand": "poetry install -E all && poetry run pre-commit install && yarn install"
}

2
.github/FUNDING.yml vendored Normal file
View File

@@ -0,0 +1,2 @@
open_collective: nonebot
custom: ["https://afdian.net/@nonebot"]

38
.github/ISSUE_TEMPLATE/bug-report.md vendored Normal file
View File

@@ -0,0 +1,38 @@
---
name: Bug report
about: Create a bug report to help us improve
title: 'Bug: Something went wrong'
labels: bug
assignees: ''
---
**描述问题:**
A clear and concise description of what the bug is.
**如何复现?**
1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
4. See error
**期望的结果**
A clear and concise description of what you expected to happen.
**环境信息:**
- OS: [e.g. Linux]
- Python Version: [e.g. 3.8]
- Nonebot Version: [e.g. 2.0.0]
**协议端信息:**
- 协议端: [e.g. go-cqhttp]
- 协议端版本: [e.g. 1.0.0]
**截图或日志**
If applicable, add screenshots to help explain your problem.

14
.github/ISSUE_TEMPLATE/config.yml vendored Normal file
View File

@@ -0,0 +1,14 @@
blank_issues_enabled: false
contact_links:
- name: Question
url: https://discussions.nonebot.dev/
about: Ask questions about nonebot
- name: Plugin Publish
url: https://v2.nonebot.dev/store
about: Publish your plugin to nonebot homepage and nb-cli
- name: Adapter Publish
url: https://v2.nonebot.dev/store
about: Publish your adapter to nonebot homepage and nb-cli
- name: Bot Publish
url: https://v2.nonebot.dev/store
about: Publish your bot to nonebot homepage and nb-cli

17
.github/ISSUE_TEMPLATE/document.md vendored Normal file
View File

@@ -0,0 +1,17 @@
---
name: Document improvement
about: Feedback on documentation, including errors and ideas
title: 'Docs: some description'
labels: documentation
assignees: ''
---
**描述问题或主题:**
**需做出的修改:**
* [ ] 一些修改
* [ ] 一些修改
* [ ] 一些修改

View File

@@ -0,0 +1,16 @@
---
name: Feature request
about: Suggest an idea for this project
title: 'Feature: Something you want'
labels: enhancement
assignees: ''
---
**是否在使用中遇到某些问题而需要新的特性?请描述:**
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
**描述你所需要的特性:**
A clear and concise description of what you want to happen.

View File

@@ -0,0 +1,11 @@
name: Build API Doc
description: Build API Doc
runs:
using: "composite"
steps:
- run: |
poetry run nb-autodoc nonebot
cp -r ./build/nonebot/* ./website/docs/api/
yarn prettier
shell: bash

21
.github/actions/setup-node/action.yml vendored Normal file
View File

@@ -0,0 +1,21 @@
name: Setup Node
description: Setup Node
runs:
using: "composite"
steps:
- uses: actions/setup-node@v2
with:
node-version: "16"
- id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn cache dir)"
shell: bash
- uses: actions/cache@v2
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
- run: yarn install
shell: bash

26
.github/actions/setup-python/action.yml vendored Normal file
View File

@@ -0,0 +1,26 @@
name: Setup Python
description: Setup Python
inputs:
python-version:
description: Python version
required: false
default: "3.9"
runs:
using: "composite"
steps:
- uses: actions/setup-python@v2
with:
python-version: ${{ inputs.python-version }}
architecture: "x64"
- uses: Gr1N/setup-poetry@v7
- uses: actions/cache@v2
with:
path: ~/.cache/pypoetry/virtualenvs
key: ${{ runner.os }}-poetry-${{ inputs.python-version }}-${{ hashFiles('**/poetry.lock') }}
- run: poetry install -E all
shell: bash

6
.github/dependabot.yml vendored Normal file
View File

@@ -0,0 +1,6 @@
version: 2
updates:
- package-ecosystem: github-actions
directory: "/"
schedule:
interval: daily

43
.github/release-drafter.yml vendored Normal file
View File

@@ -0,0 +1,43 @@
template: $CHANGES
category-template: "### $TITLE"
name-template: "Release v$RESOLVED_VERSION 🌈"
tag-template: "v$RESOLVED_VERSION"
change-template: "- $TITLE [@$AUTHOR](https://github.com/$AUTHOR) ([#$NUMBER]($URL))"
change-title-escapes: '\<&'
exclude-labels:
- "dependencies"
- "skip-changelog"
categories:
- title: "💥 破坏性变更"
labels:
- "Breaking"
- title: "🚀 新功能"
labels:
- "feature"
- "enhancement"
- title: "🐛 Bug 修复"
labels:
- "fix"
- "bugfix"
- "bug"
- title: "📝 文档"
labels:
- "documentation"
- title: "💫 杂项"
- title: "🍻 插件发布"
label: "Plugin"
- title: "🍻 机器人发布"
label: "Bot"
- title: "🍻 适配器发布"
label: "Adapter"
version-resolver:
major:
labels:
- "major"
minor:
labels:
- "minor"
patch:
labels:
- "patch"
default: patch

View File

@@ -1,41 +0,0 @@
name: Build API Doc
on:
pull_request:
types: [ opened, synchronize, reopened ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
ref: ${{ github.event.pull_request.head.sha }}
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: 3.8
architecture: "x64"
- name: Install Dependences
run: |
python -m pip install --upgrade pip
pip install poetry
poetry install
- name: Build Doc
run: poetry run sphinx-build -M markdown ./docs_build ./build
- name: Copy Files
run: cp -r ./build/markdown/* ./docs/api/
- run: |
git config user.name nonebot
git config user.email nonebot@nonebot.dev
git add .
git diff-index --quiet HEAD || git commit -m ":memo: update api docs"
git remote -vv
git remote add target ${{github.event.pull_request.head.repo.clone_url}}
git push target HEAD:${{github.event.pull_request.head.ref}}

43
.github/workflows/codecov.yml vendored Normal file
View File

@@ -0,0 +1,43 @@
name: Code Coverage
on:
push:
branches:
- master
pull_request:
jobs:
test:
name: Test Coverage
runs-on: ${{ matrix.os }}
concurrency:
group: test-coverage-${{ github.ref }}-${{ matrix.os }}-${{ matrix.python-version }}
cancel-in-progress: true
strategy:
matrix:
python-version: ["3.7", "3.8", "3.9", "3.10"]
os: [ubuntu-latest, windows-latest, macos-latest]
fail-fast: false
env:
OS: ${{ matrix.os }}
PYTHON_VERSION: ${{ matrix.python-version }}
steps:
- uses: actions/checkout@v3
- name: Setup Python environment
uses: ./.github/actions/setup-python
with:
python-version: ${{ matrix.python-version }}
- name: Run Pytest
run: |
cd tests/
poetry run pytest -n auto --cov-report xml
- name: Upload coverage report
uses: codecov/codecov-action@v3
with:
env_vars: OS,PYTHON_VERSION
files: ./tests/coverage.xml
flags: unittests

29
.github/workflows/publish-bot.yml vendored Normal file
View File

@@ -0,0 +1,29 @@
name: NoneBot2 Publish Bot
on:
issues:
types: [opened, reopened, edited]
pull_request_target:
types: [closed]
jobs:
publish_bot:
runs-on: ubuntu-latest
name: nonebot2 publish bot
steps:
- name: Checkout code
uses: actions/checkout@v3
with:
token: ${{ secrets.GH_TOKEN }}
- name: NoneBot2 Publish Bot
uses: docker://ghcr.io/nonebot/nonebot2-publish-bot:main
with:
token: ${{ secrets.GH_TOKEN }}
config: >
{
"base": "master",
"plugin_path": "website/static/plugins.json",
"bot_path": "website/static/bots.json",
"adapter_path": "website/static/adapters.json"
}

97
.github/workflows/release-drafter.yml vendored Normal file
View File

@@ -0,0 +1,97 @@
name: Release Drafter
on:
push:
tags:
- v*
pull_request_target:
branches:
- master
types:
- closed
jobs:
update-release-draft:
if: github.event_name == 'pull_request_target'
runs-on: ubuntu-latest
concurrency:
group: pull-request-changelog
cancel-in-progress: true
steps:
- uses: actions/checkout@v3
with:
token: ${{ secrets.GH_TOKEN }}
- name: Setup Node Environment
uses: ./.github/actions/setup-node
- uses: release-drafter/release-drafter@v5
id: release-drafter
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Update Changelog
uses: docker://ghcr.io/nonebot/auto-changelog:master
with:
changelog_file: website/src/pages/changelog.md
latest_changes_position: '# 更新日志\n\n'
latest_changes_title: '## 最近更新'
replace_regex: '(?<=## 最近更新\n)[\s\S]*?(?=\n## )'
changelog_body: ${{ steps.release-drafter.outputs.body }}
commit_and_push: false
- name: Commit and Push
run: |
yarn prettier
git config user.name github-actions[bot]
git config user.email github-actions[bot]@users.noreply.github.com
git add .
git diff-index --quiet HEAD || git commit -m ":memo: Update changelog"
git push
release:
if: startsWith(github.ref, 'refs/tags/')
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Setup Python Environment
uses: ./.github/actions/setup-python
- name: Setup Node Environment
uses: ./.github/actions/setup-node
- name: Build API Doc
uses: ./.github/actions/build-api-doc
- run: |
echo "TAG_NAME=${GITHUB_REF#refs/tags/}" >> $GITHUB_ENV
- uses: release-drafter/release-drafter@v5
with:
name: Release ${{ env.TAG_NAME }} 🌈
tag: ${{ env.TAG_NAME }}
publish: true
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Build and Publish Package
run: |
poetry build
poetry publish -u ${{secrets.PYPI_USERNAME}} -p ${{secrets.PYPI_PASSWORD}}
gh release upload --clobber ${{ env.TAG_NAME }} dist/*.tar.gz dist/*.whl
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Build and Publish Doc Package
run: |
yarn build:plugin --out-dir ../packages/nonebot-plugin-docs/nonebot_plugin_docs/dist
export NONEBOT_VERSION=`poetry version -s`
cd packages/nonebot-plugin-docs/
poetry version $NONEBOT_VERSION
poetry build
poetry publish -u ${{secrets.PYPI_USERNAME}} -p ${{secrets.PYPI_PASSWORD}}
gh release upload --clobber ${{ env.TAG_NAME }} dist/*.tar.gz dist/*.whl
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

47
.github/workflows/release.yml vendored Normal file
View File

@@ -0,0 +1,47 @@
name: Release
on:
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
ref: master
token: ${{ secrets.GH_TOKEN }}
- name: Setup Python Environment
uses: ./.github/actions/setup-python
- name: Setup Node Environment
uses: ./.github/actions/setup-node
- name: Build API Doc
uses: ./.github/actions/build-api-doc
- run: echo "TAG_NAME=v$(poetry version -s)" >> $GITHUB_ENV
- name: Archive Changelog
uses: docker://ghcr.io/nonebot/auto-changelog:master
with:
changelog_file: website/src/pages/changelog.md
archive_regex: '(?<=## )最近更新(?=\n)'
archive_title: ${{ env.TAG_NAME }}
commit_and_push: false
- name: Archive Files
run: |
yarn archive $(poetry version -s)
yarn prettier
- name: Push Tag
run: |
git config user.name github-actions[bot]
git config user.email github-actions[bot]@users.noreply.github.com
git add .
git commit -m ":bookmark: Release $(poetry version -s)"
git tag ${{ env.TAG_NAME }}
git push && git push --tags

44
.github/workflows/website-deploy.yml vendored Normal file
View File

@@ -0,0 +1,44 @@
name: Site Deploy
on:
push:
branches:
- master
jobs:
publish:
runs-on: ubuntu-latest
concurrency:
group: website-deploy-${{ github.ref }}
cancel-in-progress: true
steps:
- uses: actions/checkout@v3
- name: Setup Python Environment
uses: ./.github/actions/setup-python
- name: Setup Node Environment
uses: ./.github/actions/setup-node
- name: Build API Doc
uses: ./.github/actions/build-api-doc
- name: Build Doc
run: yarn build
- name: Get Branch Name
run: echo "BRANCH_NAME=$(echo ${GITHUB_REF#refs/heads/})" >> $GITHUB_ENV
- name: Deploy to Netlify
uses: nwtgck/actions-netlify@v1
with:
publish-dir: "./website/build"
production-deploy: true
github-token: ${{ secrets.GITHUB_TOKEN }}
deploy-message: "Deploy ${{ env.BRANCH_NAME }}@${{ github.sha }}"
enable-commit-comment: false
alias: ${{ env.BRANCH_NAME }}
env:
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }}
NETLIFY_SITE_ID: ${{ secrets.SITE_ID }}

45
.github/workflows/website-preview.yml vendored Normal file
View File

@@ -0,0 +1,45 @@
name: Site Deploy(Preview)
on:
pull_request_target:
jobs:
preview:
runs-on: ubuntu-latest
concurrency:
group: pull-request-preview-${{ github.event.number }}
cancel-in-progress: true
steps:
- uses: actions/checkout@v3
with:
ref: ${{ github.event.pull_request.head.sha }}
- name: Setup Python Environment
uses: ./.github/actions/setup-python
- name: Setup Node Environment
uses: ./.github/actions/setup-node
- name: Build API Doc
uses: ./.github/actions/build-api-doc
- name: Build Doc
run: yarn build
- name: Get Deploy Name
run: |
echo "DEPLOY_NAME=deploy-preview-${{ github.event.number }}" >> $GITHUB_ENV
- name: Deploy to Netlify
uses: nwtgck/actions-netlify@v1
with:
publish-dir: "./website/build"
production-deploy: false
github-token: ${{ secrets.GITHUB_TOKEN }}
deploy-message: "Deploy ${{ env.DEPLOY_NAME }}@${{ github.sha }}"
enable-commit-comment: false
alias: ${{ env.DEPLOY_NAME }}
env:
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }}
NETLIFY_SITE_ID: ${{ secrets.SITE_ID }}

439
.gitignore vendored
View File

@@ -1,5 +1,296 @@
# ----- Python -----
# ----- Project -----
.idea
.vscode
dev
docs_build/_build
!tests/.env
.docusaurus
website/docs/api/**/*.md
# Created by https://www.toptal.com/developers/gitignore/api/python,node,visualstudiocode,jetbrains,macos,windows,linux
# Edit at https://www.toptal.com/developers/gitignore?templates=python,node,visualstudiocode,jetbrains,macos,windows,linux
### JetBrains ###
# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio, WebStorm and Rider
# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839
# User-specific stuff
.idea/**/workspace.xml
.idea/**/tasks.xml
.idea/**/usage.statistics.xml
.idea/**/dictionaries
.idea/**/shelf
# AWS User-specific
.idea/**/aws.xml
# Generated files
.idea/**/contentModel.xml
# Sensitive or high-churn files
.idea/**/dataSources/
.idea/**/dataSources.ids
.idea/**/dataSources.local.xml
.idea/**/sqlDataSources.xml
.idea/**/dynamic.xml
.idea/**/uiDesigner.xml
.idea/**/dbnavigator.xml
# Gradle
.idea/**/gradle.xml
.idea/**/libraries
# Gradle and Maven with auto-import
# When using Gradle or Maven with auto-import, you should exclude module files,
# since they will be recreated, and may cause churn. Uncomment if using
# auto-import.
# .idea/artifacts
# .idea/compiler.xml
# .idea/jarRepositories.xml
# .idea/modules.xml
# .idea/*.iml
# .idea/modules
# *.iml
# *.ipr
# CMake
cmake-build-*/
# Mongo Explorer plugin
.idea/**/mongoSettings.xml
# File-based project format
*.iws
# IntelliJ
out/
# mpeltonen/sbt-idea plugin
.idea_modules/
# JIRA plugin
atlassian-ide-plugin.xml
# Cursive Clojure plugin
.idea/replstate.xml
# Crashlytics plugin (for Android Studio and IntelliJ)
com_crashlytics_export_strings.xml
crashlytics.properties
crashlytics-build.properties
fabric.properties
# Editor-based Rest Client
.idea/httpRequests
# Android studio 3.1+ serialized cache file
.idea/caches/build_file_checksums.ser
### JetBrains Patch ###
# Comment Reason: https://github.com/joeblau/gitignore.io/issues/186#issuecomment-215987721
# *.iml
# modules.xml
# .idea/misc.xml
# *.ipr
# Sonarlint plugin
# https://plugins.jetbrains.com/plugin/7973-sonarlint
.idea/**/sonarlint/
# SonarQube Plugin
# https://plugins.jetbrains.com/plugin/7238-sonarqube-community-plugin
.idea/**/sonarIssues.xml
# Markdown Navigator plugin
# https://plugins.jetbrains.com/plugin/7896-markdown-navigator-enhanced
.idea/**/markdown-navigator.xml
.idea/**/markdown-navigator-enh.xml
.idea/**/markdown-navigator/
# Cache file creation bug
# See https://youtrack.jetbrains.com/issue/JBR-2257
.idea/$CACHE_FILE$
# CodeStream plugin
# https://plugins.jetbrains.com/plugin/12206-codestream
.idea/codestream.xml
### Linux ###
*~
# temporary files which can be created if a process still has a handle open of a deleted file
.fuse_hidden*
# KDE directory preferences
.directory
# Linux trash folder which might appear on any partition or disk
.Trash-*
# .nfs files are created when an open file is removed but is still being accessed
.nfs*
### macOS ###
# General
.DS_Store
.AppleDouble
.LSOverride
# Icon must end with two \r
Icon
# Thumbnails
._*
# Files that might appear in the root of a volume
.DocumentRevisions-V100
.fseventsd
.Spotlight-V100
.TemporaryItems
.Trashes
.VolumeIcon.icns
.com.apple.timemachine.donotpresent
# Directories potentially created on remote AFP share
.AppleDB
.AppleDesktop
Network Trash Folder
Temporary Items
.apdisk
### Node ###
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
lerna-debug.log*
.pnpm-debug.log*
# Diagnostic reports (https://nodejs.org/api/report.html)
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json
# Runtime data
pids
*.pid
*.seed
*.pid.lock
# Directory for instrumented libs generated by jscoverage/JSCover
lib-cov
# Coverage directory used by tools like istanbul
coverage
*.lcov
# nyc test coverage
.nyc_output
# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files)
.grunt
# Bower dependency directory (https://bower.io/)
bower_components
# node-waf configuration
.lock-wscript
# Compiled binary addons (https://nodejs.org/api/addons.html)
build/Release
# Dependency directories
node_modules/
jspm_packages/
# Snowpack dependency directory (https://snowpack.dev/)
web_modules/
# TypeScript cache
*.tsbuildinfo
# Optional npm cache directory
.npm
# Optional eslint cache
.eslintcache
# Microbundle cache
.rpt2_cache/
.rts2_cache_cjs/
.rts2_cache_es/
.rts2_cache_umd/
# Optional REPL history
.node_repl_history
# Output of 'npm pack'
*.tgz
# Yarn Integrity file
.yarn-integrity
# dotenv environment variables file
.env
.env.test
.env.production
# parcel-bundler cache (https://parceljs.org/)
.cache
.parcel-cache
# Next.js build output
.next
out
# Nuxt.js build / generate output
.nuxt
dist
# Gatsby files
.cache/
# Comment in the public line in if your project uses Gatsby and not Next.js
# https://nextjs.org/blog/next-9-1#public-directory-support
# public
# vuepress build output
.vuepress/dist
# Serverless directories
.serverless/
# FuseBox cache
.fusebox/
# DynamoDB Local files
.dynamodb/
# TernJS port file
.tern-port
# Stores VSCode versions used for testing VSCode extensions
.vscode-test
# yarn v2
.yarn/cache
.yarn/unplugged
.yarn/build-state.yml
.yarn/install-state.gz
.pnp.*
### Node Patch ###
# Serverless Webpack directories
.webpack/
# Optional stylelint cache
.stylelintcache
# SvelteKit build / generate output
.svelte-kit
### Python ###
# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
@@ -22,6 +313,7 @@ parts/
sdist/
var/
wheels/
share/python-wheels/
*.egg-info/
.installed.cfg
*.egg
@@ -40,23 +332,25 @@ pip-delete-this-directory.txt
# Unit test / coverage reports
htmlcov/
.tox/
.nox/
.coverage
.coverage.*
.cache
nosetests.xml
coverage.xml
*.cover
*.py,cover
.hypothesis/
.pytest_cache/
cover/
# Translations
*.mo
*.pot
# Django stuff:
*.log
local_settings.py
db.sqlite3
db.sqlite3-journal
# Flask stuff:
instance/
@@ -69,22 +363,39 @@ instance/
docs/_build/
# PyBuilder
.pybuilder/
target/
# Jupyter Notebook
.ipynb_checkpoints
# pyenv
.python-version
# IPython
profile_default/
ipython_config.py
# celery beat schedule file
# pyenv
# For a library or package, you might want to ignore these files since the code is
# intended to run in multiple environments; otherwise, check them in:
# .python-version
# pipenv
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
# However, in case of collaboration, if having platform-specific dependencies or dependencies
# having no cross-platform support, pipenv may install dependencies that don't work, or not
# install all needed dependencies.
#Pipfile.lock
# PEP 582; used by e.g. github.com/David-OConnor/pyflow
__pypackages__/
# Celery stuff
celerybeat-schedule
celerybeat.pid
# SageMath parsed files
*.sage.py
# Environments
.env
.venv
env/
venv/
@@ -104,87 +415,61 @@ venv.bak/
# mypy
.mypy_cache/
.dmypy.json
dmypy.json
# ----- Node -----
# Pyre type checker
.pyre/
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
# pytype static type analyzer
.pytype/
# Runtime data
pids
*.pid
*.seed
*.pid.lock
# Cython debug symbols
cython_debug/
# Directory for instrumented libs generated by jscoverage/JSCover
lib-cov
### VisualStudioCode ###
.vscode/*
!.vscode/settings.json
!.vscode/tasks.json
!.vscode/launch.json
!.vscode/extensions.json
*.code-workspace
# Coverage directory used by tools like istanbul
coverage
# Local History for Visual Studio Code
.history/
# nyc test coverage
.nyc_output
### VisualStudioCode Patch ###
# Ignore all local history of files
.history
.ionide
# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
.grunt
# Support for Project snippet scope
!.vscode/*.code-snippets
# Bower dependency directory (https://bower.io/)
bower_components
### Windows ###
# Windows thumbnail cache files
Thumbs.db
Thumbs.db:encryptable
ehthumbs.db
ehthumbs_vista.db
# node-waf configuration
.lock-wscript
# Dump file
*.stackdump
# Compiled binary addons (https://nodejs.org/api/addons.html)
build/Release
# Folder config file
[Dd]esktop.ini
# Dependency directories
node_modules/
jspm_packages/
# Recycle Bin used on file shares
$RECYCLE.BIN/
# TypeScript v1 declaration files
typings/
# Windows Installer files
*.cab
*.msi
*.msix
*.msm
*.msp
# Optional npm cache directory
.npm
# Windows shortcuts
*.lnk
# Optional eslint cache
.eslintcache
# Optional REPL history
.node_repl_history
# Output of 'npm pack'
*.tgz
# Yarn Integrity file
.yarn-integrity
# dotenv environment variables file
.env
# parcel-bundler cache (https://parceljs.org/)
.cache
# next.js build output
.next
# nuxt.js build output
.nuxt
# vuepress build output
.vuepress/dist
# Serverless directories
.serverless
# ----- Project -----
.idea
.vscode
dev
docs_build/_build
!tests/.env
# End of https://www.toptal.com/developers/gitignore/api/python,node,visualstudiocode,jetbrains,macos,windows,linux

22
.pre-commit-config.yaml Normal file
View File

@@ -0,0 +1,22 @@
ci:
autofix_commit_msg: ":rotating_light: auto fix by pre-commit hooks"
autofix_prs: true
autoupdate_branch: master
autoupdate_schedule: monthly
autoupdate_commit_msg: ":arrow_up: auto update by pre-commit hooks"
repos:
- repo: https://github.com/pycqa/isort
rev: 5.10.1
hooks:
- id: isort
- repo: https://github.com/psf/black
rev: 22.3.0
hooks:
- id: black
- repo: https://github.com/pre-commit/mirrors-prettier
rev: v2.6.2
hooks:
- id: prettier
types_or: [javascript, jsx, ts, tsx, markdown]

1
.prettierignore Normal file
View File

@@ -0,0 +1 @@
.github/**/*.md

9
.prettierrc Normal file
View File

@@ -0,0 +1,9 @@
{
"tabWidth": 2,
"useTabs": false,
"endOfLine": "lf",
"arrowParens": "always",
"singleQuote": false,
"trailingComma": "es5",
"semi": true
}

View File

@@ -1,2 +0,0 @@
[style]
based_on_style = google

1
.yarnrc Normal file
View File

@@ -0,0 +1 @@
registry "https://registry.npmjs.org/"

3
CHANGELOG.md Normal file
View File

@@ -0,0 +1,3 @@
# Changelog
See [changelog.md](./website/src/pages/changelog.md) or <https://v2.nonebot.dev/changelog>

86
CODE_OF_CONDUCT.md Normal file
View File

@@ -0,0 +1,86 @@
# NoneBot2 贡献者公约
## 我们的承诺
身为项目成员、贡献者、负责人,我们保证参与此社区的每个人都不受骚扰,不论其年龄、体型、身体条件、民族、性征、性别认同与表现、经验水平、教育程度、社会地位、国籍、相貌、种族、宗教信仰及性取向如何。
我们承诺致力于建设开放、友善、多元、包容、健康的社区环境。
## 我们的准则
有助于促进本社区积极环境的行为包括但不限于:
- 与人为善、推己及人
- 尊重不同的主张、观点和经历
- 积极提出、耐心接受有益批评
- 面对过失,承担责任、认真道歉、从中学习
- 关注社区共同诉求,而非一己私利
不当行为包括但不限于:
- 发布与性有关的言论或图像,以及任何形式的献殷勤或勾引
- 挑衅行为、侮辱或贬损的言论、人身及政治攻击
- 公开或私下骚扰
- 未获明确授权擅自发布他人的资料,如地址、电子邮箱等
- 其他有理由认定为违反职业操守的不当行为
## 落实之义务
社区负责人有责任诠释什么是“妥当行为”,并据此准则,妥善公正地认定与处置不当、威胁、冒犯及有害的行为。
社区负责人有权利和义务删除、编辑、拒绝违背本公约的评论comment、提交commit、代码、维基wiki编辑、问题issue等贡献。如有必要需告知采取措施的理由。
## 适用范围
此行为标准适用于本社区全部场合,以及在其他场合代表本社区的个人。
代表本社区的情形包括但不限于:使用官方电子邮件与社交平台、作为指定代表参与在线或线下活动。
## 贯彻落实
如遇滥用、骚扰等不当行为,请通过 contact@nonebot.dev 向我们举报。我们将迅速审议并调查全部投诉。
社区全体负责人有义务保密举报者信息。
## 指导方针
社区负责人将依据下列方案判断并处置违纪行为:
### 一、督促
**社区影响**:用语不当、举止不符合道德或不受社区欢迎。
**处理意见**:由社区负责人予以非公开的书面警告,阐明违纪事由、解释举止如何不妥。或要求公开道歉。
### 二、警告
**社区影响**:一起或多起事件中的违纪行为。
**处理意见**:警告继续违纪的后果、违纪者在特定时间内禁止与当事人往来、不得擅自与社区执法者往来,禁令涵盖社区内外、社交网络在内的一切联络。如有违反,可致封禁乃至开除。
### 三、封禁
**社区影响**:严重违纪行为,包括屡教不改。
**处理意见**:违纪者在特定时间内禁止与社区的任何往来或公开联络,禁止任何与当事人公开或私下往来,不得擅自与社区管理者往来。如有违反,可导致开除。
### 四、开除
**社区影响**:典型违纪行为,例如屡教不改、骚扰某个人、敌对或贬低某个群体。
**处理意见**:无限期禁止违纪者与项目社区的一切公开往来。
## 来源
本行为标准改编自[参与者公约][homepage]2.0 版,可在此查阅:[https://www.contributor-covenant.org/zh-cn/version/2/0/code_of_conduct.html][v2.0]
指导方针借鉴自[Mozilla 纪检分级][mozilla coc]。
此行为标准常见问题请洽:[https://www.contributor-covenant.org/faq][faq]。
另有诸译本:[https://www.contributor-covenant.org/translations][translations]。
[homepage]: https://www.contributor-covenant.org
[v2.0]: https://www.contributor-covenant.org/version/2/0/code_of_conduct.html
[mozilla coc]: https://github.com/mozilla/diversity
[faq]: https://www.contributor-covenant.org/faq
[translations]: https://www.contributor-covenant.org/translations

78
CONTRIBUTING.md Normal file
View File

@@ -0,0 +1,78 @@
# NoneBot2 贡献指南
首先,感谢你愿意为 NoneBot2 贡献自己的一份力量!
本指南旨在引导你更规范地向 NoneBot2 提交贡献,请务必认真阅读。
## 提交 Issue
在提交 Issue 前,我们建议你先查看 [FAQ](https://github.com/nonebot/discussions/discussions/13) 与 [已有的 Issues](https://github.com/nonebot/nonebot2/issues),以防重复提交。
### 报告问题、故障与漏洞
NoneBot2 仍然是一个不够稳定的开发中项目,如果你在使用过程中发现问题并确信是由 NoneBot2 引起的,欢迎提交 Issue。
### 建议功能
NoneBot2 还未进入正式版,欢迎在 Issue 中提议要加入哪些新功能。
为了让开发者更好地理解你的意图,请认真描述你所需要的特性,可能的话可以提出你认为可行的解决方案。
## Pull Request
NoneBot 使用 [poetry](https://python-poetry.org/) 管理项目依赖,由于 pre-commit 也经其管理,所以在此一并说明。
下面的命令能在已安装 poetry 和 yarn 的情况下帮你快速配置开发环境。
```bash
# 安装 python 依赖
poetry install
# 安装 pre-commit git hook
pre-commit install
# 安装 gitmoji git hook
yarn global add gitmoji-cli
gitmoji -i
```
### 使用 GitHub Codespaces (Dev Container)
使用 GitHub Codespaces 选择 `NoneBot2` 项目,然后选择 `.devcontainer/devcontainer.json` 配置即可。
### Commit 规范
请确保你的每一个 commit 都能清晰地描述其意图,一个 commit 尽量只有一个意图。
NoneBot 的 commit message 格式遵循 [gitmoji](https://gitmoji.dev/) 规范,在创建 commit 时请牢记这一点。
### 撰写文档
NoneBot2 的文档使用 [docusaurus](https://docusaurus.io/),它有一些 [Markdown 特性](https://docusaurus.io/zh-CN/docs/markdown-features) 可能会帮助到你。
NoneBot2 文档并没有具体的行文风格规范,但我们建议你尽量写得简单易懂。
如果你需要在本地预览修改后的文档,可以使用 yarn 安装文档依赖后启动 dev server如下所示
```bash
yarn install
yarn start
```
### 参与开发
NoneBot2 的代码风格遵循 [PEP 8](https://www.python.org/dev/peps/pep-0008/) 与 [PEP 484](https://www.python.org/dev/peps/pep-0484/) 规范,请确保你的代码风格和项目已有的代码保持一致,变量命名清晰,有适当的注释与测试代码。
## 为社区做贡献
你可以在 NoneBot 商店上架自己的适配器、插件、机器人,具体步骤可参考 [发布插件](https://v2.nonebot.dev/docs/advanced/publish-plugin) 一节。
我们仅对插件的兼容性进行简单测试,并会在下一个版本发布前对与该版本不兼容的插件作出处理。
虽然对插件的内容没有严格限制,但我们还是建议在上架插件之前先查看商店有无功能一致的插件。如果你想要上架商店的插件功能与现有插件不完全重合,请在插件说明中补充其与现有插件的区别。
同时,如果你参考或基于他人发行的代码进行开发,请注意遵守各代码所使用的开源许可协议。
## Git 工作流
`master` 分支为 NoneBot 的开发分支,请在任何情况下都不要直接修改 `master` 分支,而是创建一个目标分支为 `nonebot:master` 的 Pull Request 来提交修改。
如果你不是 NoneBot 团队的成员,可在 fork 本仓库后,向本仓库的 `master` 分支发起 Pull Request注意遵循先前提到的 commit message 规范创建 commit。我们将在 code review 通过后通过 squash merge 方式将您的贡献合并到主分支。

View File

@@ -1,5 +1,5 @@
The MIT License (MIT)
Copyright (c) 2018 Richard Chien
Copyright (c) 2020 NoneBot Team
Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in

188
README.md
View File

@@ -1,37 +1,187 @@
<div align=center>
<img src="./docs/.vuepress/public/logo.png" width="200" height="200">
<!-- markdownlint-disable MD033 MD041 -->
<p align="center">
<a href="https://v2.nonebot.dev/"><img src="https://v2.nonebot.dev/logo.png" width="200" height="200" alt="nonebot"></a>
</p>
<div align="center">
# NoneBot
[![License](https://img.shields.io/github/license/nonebot/nonebot2.svg)](LICENSE)
[![PyPI](https://img.shields.io/pypi/v/nonebot2.svg)](https://pypi.python.org/pypi/nonebot2)
![Python Version](https://img.shields.io/badge/python-3.7+-blue.svg)
![CQHTTP Version](https://img.shields.io/badge/cqhttp-11+-black.svg)
[![QQ 群](https://img.shields.io/badge/qq%E7%BE%A4-768887710-orange.svg)](https://jq.qq.com/?_wv=1027&k=5OFifDh)
[![Telegram](https://img.shields.io/badge/telegram-chat-blue.svg)](https://t.me/cqhttp)
[![QQ 版本发布群](https://img.shields.io/badge/%E7%89%88%E6%9C%AC%E5%8F%91%E5%B8%83%E7%BE%A4-218529254-green.svg)](https://jq.qq.com/?_wv=1027&k=5Nl0zhE)
[![Telegram 版本发布频道](https://img.shields.io/badge/%E7%89%88%E6%9C%AC%E5%8F%91%E5%B8%83%E9%A2%91%E9%81%93-join-green.svg)](https://t.me/cqhttp_release)
<!-- prettier-ignore-start -->
<!-- markdownlint-disable-next-line MD036 -->
_✨ 跨平台 Python 异步机器人框架 ✨_
<!-- prettier-ignore-end -->
</div>
<p align="center">
<a href="https://raw.githubusercontent.com/nonebot/nonebot2/master/LICENSE">
<img src="https://img.shields.io/github/license/nonebot/nonebot2" alt="license">
</a>
<a href="https://pypi.python.org/pypi/nonebot2">
<img src="https://img.shields.io/pypi/v/nonebot2" alt="pypi">
</a>
<img src="https://img.shields.io/badge/python-3.7.3+-blue" alt="python">
<a href="https://codecov.io/gh/nonebot/nonebot2">
<img src="https://codecov.io/gh/nonebot/nonebot2/branch/master/graph/badge.svg?token=2P0G0VS7N4" alt="codecov"/>
</a>
<a href="https://github.com/nonebot/nonebot2/actions/workflows/website-deploy.yml">
<img src="https://github.com/nonebot/nonebot2/actions/workflows/website-deploy.yml/badge.svg?branch=master&event=push" alt="site"/>
</a>
<a href="https://results.pre-commit.ci/latest/github/nonebot/nonebot2/master">
<img src="https://results.pre-commit.ci/badge/github/nonebot/nonebot2/master.svg" />
</a>
<br />
<a href="https://onebot.dev/">
<img src="https://img.shields.io/badge/OneBot-v11-black?style=social&logo=data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABABAMAAABYR2ztAAAAIVBMVEUAAAAAAAADAwMHBwceHh4UFBQNDQ0ZGRkoKCgvLy8iIiLWSdWYAAAAAXRSTlMAQObYZgAAAQVJREFUSMftlM0RgjAQhV+0ATYK6i1Xb+iMd0qgBEqgBEuwBOxU2QDKsjvojQPvkJ/ZL5sXkgWrFirK4MibYUdE3OR2nEpuKz1/q8CdNxNQgthZCXYVLjyoDQftaKuniHHWRnPh2GCUetR2/9HsMAXyUT4/3UHwtQT2AggSCGKeSAsFnxBIOuAggdh3AKTL7pDuCyABcMb0aQP7aM4AnAbc/wHwA5D2wDHTTe56gIIOUA/4YYV2e1sg713PXdZJAuncdZMAGkAukU9OAn40O849+0ornPwT93rphWF0mgAbauUrEOthlX8Zu7P5A6kZyKCJy75hhw1Mgr9RAUvX7A3csGqZegEdniCx30c3agAAAABJRU5ErkJggg==" alt="cqhttp">
</a>
<a href="https://ding-doc.dingtalk.com/document#/org-dev-guide/elzz1p">
<img src="https://img.shields.io/badge/%E9%92%89%E9%92%89-Bot-lightgrey?style=social&logo=data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAMAAACdt4HsAAAAnFBMVEUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD4jUzeAAAAM3RSTlMAQKSRaA+/f0YyFevh29R3cyklIfrlyrGsn41tVUs48c/HqJm9uZdhX1otGwkF9IN8V1CX0Q+IAAABY0lEQVRYw+3V2W7CMBAF0JuNQAhhX9OEfYdu9///rUVWpagE27Ef2gfO+0zGozsKnv6bMGzAhkNytIe5gDdzrwtTCwrbI8x4/NF668NAxgI3Q3UtFi3TyPwNQtPLUUmDd8YfqGLNe4v22XwEYb5zoOuF5baHq2UHtsKe5ivWfGAwrWu2mC34QM0PoCAuqZdOmiwV+5BLyMRtZ7dTSEcs48rzWfzwptMLyzpApka1SJ5FtR4kfCqNIBPEVDmqoqgwUYY5plQOlf6UEjNoOPnuKB6wzDyCrks///TDza8+PnR109WQdxLo8RKWq0PPnuXG0OXKQ6wWLFnCg75uYYbhmMIVVdQ709q33aHbGIj6Duz+2k1HQFX9VwqmY8xYsEJll2ahvhWgsjYLHFRXvIi2Qb0jzMQCzC3FAoydxCma88UCzE3JCWwkjCNYyMUCzHX4DiuTMawEwwhW6hnshPhjZzzJfAH0YacpbmRd7QAAAABJRU5ErkJggg==" alt="ding">
</a>
<a href="https://core.telegram.org/bots/api">
<img src="https://img.shields.io/badge/telegram-Bot-lightgrey?style=social&logo=telegram">
</a>
<a href="https://open.feishu.cn/document/home/index">
<img src="https://img.shields.io/badge/%E9%A3%9E%E4%B9%A6-Bot-lightgrey?style=social&logo=data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAMgAAADICAMAAACahl6sAAAAk1BMVEX///8zMzNJSUlSUlJcXFxtbW0zMzNLS0szMzMzMzNBQUGVlZUzMzM1NTU0NDQzMzMzMzM0NDQ0NDQ0NDQ3NzdDQ0M0NDQ2NjY4ODg9PT0zMzM0NDQ5OTk7OzszMzM0NDQ3NzczMzM0NDQ0NDQ0NDQ0NDQ3Nzc2NjY4ODg2NjY7Ozs0NDQ6Ojo6Ojo3Nzc4ODgzMzNGdMWJAAAAMHRSTlMD6h0TDgr8GNf0KQbvhLT45KKTmm4jwHVJLdLFQzbcjFTgzsq7rl58T2kyqD46Y1riMDRhAAAFr0lEQVR42uzZWXKiUACF4YMyqKAQhyjOc7STmLP/1bVlLukESIJ3sLGKbwFU/Q8HuIBKpVKpVCqVSqVSqVQqlUqlUvmNM10Mcfda/U6TPdw3e9lb8ayLO+bPniYu+amjNcPd8U7PFhML0RE5uCvnaY/5SVt0WFvckcu0vxjiYmDxbu5cl2mn9UVHRMa4B2LaP3RYKD1vL6adccRFLSLL/izxxbRz7UXHimdLlFdq2mlvnztYRznZh96cP3G/dkxQRrOnR5c/c5eiQ+S2UTbe/sHir9zD1w6+okz8aXvMItyRqE46ApSHmHYRYdLRoPCMcrAP3TkLC6fpDp5QAn/EtItqij3UG/zgQZH5aWc7ZqJjzA9jKFGf9ppXC3I6uMB/Mzh2mpQQ/Mnp4BSy1Kctx4pFx5qfhA4kqE87pCyrldfBDm6sLqat2mGnttXHDfkvYtryooHo2PCrFm5lcNw1qWr1XUeEm7BH3QYVRJNGcOmoietNmNKDWeKFnCo6b3Wc1drW/NsOLpFRqmmT4xgfPFw42Q7XhkFi2kq2DtKcR2Y8wpTacRdQ3aZYB59ggiOmrS6sFevgDNr9GW6pzRAZdsQsC3rV3x4i6uQha8+sB2h9am9c6rVBDj9ixr5k007rIs+CGV65pl3wXjRi2hrKYjFtM/rI02JaW3XaPYtGtZHHY9qL0lN7QuO2yBMzpenLTvtkZNos+AY1ZcpObtoLtWmrj6TNlCOuJqZ9M3PkaDBlIBHCmwpHyHpjSgMS2ryhcIqsmsWULmR0eTPhK7LsMdMOKHdJM+nw8E+8ZoYDOT3eRDDDuz6HNt7VeszaQtYDJch+38WRZ51TDO+0Y54hylzy0XHib2JI83c0zIoLd1hAeUus1jenQe2HQ79Dg6wB3i1d/uoNpS2JrulgHWqcRxqySjoObrFjfUlLVrVrOtiGMmdCA+ZJx8hlEa9QZ2+oXcNLOkIWEUAHe22sYxqykGdoUV//5w6eoKlkTI3Gdbx7CVmQB10lDWqzSTpemyyoAW28ubYO++oOLqBPbUUtJknHrMnCRihdyaOTdAQsLHSgtSTS2BEHLK4DvQYWFW2lOtiHZi3Fko6fXCjgNVooV0nHl7tMBP1aAaXtJDvYgwGxdMmzLzu1JUyYNSU7IAwiiZ8OJrxKlTzI38QnMORFoqSn8Fh9gikvIa/UVejgDMZMQ9mOOa8WwKCRyysslF6hn2HSwZX4+ew1KGEPCSZKhoqHMw9mLd1rO8aUMYZpexbRV/2AsYBxy7/t3NtuglAQheFR6wEPVEQtaq1WxQNqnfd/urY08QJFYHZS15D9vcHckMzOz/QWA9/3jqHrbmbr1bT10a90ncQcoiclgKY/Vq81q6P2JJqfI+NHPqdDSMRzsEtIXmYGcQcQk2fwKgHxTCIVJGMWwTu6sWGxPSFx+QpkOfz3QcYEJWQhtGsbR5aKCIrHInjXNsSDeITFZ6ELYZEMAnltY8AyawKz4KJAr21IBzkRmB6LOIRGOEhIaHYsciA0uxIshwa/DLQIzrAEy2HswBIBwck9yNOvbWT4YgHEU4zbEiyHsQsXhnmKccmxp2cbxvb8CyDbMBXwD4hsw1BQguUw9s4Mk20YOTFQtmHiDJVtGJhjZRtyEVi2ITbhnLBOMd5qOvqXwz9RFy3bkJpU0LINeTCsJdvIztHVZhsJo77SbOPG6FNltpFQqMxsE7hmS+9ymJxE7XKYUGupyzZS1Kbaso00tbWybONBTadyObyjPlaVbTycRFO28Uh9oyjbEJ/E2JImnVDXy1y6zpHvW5E2npJsI5unI9vIwVe3HKYZaMg2clkoyDby6Wl5mcv0Bp9t5DVEzzZyG4JnG/kdsLONArbQ2UYRlwZwtlHIsoGbbRSdRNtymGbf0LYcpgleQbMNwdUCbcthmrP2j++VjqdSy7Isy7Isy4LxDTcBnqEPd5jdAAAAAElFTkSuQmCC" alt="feishu">
</a>
<a href="https://bot.q.qq.com/wiki/">
<img src="https://img.shields.io/badge/QQ%E9%A2%91%E9%81%93-Bot-lightgrey?style=social&logo=data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAMAAACdt4HsAAAC+lBMVEUAAAApRHRAbvYyVI4dMlsNGjcvTH5anN0/a5xdo+Vdpvpms/dMfvdcoPZjr/hJfu5krvA9Z+8/a+M9adxQjNdYmdVAbdU4XtRRjcxFd8wyVbM+aZowUJwpRJlZneRIevU5YORWl+1fqOZVle9ZnOpEdOk/aelepus/a+NQiuVKgeQ6YeRQi905X91EdtxAbthZnNlRjdk5YdpQjuhLgehhquc7Y+c6Y8k3XctWlcs0V8tJfMMzVsM9aMJVksdHebVKgLQyVJknP5REdKD///9irv9Ccf5EdP9GfP9jsf7+/f5SkP9mtf9GeP/+/vxJfv5Ukv9Ng/9boP9Gef1ls/9Ulf9Wl//+//5KgP9Nhv9dpP9Oiv9Tk/5Abv9Lg/9Fdv9NiP7///5Qj/7+/fxfpv9Nh/xhq/9QjP9Wm/79//1co/9ir/5fqf5bov9Qi//8/f1XmP1Wl/1ksv/7/v38/vv9/vlgqv9Znf9IfPzZ5fdeqP9nt/5anv5Xmf9Uk/1anvxpuf73/P34+/tot/9hrf1anvpMhvpSjv1pt/9ZnP1aofxTkfxNivza5/dOhPf+//1Ri/z+//vz+fvw9/tIf/v6/fpdofrI2PlYmfnF3Pe0y/Pm7/jW4/e0zvRapPxXlfpTkvpGevri7ffS3vVMiP5XnvxXnPtQivn3/Ph0r/dgpPZ1qfXi6/S9z/NYmf/z+v5Yn/7L2vlfmflUk/hXi/dRgvSw0fGnu+1dqP3t9Pthq/vA1vjc6vfU4vd4sfdepPdsn/dam/fU5fawzfRjjfRhi/NJhP0/a/y80fhTjfhrrfeXvvZuk/WyyPR9rvSqz/OcwfOmv/OSuPO0yfKguPCWr/BPi+9MheRKgv1gsPzq9PpgpvpVjvrN2/jG1vdonvbA0PSrx/OtxPCkxPDp8PvN4ftnuPuCufloqPiex/a3z/WPuvWQqvR2mfRplvReivSOqvOKufKGufKCrPKBoPJzlfFjr+88Ze6ftux8nOxxq/SGr/CFr/Cvx+3R19+QAAAARHRSTlMAEP4ZEwUEvC3S/v7+/Pv08PDXvJqampqSgEtJLS3f/Pz4+O/n5+bl4tTU1Lq6ure2trGdnZ2dlI6Afl5eXldMS0lJLRAR2gcAAAewSURBVFjDlZcFfBJRHMdvdnd3d3cn1qk3h4Et7EQ965h3KKgTQUGdOgYMHII6a5vO2d3d3d3d3X4+/t974A51xvfDu7vfP348HsdxR6VAulaN6lUu8SHVgQOpPpSoXK9Rq3TUf5CmSdWcB/oFcCBn1SZp/rG9aP6c/X5LzvxF/6W9Vqq2KZKq1t8sgvKT9pQt8gf9qb9QOVLWjux+K8oVSrE9bYNU7f6BVA3SpjD93O3+kdy//Ripcw34QefOnaViwM8iV+rf9Ffo7Kdr166du87vSgQGZGcIJocq/OIQlAv1EbAHDL/0hXzOhFxBP61f7vbJdJ0PFfN1RBB0MIPAUO7Alazvz+l0WY4+Pbthw4az66QG63Do6dEsuh+W9QO+//moVRet071L8phomUzBGPcGBwe3hxdmn5FVyGS0yZP0TodpHzy/kGQBygYjonUvbtpFraDwGUjYZ2JRVNSKK26+0EXjWNnkZciH26OjPy3gOZ5nVVCq+p0BzfK8wC/4FB2MLfL5+4sU7wkER7/dhN6aYxia0zKmvT0l7DUxHE1zHMcoVLJNb6ODUbB4EYpQHddcPHpXK5OpWNHp8CxbtmzmPqnBvpnLAIeTQdPT3j16EUer+yaQpT8i8pqAVi9h4cu1kZGR69bt7y9h/7p1EFz7cmEC+iTiwkgczUKmkC8ECkIs54wiI4j2j5EXQwj9QyCBNgCRIZbIj3ZRYET+nCVkP4TwKqTJHoJTXlbFscZzlv6WXr1CkpGKXhb0PozVynoj1SiTHV3lmvYC1JZnCQzNOG9a1BY1aAlKqbBYLEm8jWYSnpGypmBQTQ0sUp9iVCqr/bl60SK1UqlchIIzYCABB/BCIRR/breqVMwp9SIlUA2u39mVCPUWBlZQHz8DiT591t5euPD2WiUR6rXfiAKhnBHvhXVkrs9AGWX2dFTLGX0AZfxCTiaTHYwChTjl1LL8HZ+YccvJa52nfCL+IHyT3Lb4kVi1pAqOBPqMjPfSYHBmZBQSI6Nm0TTDXicCFCsy9HWfiDqGDPTxIzEFqTqDMVF6BTIYHEXUKhDMrMGEKddstIr2qajQYzT6sIeIrENVCsVc1VuRQeiU0FAYU4gBEkhfY5CBT4TCDJABkZWoCx0xxGB26BSspqyiFSowwAKUSNvoWUQQA1p/NRTLC9R5El+jZ5BBR9Qzffr0VbTICrNiQSC9yskKrN9g+hkoVOljp2N5njrUBdExlhj07UI4qGVZ7ePpREw/KLJa5xxfqu9sBRjMjCXJQ5SvaI3ehg0mELlz94oVu3ei3IQJE2J3eu0rdt/AAvAZoEMwp2L7Iias0aOlAYO+hHmrV89De5KVqAndicEaUhlLremOCJuHDeZ0D+v+V4jBPFK5hjrfA+E3CAvr8RfCwvwGWJ6nLmgQYTF6Gr4cZACCELN6Z+Kbr1/eJO5cHaOBBAyNpkeYZg86kWbGgAAuUBXDw8OXh4fH6BlkoNGgY43mxumkbR6HySiIomBKcHi2JZ2+odHELIdSzR5YbevMmHBMRar2EEyMXgXxOcvD4Viza88mnuNYhmNpDMMwIr9pzy4NJMOXIwMGDHBfbaog3k+LQzNgHscNmTZkSNwut0mgaQH6OK0NtmDG8yb3rrghY8YMiZuD5jozbhoSQwpShaeNAaYt3obWYIt58TQkzKe3JYisKCoUNKegwUFI8J7257agSi8SIAtT6UqPRxjc+De2axocLzYbzObjSVtX8Dyj1TICv2Jr0nEzsHLMmPFxZvS75d2GMSDGl4bbxypyuXy8wXBLUMloe6JBvtJgGB8BjitdiUfmuO/dc885kuhaaRg/fiVUwUi00zKVcAuqoLEKRVGN5UCE4bhJRdPiFrPZJZcQESEPwOUybxFpWmU6bsCZxuiyXnKEfIQ8wjWTZxSs6WRExNwRfiCByn4IOSRPwr+kit/qikChkvjmNc/Qob2HznWd5G1WgXbc2TF36A9GkI0fqLrj4AWrjT/pmju0d++heShEhqy9EUt3CwKso9F75OHSHTuWLp3bW8LcpSj28IjXCCsoCLuv4GjWDBSm5sCBSG6/zMNJDldjh2fBggVbEwdicOXAz1sh5HHwrBbON3bTdpKoCc1kCrg00xMHzICzwanD0VrTkoESlpi06L/dZuMUMoXjSaaNKIgmQMgzFti48corj1aEk88KJwpjXDJWwhIjSysUVi0HJ4bn1ZWNG1EwT/ItTpnhhCVuO8sKCjDgjNuHSwAD9M8lsJzdvcQXKyO502ueaTQwaNDmza/dl50+g9EStsMMwMB52f168+bho4dDKFNzSkKBQX4mH37w6MT69etPHCaacBiHHj04PHnQoNGkrkDgjWb6NslMJrSRhjZPHhQYSp+WCiCoWHJu2LBhl2BIDSASGMoY9MvNdjFfKUA2RCRHpQbFfne7nrHDqA4dOozCG/Qie6mAQURG6P+VoPS4DED7wONAkT4ohUeeAtm6/QPZCqSlUqJF+U6dOnVDA23Q/ldRvsUfH/vyZuv0R7LlDaL+TOsamSdNmjTuBwEic43W1N/JkDfH1EmIqT78xznyZvjXh+9m6XNM/Ikc6Zulof6DdIUb1s1Y6n3m+/czvy+VsW7Dwik9/n8HzjZEy9x05tIAAAAASUVORK5CYII=" alt="QQ频道">
</a>
<br />
<a href="https://jq.qq.com/?_wv=1027&k=5OFifDh">
<img src="https://img.shields.io/badge/QQ%E7%BE%A4-768887710-orange?style=flat-square" alt="QQ Chat Group">
</a>
<a href="https://qun.qq.com/qqweb/qunpro/share?_wv=3&_wwv=128&appChannel=share&inviteCode=7b4a3&appChannel=share&businessType=9&from=246610&biz=ka">
<img src="https://img.shields.io/badge/QQ%E9%A2%91%E9%81%93-NoneBot-5492ff?style=flat-square" alt="QQ Channel">
</a>
<a href="https://t.me/botuniverse">
<img src="https://img.shields.io/badge/telegram-botuniverse-blue?style=flat-square" alt="Telegram Channel">
</a>
<a href="https://discord.gg/VKtE6Gdc4h">
<img src="https://discordapp.com/api/guilds/847819937858584596/widget.png?style=shield" alt="Discord Server">
</a>
</p>
<p align="center">
<a href="https://v2.nonebot.dev/">文档</a>
·
<a href="https://v2.nonebot.dev/docs/start/installation">安装</a>
·
<a href="https://v2.nonebot.dev/docs/tutorial/create-project">开始使用</a>
·
<a href="#插件">文档打不开?</a>
</p>
<p align="center">
<a href="https://asciinema.org/a/464654">
<img src="https://v2.nonebot.dev/img/setup.svg">
</a>
</p>
## 简介
NoneBot2 是一个可扩展的 Python 异步机器人框架,它会对机器人收到的消息进行解析和处理,并以插件化的形式,分发给消息所对应的命令处理器和自然语言处理器,来完成具体的功能
NoneBot2 是一个现代、跨平台、可扩展的 Python 聊天机器人框架,它基于 Python 的类型注解和异步特性,能够为你的需求实现提供便捷灵活的支持
除了起到解析消息的作用NoneBot 还为插件提供了大量实用的预设操作和权限控制机制,尤其对于命令处理器,它更是提供了完善且易用的会话机制和内部调用机制,以分别适应命令的连续交互和插件内部功能复用等需求。
## 特色
目前 NoneBot2 在 [FastAPI](https://fastapi.tiangolo.com/) 的基础上封装了与 [CQHTTP(OneBot) 协议](http://cqhttp.cc/)插件的网络交互。
- 异步优先:基于 Python 的异步特性,即使是~~非常~~大量的消息,也能吞吐自如
- 易于开发:配合 NB-CLI 脚手架,代码编写上手简单,没有过多的冗余代码,可以让开发者专注于业务逻辑
- 生而可靠100% 类型注解覆盖,配合编辑器的类型推导功能,能将绝大多数的 Bug 杜绝在编辑器中 ([编辑器支持](https://v2.nonebot.dev/docs/start/editor-support))
- 社区丰富:社区用户众多,直接和间接用户超过十万人,每天都有大量的活跃用户 ([社区资源](#社区资源))
- 海纳百川:一个框架,支持多个聊天软件平台,可自定义通信协议
- [OneBot 协议](https://onebot.dev/) (QQ 等)
- [钉钉](https://ding-doc.dingtalk.com/document#/org-dev-guide/elzz1p)
- [Telegram](https://core.telegram.org/bots/api)
- [飞书](https://open.feishu.cn/document/home/index)
- [QQ 频道](https://bot.q.qq.com/wiki/)
- 坚实后盾:支持多种 web 框架,可自定义替换
- [FastAPI](https://fastapi.tiangolo.com/)
- [Quart](https://pgjones.gitlab.io/quart/) (异步 Flask)
- [aiohttp](https://docs.aiohttp.org/en/stable/)
- [httpx](https://www.python-httpx.org/)
- [websockets](https://websockets.readthedocs.io/en/stable/)
得益于 Python 的 [asyncio](https://docs.python.org/3/library/asyncio.html) 机制NoneBot 处理消息的吞吐量有了很大的保障,再配合 WebSocket 通信方式也是最建议的通信方式NoneBot 的性能可以达到 HTTP 通信方式的两倍以上,相较于传统同步 I/O 的 HTTP 通信,更是有质的飞跃。
更多:[概览](https://v2.nonebot.dev/docs/)
需要注意的是NoneBot 仅支持 Python 3.7+ 及 CQHTTP(OneBot) 插件 v11+。
## 什么不是 NoneBot2
## 文档
NoneBot2 不是某个平台或者协议的具体实现它只负责和已有协议适配器通信并处理接收到的事件。所以“NoneBot 有 blabla 平台的 blabla 功能吗?”这种问题是与 NoneBot2 无关的。请在相应平台的功能文档中确认,或与相应平台的协议适配开发者联系。
文档目前尚未完成「API」部分由 sphinx 自动生成,你可以在 [这里](https://v2.nonebot.dev/) 查看
NoneBot2 不是 NoneBot1 的替代品。事实上,它们都在被积极的维护着。但是,如果你想尝试一些新功能,或者想要支持更多的平台,可以考虑使用 NoneBot2
> ~~NoneBot2 和 NoneBot1 的区别,就像是 VisualStudio Code 和 VisualStudio 一样~~
## 即刻开始
~~完整~~文档可以在 [这里](https://v2.nonebot.dev/) 查看。
懒得看文档?下面是快速安装指南:
1. (**强烈建议**)使用你喜欢的 Python 环境管理工具创建新的虚拟环境。
2. 使用 `pip` (或其他) 安装 NoneBot 脚手架。
```bash
pip install nb-cli
```
3. 使用脚手架创建项目
```bash
nb create
```
## 社区资源
### 常见问题
- [常见问题解答(FAQ)](https://faq.nonebot.dev/)
- [论坛(Discussion)](https://discussions.nonebot.dev/)
### 教程/实际项目/经验分享
- [awesome-nonebot](https://github.com/nonebot/awesome-nonebot)
### 插件
此外NoneBot2 还有丰富的官方以及第三方现成的插件供大家使用:
- [NoneBot-Plugin-Docs](https://github.com/nonebot/nonebot2/tree/master/packages/nonebot-plugin-docs):离线文档至本地项目使用 (别再说文档打不开了!)
在项目目录下执行:
```bash
nb plugin install nonebot_plugin_docs
```
或者尝试以下镜像:
- [文档镜像(中国境内)](https://nb2.baka.icu)
- [文档镜像(Vercel)](https://nonebot2-vercel-mirror.vercel.app)
- 其他插件请查看 [商店](https://v2.nonebot.dev/store)
## 许可证
`NoneBot` 采用 `MIT` 许可证进行开源
```text
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](https://github.com/nonebot/nonebot2/issues/new) 或自行 fork 修改后提交 pull request。
请参考 [贡献指南](./CONTRIBUTING.md)
如果你要提交 pull request请确保你的代码风格和项目已有的代码保持一致遵循 [PEP 8](https://www.python.org/dev/peps/pep-0008/),变量命名清晰,有适当的注释。
### 鸣谢
感谢以下开发者对 NoneBot2 作出的贡献:
<a href="https://github.com/nonebot/nonebot2/graphs/contributors">
<img src="https://contrib.rocks/image?repo=nonebot/nonebot2" />
</a>

View File

@@ -1,15 +0,0 @@
---
home: true
heroImage: /logo.png
tagline: An asynchronous QQ bot framework.
actionText: 开始使用
actionLink: /guide/
features:
- title: 简洁
details: 提供极其简洁易懂的 API使你可以毫无压力地开始验证你的绝佳创意只需编写最少量的代码即可实现丰富的功能。
- title: 易于扩展
details: 精心设计的消息处理流程使得你可以很方便地将原型扩充为具有大量实用功能的完整聊天机器人,并持续保证扩展性。
- title: 高性能
details: 采用异步 I/O利用 WebSocket 进行通信,以获得极高的性能;同时,支持使用多账号同时接入,减少业务宕机的可能。
footer: MIT Licensed | Copyright © 2020 NoneBot Team
---

View File

@@ -1,46 +0,0 @@
# NoneBot Api Reference
* **模块索引**
* [nonebot](nonebot.html)
* [nonebot.config](config.html)
* [nonebot.matcher](matcher.html)
* [nonebot.rule](rule.html)
* [nonebot.permission](permission.html)
* [nonebot.sched](sched.html)
* [nonebot.log](log.html)
* [nonebot.utils](utils.html)
* [nonebot.typing](typing.html)
* [nonebot.exception](exception.html)
* [nonebot.drivers](drivers/)
* [nonebot.drivers.fastapi](drivers/fastapi.html)
* [nonebot.adapters](adapters/)
* [nonebot.adapters.cqhttp](adapters/cqhttp.html)

View File

@@ -1,323 +0,0 @@
---
contentSidebar: true
sidebarDepth: 0
---
# NoneBot.adapters 模块
## 协议适配基类
各协议请继承以下基类,并使用 `driver.register_adapter` 注册适配器
## _class_ `BaseBot`
基类:`abc.ABC`
Bot 基类。用于处理上报消息,并提供 API 调用接口。
### _abstract_ `__init__(driver, connection_type, config, self_id, *, websocket=None)`
* **参数**
* `driver: Driver`: Driver 对象
* `connection_type: str`: http 或者 websocket
* `config: Config`: Config 对象
* `self_id: str`: 机器人 ID
* `websocket: Optional[WebSocket]`: Websocket 连接对象
### `driver`
Driver 对象
### `connection_type`
连接类型
### `config`
Config 配置对象
### `self_id`
机器人 ID
### `websocket`
Websocket 连接对象
### _abstract property_ `type`
Adapter 类型
### _abstract async_ `handle_message(message)`
* **说明**
处理上报消息的函数,转换为 `Event` 事件后调用 `nonebot.message.handle_event` 进一步处理事件。
* **参数**
* `message: dict`: 收到的上报消息
### _abstract async_ `call_api(api, **data)`
* **说明**
调用机器人 API 接口,可以通过该函数或直接通过 bot 属性进行调用
* **参数**
* `api: str`: API 名称
* `**data`: API 数据
* **示例**
```python
await bot.call_api("send_msg", data={"message": "hello world"})
await bot.send_msg(message="hello world")
```
### _abstract async_ `send(event, message, **kwargs)`
* **说明**
调用机器人基础发送消息接口
* **参数**
* `event: Event`: 上报事件
* `message: Union[str, Message, MessageSegment]`: 要发送的消息
* `**kwargs`
## _class_ `BaseEvent`
基类:`abc.ABC`
Event 基类。提供上报信息的关键信息,其余信息可从原始上报消息获取。
### `__init__(raw_event)`
* **参数**
* `raw_event: dict`: 原始上报消息
### _property_ `raw_event`
原始上报消息
### _abstract property_ `id`
事件 ID
### _abstract property_ `name`
事件名称
### _abstract property_ `self_id`
机器人 ID
### _abstract property_ `time`
事件发生时间
### _abstract property_ `type`
事件主类型
### _abstract property_ `detail_type`
事件详细类型
### _abstract property_ `sub_type`
事件子类型
### _abstract property_ `user_id`
触发事件的主体 ID
### _abstract property_ `group_id`
触发事件的主体群 ID
### _abstract property_ `to_me`
事件是否为发送给机器人的消息
### _abstract property_ `message`
消息内容
### _abstract property_ `reply`
回复的消息
### _abstract property_ `raw_message`
原始消息
### _abstract property_ `plain_text`
纯文本消息
### _abstract property_ `sender`
消息发送者信息
## _class_ `BaseMessageSegment`
基类:`abc.ABC`
消息段基类
### `type`
* 类型: `str`
* 说明: 消息段类型
### `data`
* 类型: `Dict[str, Union[str, list]]`
* 说明: 消息段数据
## _class_ `BaseMessage`
基类:`list`, `abc.ABC`
消息数组
### `__init__(message=None, *args, **kwargs)`
* **参数**
* `message: Union[str, dict, list, MessageSegment, Message]`: 消息内容
### `append(obj)`
* **说明**
添加一个消息段到消息数组末尾
* **参数**
* `obj: Union[str, MessageSegment]`: 要添加的消息段
### `extend(obj)`
* **说明**
拼接一个消息数组或多个消息段到消息数组末尾
* **参数**
* `obj: Union[Message, Iterable[MessageSegment]]`: 要添加的消息数组
### `reduce()`
* **说明**
缩减消息数组,即拼接相邻纯文本消息段
### `extract_plain_text()`
* **说明**
提取消息内纯文本消息

View File

@@ -1,411 +0,0 @@
---
contentSidebar: true
sidebarDepth: 0
---
# NoneBot.adapters.cqhttp 模块
## CQHTTP (OneBot) v11 协议适配
协议详情请看: [CQHTTP](http://cqhttp.cc/) | [OneBot](https://github.com/howmanybots/onebot)
## `log(level, message)`
* **说明**
用于打印 CQHTTP 日志。
* **参数**
* `level: str`: 日志等级
* `message: str`: 日志信息
## `escape(s, *, escape_comma=True)`
* **说明**
对字符串进行 CQ 码转义。
* **参数**
* `s: str`: 需要转义的字符串
* `escape_comma: bool`: 是否转义逗号(`,`)。
## `unescape(s)`
* **说明**
对字符串进行 CQ 码去转义。
* **参数**
* `s: str`: 需要转义的字符串
## `_b2s(b)`
转换布尔值为字符串。
## _async_ `_check_reply(bot, event)`
* **说明**
检查消息中存在的回复,去除并赋值 `event.reply`, `event.to_me`
* **参数**
* `bot: Bot`: Bot 对象
* `event: Event`: Event 对象
## `_check_at_me(bot, event)`
* **说明**
检查消息开头或结尾是否存在 @机器人,去除并赋值 `event.to_me`
* **参数**
* `bot: Bot`: Bot 对象
* `event: Event`: Event 对象
## `_check_nickname(bot, event)`
* **说明**
检查消息开头是否存在,去除并赋值 `event.to_me`
* **参数**
* `bot: Bot`: Bot 对象
* `event: Event`: Event 对象
## `_handle_api_result(result)`
* **说明**
处理 API 请求返回值。
* **参数**
* `result: Optional[Dict[str, Any]]`: API 返回数据
* **返回**
* `Any`: API 调用返回数据
* **异常**
* `ActionFailed`: API 调用失败
## _class_ `Bot`
基类:[`nonebot.adapters.BaseBot`](#None)
CQHTTP 协议 Bot 适配。继承属性参考 [BaseBot](./#class-basebot) 。
### _property_ `type`
* 返回: `"cqhttp"`
### _async_ `handle_message(message)`
* **说明**
调用 [_check_reply](#async-check-reply-bot-event), [_check_at_me](#check-at-me-bot-event), [_check_nickname](#check-nickname-bot-event) 处理事件并转换为 [Event](#class-event)
### _async_ `call_api(api, **data)`
* **说明**
调用 CQHTTP 协议 API
* **参数**
* `api: str`: API 名称
* `**data: Any`: API 参数
* **返回**
* `Any`: API 调用返回数据
* **异常**
* `NetworkError`: 网络错误
* `ActionFailed`: API 调用失败
### _async_ `send(event, message, at_sender=False, **kwargs)`
* **说明**
根据 `event` 向触发事件的主体发送消息。
* **参数**
* `event: Event`: Event 对象
* `message: Union[str, Message, MessageSegment]`: 要发送的消息
* `at_sender: bool`: 是否 @ 事件主体
* `**kwargs`: 覆盖默认参数
* **返回**
* `Any`: API 调用返回数据
* **异常**
* `ValueError`: 缺少 `user_id`, `group_id`
* `NetworkError`: 网络错误
* `ActionFailed`: API 调用失败
## _class_ `Event`
基类:[`nonebot.adapters.BaseEvent`](#None)
CQHTTP 协议 Event 适配。继承属性参考 [BaseEvent](./#class-baseevent) 。
### _property_ `id`
* 类型: `Optional[int]`
* 说明: 事件/消息 ID
### _property_ `name`
* 类型: `str`
* 说明: 事件名称,由类型与 `.` 组合而成
### _property_ `self_id`
* 类型: `str`
* 说明: 机器人自身 ID
### _property_ `time`
* 类型: `int`
* 说明: 事件发生时间
### _property_ `type`
* 类型: `str`
* 说明: 事件类型
### _property_ `detail_type`
* 类型: `str`
* 说明: 事件详细类型
### _property_ `sub_type`
* 类型: `Optional[str]`
* 说明: 事件子类型
### _property_ `user_id`
* 类型: `Optional[int]`
* 说明: 事件主体 ID
### _property_ `group_id`
* 类型: `Optional[int]`
* 说明: 事件主体群 ID
### _property_ `to_me`
* 类型: `Optional[bool]`
* 说明: 消息是否与机器人相关
### _property_ `message`
* 类型: `Optional[Message]`
* 说明: 消息内容
### _property_ `reply`
* 类型: `Optional[dict]`
* 说明: 回复消息详情
### _property_ `raw_message`
* 类型: `Optional[str]`
* 说明: 原始消息
### _property_ `plain_text`
* 类型: `Optional[str]`
* 说明: 纯文本消息内容
### _property_ `sender`
* 类型: `Optional[dict]`
* 说明: 消息发送者信息
## _class_ `MessageSegment`
基类:[`nonebot.adapters.BaseMessageSegment`](#None)
## _class_ `Message`
基类:[`nonebot.adapters.BaseMessage`](#None)

View File

@@ -1,265 +0,0 @@
---
contentSidebar: true
sidebarDepth: 0
---
# NoneBot.config 模块
## 配置
NoneBot 使用 [pydantic](https://pydantic-docs.helpmanual.io/) 以及 [python-dotenv](https://saurabh-kumar.com/python-dotenv/) 来读取配置。
配置项需符合特殊格式或 json 序列化格式。详情见 [pydantic Field Type](https://pydantic-docs.helpmanual.io/usage/types/) 文档。
## _class_ `Env`
基类:`pydantic.env_settings.BaseSettings`
运行环境配置。大小写不敏感。
将会从 `nonebot.init 参数` > `环境变量` > `.env 环境配置文件` 的优先级读取配置。
### `environment`
* 类型: `str`
* 默认值: `"prod"`
* 说明:
当前环境名。 NoneBot 将从 `.env.{environment}` 文件中加载配置。
## _class_ `Config`
基类:`nonebot.config.BaseConfig`
NoneBot 主要配置。大小写不敏感。
除了 NoneBot 的配置项外,还可以自行添加配置项到 `.env.{environment}` 文件中。
这些配置将会在 json 反序列化后一起带入 `Config` 类中。
### `driver`
* 类型: `str`
* 默认值: `"nonebot.drivers.fastapi"`
* 说明:
NoneBot 运行所使用的 `Driver` 。继承自 `nonebot.driver.BaseDriver`
### `host`
* 类型: `IPvAnyAddress`
* 默认值: `127.0.0.1`
* 说明:
NoneBot 的 HTTP 和 WebSocket 服务端监听的 IP/主机名。
### `port`
* 类型: `int`
* 默认值: `8080`
* 说明:
NoneBot 的 HTTP 和 WebSocket 服务端监听的端口。
### `debug`
* 类型: `bool`
* 默认值: `False`
* 说明:
是否以调试模式运行 NoneBot。
### `api_root`
* 类型: `Dict[str, str]`
* 默认值: `{}`
* 说明:
以机器人 ID 为键,上报地址为值的字典,环境变量或文件中应使用 json 序列化。
* 示例:
```default
API_ROOT={"123456": "http://127.0.0.1:5700"}
```
### `api_timeout`
* 类型: `Optional[float]`
* 默认值: `30.`
* 说明:
API 请求超时时间,单位: 秒。
### `access_token`
* 类型: `Optional[str]`
* 默认值: `None`
* 说明:
API 请求以及上报所需密钥,在请求头中携带。
* 示例:
```http
POST /cqhttp/ HTTP/1.1
Authorization: Bearer kSLuTF2GC2Q4q4ugm3
```
### `secret`
* 类型: `Optional[str]`
* 默认值: `None`
* 说明:
HTTP POST 形式上报所需签名,在请求头中携带。
* 示例:
```http
POST /cqhttp/ HTTP/1.1
X-Signature: sha1=f9ddd4863ace61e64f462d41ca311e3d2c1176e2
```
### `superusers`
* 类型: `Set[int]`
* 默认值: `set()`
* 说明:
机器人超级用户。
* 示例:
```default
SUPER_USERS=[12345789]
```
### `nickname`
* 类型: `Set[str]`
* 默认值: `set()`
* 说明:
机器人昵称。
### `command_start`
* 类型: `Set[str]`
* 默认值: `{"/"}`
* 说明:
命令的起始标记,用于判断一条消息是不是命令。
### `command_sep`
* 类型: `Set[str]`
* 默认值: `{"."}`
* 说明:
命令的分隔标记,用于将文本形式的命令切分为元组(实际的命令名)。
### `session_expire_timeout`
* 类型: `timedelta`
* 默认值: `timedelta(minutes=2)`
* 说明:
等待用户回复的超时时间。
* 示例:
```default
SESSION_EXPIRE_TIMEOUT=120 # 单位: 秒
SESSION_EXPIRE_TIMEOUT=[DD ][HH:MM]SS[.ffffff]
SESSION_EXPIRE_TIMEOUT=P[DD]DT[HH]H[MM]M[SS]S # ISO 8601
```
### `apscheduler_config`
* 类型: `dict`
* 默认值: `{"apscheduler.timezone": "Asia/Shanghai"}`
* 说明:
APScheduler 的配置对象,见 [Configuring the Scheduler](https://apscheduler.readthedocs.io/en/latest/userguide.html#configuring-the-scheduler)

View File

@@ -1,37 +0,0 @@
---
contentSidebar: true
sidebarDepth: 0
---
# NoneBot.drivers 模块
## 后端驱动适配基类
各驱动请继承以下基类
## _class_ `BaseDriver`
基类:`abc.ABC`
Driver 基类。将后端框架封装,以满足适配器使用。
### `_adapters`
* **类型**
`Dict[str, Type[Bot]]`
* **说明**
已注册的适配器列表
### _abstract_ `__init__(env, config)`
Initialize self. See help(type(self)) for accurate signature.

View File

@@ -1,16 +0,0 @@
---
contentSidebar: true
sidebarDepth: 0
---
# NoneBot.drivers.fastapi 模块
## _class_ `Driver`
基类:[`nonebot.drivers.BaseDriver`](#None)
### `__init__(env, config)`
Initialize self. See help(type(self)) for accurate signature.

View File

@@ -1,156 +0,0 @@
---
contentSidebar: true
sidebarDepth: 0
---
# NoneBot.exception 模块
## 异常
下列文档中的异常是所有 NoneBot 运行时可能会抛出的。
这些异常并非所有需要用户处理,在 NoneBot 内部运行时被捕获,并进行对应操作。
## _exception_ `IgnoredException`
基类:`Exception`
* **说明**
指示 NoneBot 应该忽略该事件。可由 PreProcessor 抛出。
* **参数**
* `reason`: 忽略事件的原因
## _exception_ `PausedException`
基类:`Exception`
* **说明**
指示 NoneBot 结束当前 `Handler` 并等待下一条消息后继续下一个 `Handler`
可用于用户输入新信息。
* **用法**
可以在 `Handler` 中通过 `Matcher.pause()` 抛出。
## _exception_ `RejectedException`
基类:`Exception`
* **说明**
指示 NoneBot 结束当前 `Handler` 并等待下一条消息后重新运行当前 `Handler`
可用于用户重新输入。
* **用法**
可以在 `Handler` 中通过 `Matcher.reject()` 抛出。
## _exception_ `FinishedException`
基类:`Exception`
* **说明**
指示 NoneBot 结束当前 `Handler` 且后续 `Handler` 不再被运行。
可用于结束用户会话。
* **用法**
可以在 `Handler` 中通过 `Matcher.finish()` 抛出。
## _exception_ `ExpiredException`
基类:`Exception`
* **说明**
指示 NoneBot 当前 `Matcher` 已失效。
* **用法**
`Matcher` 运行前检查时抛出。
## _exception_ `StopPropagation`
基类:`Exception`
* **说明**
指示 NoneBot 终止事件向下层传播。
* **用法**
`Matcher.block == True` 时抛出。
## _exception_ `ApiNotAvailable`
基类:`Exception`
* **说明**
在 API 连接不可用时抛出。
## _exception_ `NetworkError`
基类:`Exception`
* **说明**
在网络出现问题时抛出,如: API 请求地址不正确, API 请求无返回或返回状态非正常等。
## _exception_ `ActionFailed`
基类:`Exception`
* **说明**
API 请求成功返回数据,但 API 操作失败。
* **参数**
* `retcode`: 错误代码

View File

@@ -1,55 +0,0 @@
---
contentSidebar: true
sidebarDepth: 0
---
# NoneBot.log 模块
## 日志
NoneBot 使用 [loguru](https://github.com/Delgan/loguru) 来记录日志信息。
自定义 logger 请参考 [loguru](https://github.com/Delgan/loguru) 文档。
## `logger`
* **说明**
NoneBot 日志记录器对象。
* **默认信息**
* 格式: `[%(asctime)s %(name)s] %(levelname)s: %(message)s`
* 等级: `DEBUG` / `INFO` ,根据 config 配置改变
* 输出: 输出至 stdout
* **用法**
```python
from nonebot.log import logger
```
## _class_ `LoguruHandler`
基类:`logging.Handler`
### `emit(record)`
Do whatever it takes to actually log the specified logging record.
This version is intended to be implemented by subclasses and so
raises a NotImplementedError.

View File

@@ -1,485 +0,0 @@
---
contentSidebar: true
sidebarDepth: 0
---
# NoneBot.matcher 模块
## 事件响应器
该模块实现事件响应器的创建与运行,并提供一些快捷方法来帮助用户更好的与机器人进行 对话 。
## `matchers`
* **类型**
`Dict[int, List[Type[Matcher]]]`
* **说明**
用于存储当前所有的事件响应器
## _class_ `Matcher`
基类:`object`
事件响应器类
### `module`
* **类型**
`Optional[str]`
* **说明**
事件响应器所在模块名称
### `type`
* **类型**
`str`
* **说明**
事件响应器类型
### `rule`
* **类型**
`Rule`
* **说明**
事件响应器匹配规则
### `permission`
* **类型**
`Permission`
* **说明**
事件响应器触发权限
### `priority`
* **类型**
`int`
* **说明**
事件响应器优先级
### `block`
* **类型**
`bool`
* **说明**
事件响应器是否阻止事件传播
### `temp`
* **类型**
`bool`
* **说明**
事件响应器是否为临时
### `expire_time`
* **类型**
`Optional[datetime]`
* **说明**
事件响应器过期时间点
### `_default_state`
* **类型**
`dict`
* **说明**
事件响应器默认状态
### `_default_parser`
* **类型**
`Optional[ArgsParser]`
* **说明**
事件响应器默认参数解析函数
### `__init__()`
实例化 Matcher 以便运行
### `handlers`
* **类型**
`List[Handler]`
* **说明**
事件响应器拥有的事件处理函数列表
### _classmethod_ `new(type_='', rule=None, permission=None, handlers=None, temp=False, priority=1, block=False, *, module=None, default_state=None, expire_time=None)`
* **说明**
创建一个新的事件响应器,并存储至 [matchers](#matchers)
* **参数**
* `type_: str`: 事件响应器类型,与 `event.type` 一致时触发,空字符串表示任意
* `rule: Optional[Rule]`: 匹配规则
* `permission: Optional[Permission]`: 权限
* `handlers: Optional[List[Handler]]`: 事件处理函数列表
* `temp: bool`: 是否为临时事件响应器,即触发一次后删除
* `priority: int`: 响应优先级
* `block: bool`: 是否阻止事件向更低优先级的响应器传播
* `module: Optional[str]`: 事件响应器所在模块名称
* `default_state: Optional[dict]`: 默认状态 `state`
* `expire_time: Optional[datetime]`: 事件响应器最终有效时间点,过时即被删除
* **返回**
* `Type[Matcher]`: 新的事件响应器类
### _async classmethod_ `check_perm(bot, event)`
* **说明**
检查是否满足触发权限
* **参数**
* `bot: Bot`: Bot 对象
* `event: Event`: 上报事件
* **返回**
* `bool`: 是否满足权限
### _async classmethod_ `check_rule(bot, event, state)`
* **说明**
检查是否满足匹配规则
* **参数**
* `bot: Bot`: Bot 对象
* `event: Event`: 上报事件
* `state: dict`: 当前状态
* **返回**
* `bool`: 是否满足匹配规则
### _classmethod_ `args_parser(func)`
* **说明**
装饰一个函数来更改当前事件响应器的默认参数解析函数
* **参数**
* `func: ArgsParser`: 参数解析函数
### _classmethod_ `handle()`
* **说明**
装饰一个函数来向事件响应器直接添加一个处理函数
* **参数**
*
### _classmethod_ `receive()`
* **说明**
装饰一个函数来指示 NoneBot 在接收用户新的一条消息后继续运行该函数
* **参数**
*
### _classmethod_ `got(key, prompt=None, args_parser=None)`
* **说明**
装饰一个函数来指示 NoneBot 当要获取的 `key` 不存在时接收用户新的一条消息并经过 `ArgsParser` 处理后再运行该函数,如果 `key` 已存在则直接继续运行
* **参数**
* `key: str`: 参数名
* `prompt: Optional[Union[str, Message, MessageSegment]]`: 在参数不存在时向用户发送的消息
* `args_parser: Optional[ArgsParser]`: 可选参数解析函数,空则使用默认解析函数
### _async classmethod_ `send(message)`
* **说明**
发送一条消息给当前交互用户
* **参数**
* `message: Union[str, Message, MessageSegment]`: 消息内容
### _async classmethod_ `finish(message=None)`
* **说明**
发送一条消息给当前交互用户并结束当前事件响应器
* **参数**
* `message: Union[str, Message, MessageSegment]`: 消息内容
### _async classmethod_ `pause(prompt=None)`
* **说明**
发送一条消息给当前交互用户并暂停事件响应器,在接收用户新的一条消息后继续下一个处理函数
* **参数**
* `prompt: Union[str, Message, MessageSegment]`: 消息内容
### _async classmethod_ `reject(prompt=None)`
* **说明**
发送一条消息给当前交互用户并暂停事件响应器,在接收用户新的一条消息后重新运行当前处理函数
* **参数**
* `prompt: Union[str, Message, MessageSegment]`: 消息内容
## _class_ `MatcherGroup`
基类:`object`
事件响应器组合,统一管理。用法同 `Matcher`
### `__init__(type_='', rule=None, permission=None, handlers=None, temp=False, priority=1, block=False, *, module=None, default_state=None, expire_time=None)`
* **说明**
创建一个事件响应器组合,参数为默认值,与 `Matcher.new` 一致
### `matchers`
* **类型**
`List[Type[Matcher]]`
* **说明**
组内事件响应器列表
### `new(type_='', rule=None, permission=None, handlers=None, temp=False, priority=1, block=False, *, module=None, default_state=None, expire_time=None)`
* **说明**
在组中创建一个新的事件响应器,参数留空则使用组合默认值
:::danger 警告
如果使用 handlers 参数覆盖组合默认值则该事件响应器不会随组合一起添加新的事件处理函数
:::

View File

@@ -1,257 +0,0 @@
---
contentSidebar: true
sidebarDepth: 0
---
# NoneBot 模块
## 快捷导入
为方便使用,`nonebot` 模块从子模块导入了部分内容
* `on_message` => `nonebot.plugin.on_message`
* `on_notice` => `nonebot.plugin.on_notice`
* `on_request` => `nonebot.plugin.on_request`
* `on_metaevent` => `nonebot.plugin.on_metaevent`
* `on_startswith` => `nonebot.plugin.on_startswith`
* `on_endswith` => `nonebot.plugin.on_endswith`
* `on_command` => `nonebot.plugin.on_command`
* `on_regex` => `nonebot.plugin.on_regex`
* `on_regex` => `nonebot.plugin.on_regex`
* `on_regex` => `nonebot.plugin.on_regex`
* `CommandGroup` => `nonebot.plugin.CommandGroup`
* `load_plugin` => `nonebot.plugin.load_plugin`
* `load_plugins` => `nonebot.plugin.load_plugins`
* `load_builtin_plugins` => `nonebot.plugin.load_builtin_plugins`
* `get_loaded_plugins` => `nonebot.plugin.get_loaded_plugins`
## `get_driver()`
* **说明**
获取全局 Driver 对象。可用于在计划任务的回调中获取当前 Driver 对象。
* **返回**
* `Driver`: 全局 Driver 对象
* **异常**
* `ValueError`: 全局 Driver 对象尚未初始化 (nonebot.init 尚未调用)
* **用法**
```python
driver = nonebot.get_driver()
```
## `get_app()`
* **说明**
获取全局 Driver 对应 Server App 对象。
* **返回**
* `Any`: Server App 对象
* **异常**
* `ValueError`: 全局 Driver 对象尚未初始化 (nonebot.init 尚未调用)
* **用法**
```python
app = nonebot.get_app()
```
## `get_asgi()`
* **说明**
获取全局 Driver 对应 Asgi 对象。
* **返回**
* `Any`: Asgi 对象
* **异常**
* `ValueError`: 全局 Driver 对象尚未初始化 (nonebot.init 尚未调用)
* **用法**
```python
asgi = nonebot.get_asgi()
```
## `get_bots()`
* **说明**
获取所有通过 ws 连接 NoneBot 的 Bot 对象。
* **返回**
* `Dict[str, Bot]`: 一个以字符串 ID 为键Bot 对象为值的字典
* **异常**
* `ValueError`: 全局 Driver 对象尚未初始化 (nonebot.init 尚未调用)
* **用法**
```python
bots = nonebot.get_bots()
```
## `init(*, _env_file=None, **kwargs)`
* **说明**
初始化 NoneBot 以及 全局 Driver 对象。
NoneBot 将会从 .env 文件中读取环境信息,并使用相应的 env 文件配置。
你也可以传入自定义的 _env_file 来指定 NoneBot 从该文件读取配置。
* **参数**
* `_env_file: Optional[str]`: 配置文件名,默认从 .env.{env_name} 中读取配置
* `**kwargs`: 任意变量,将会存储到 Config 对象里
* **返回**
* `None`
* **用法**
```python
nonebot.init(database=Database(...))
```
## `run(host=None, port=None, *args, **kwargs)`
* **说明**
启动 NoneBot即运行全局 Driver 对象。
* **参数**
* `host: Optional[str]`: 主机名IP若不传入则使用配置文件中指定的值
* `port: Optional[int]`: 端口,若不传入则使用配置文件中指定的值
* `*args`: 传入 Driver.run 的位置参数
* `**kwargs`: 传入 Driver.run 的命名参数
* **返回**
* `None`
* **用法**
```python
nonebot.run(host="127.0.0.1", port=8080)
```

View File

@@ -1,121 +0,0 @@
---
contentSidebar: true
sidebarDepth: 0
---
# NoneBot.permission 模块
## 权限
每个 `Matcher` 拥有一个 `Permission` ,其中是 **异步** `PermissionChecker` 的集合,只要有一个 `PermissionChecker` 检查结果为 `True` 时就会继续运行。
:::tip 提示
`PermissionChecker` 既可以是 async function 也可以是 sync function
:::
## `MESSAGE`
* **说明**: 匹配任意 `message` 类型事件,仅在需要同时捕获不同类型事件时使用。优先使用 message type 的 Matcher。
## `NOTICE`
* **说明**: 匹配任意 `notice` 类型事件,仅在需要同时捕获不同类型事件时使用。优先使用 notice type 的 Matcher。
## `REQUEST`
* **说明**: 匹配任意 `request` 类型事件,仅在需要同时捕获不同类型事件时使用。优先使用 request type 的 Matcher。
## `METAEVENT`
* **说明**: 匹配任意 `meta_event` 类型事件,仅在需要同时捕获不同类型事件时使用。优先使用 meta_event type 的 Matcher。
## `USER(*user, perm=<nonebot.permission.Permission object>)`
* **说明**
在白名单内且满足 perm
* **参数**
* `*user: int`: 白名单
* `perm: Permission`: 需要同时满足的权限
## `PRIVATE`
* **说明**: 匹配任意私聊消息类型事件
## `PRIVATE_FRIEND`
* **说明**: 匹配任意好友私聊消息类型事件
## `PRIVATE_GROUP`
* **说明**: 匹配任意群临时私聊消息类型事件
## `PRIVATE_OTHER`
* **说明**: 匹配任意其他私聊消息类型事件
## `GROUP`
* **说明**: 匹配任意群聊消息类型事件
## `GROUP_MEMBER`
* **说明**: 匹配任意群员群聊消息类型事件
:::warning 警告
该权限通过 event.sender 进行判断且不包含管理员以及群主!
:::
## `GROUP_ADMIN`
* **说明**: 匹配任意群管理员群聊消息类型事件
## `GROUP_OWNER`
* **说明**: 匹配任意群主群聊消息类型事件
## `SUPERUSER`
* **说明**: 匹配任意超级用户消息类型事件
## `EVERYBODY`
* **说明**: 匹配任意消息类型事件

View File

@@ -1,202 +0,0 @@
---
contentSidebar: true
sidebarDepth: 0
---
# NoneBot.rule 模块
## 规则
每个事件响应器 `Matcher` 拥有一个匹配规则 `Rule` ,其中是 **异步** `RuleChecker` 的集合,只有当所有 `RuleChecker` 检查结果为 `True` 时继续运行。
:::tip 提示
`RuleChecker` 既可以是 async function 也可以是 sync function但在最终会被 `nonebot.utils.run_sync` 转换为 async function
:::
## _class_ `Rule`
基类:`object`
* **说明**
`Matcher` 规则类,当事件传递时,在 `Matcher` 运行前进行检查。
* **示例**
```python
Rule(async_function) & sync_function
# 等价于
from nonebot.utils import run_sync
Rule(async_function, run_sync(sync_function))
```
### `__init__(*checkers)`
* **参数**
* `*checkers: Callable[[Bot, Event, dict], Awaitable[bool]]`: **异步** RuleChecker
### `checkers`
* **说明**
存储 `RuleChecker`
* **类型**
* `Set[Callable[[Bot, Event, dict], Awaitable[bool]]]`
### _async_ `__call__(bot, event, state)`
* **说明**
检查是否符合所有规则
* **参数**
* `bot: Bot`: Bot 对象
* `event: Event`: Event 对象
* `state: dict`: 当前 State
* **返回**
* `bool`
## `startswith(msg)`
* **说明**
匹配消息开头
* **参数**
* `msg: str`: 消息开头字符串
## `endswith(msg)`
* **说明**
匹配消息结尾
* **参数**
* `msg: str`: 消息结尾字符串
## `keyword(msg)`
* **说明**
匹配消息关键词
* **参数**
* `msg: str`: 关键词
## `command(command)`
* **说明**
命令形式匹配,根据配置里提供的 `command_start`, `command_sep` 判断消息是否为命令。
* **参数**
* `command: Tuples[str, ...]`: 命令内容
* **示例**
使用默认 `command_start`, `command_sep` 配置
命令 `("test",)` 可以匹配:`/test` 开头的消息
命令 `("test", "sub")` 可以匹配”`/test.sub` 开头的消息
:::tip 提示
命令内容与后续消息间无需空格!
:::
## `regex(regex, flags=0)`
* **说明**
根据正则表达式进行匹配
* **参数**
* `regex: str`: 正则表达式
* `flags: Union[int, re.RegexFlag]`: 正则标志
## `to_me()`
* **说明**
通过 `event.to_me` 判断消息是否是发送给机器人
* **参数**
*

View File

@@ -1,41 +0,0 @@
---
contentSidebar: true
sidebarDepth: 0
---
# NoneBot.sched 模块
## 计划任务
计划任务使用第三方库 [APScheduler](https://github.com/agronholm/apscheduler) ,使用文档请参考 [APScheduler使用文档](https://apscheduler.readthedocs.io/en/latest/) 。
## `scheduler`
* **类型**
`Optional[apscheduler.schedulers.asyncio.AsyncIOScheduler]`
* **说明**
当可选依赖 `APScheduler` 未安装时,`scheduler` 为 None
使用 `pip install nonebot[scheduler]` 安装可选依赖
* **常用示例**
```python
from nonebot import scheduler
@scheduler.scheduled_job("cron", hour="*/2", id="xxx", args=[1], kwargs={arg2: 2})
async def run_every_2_hour(arg1, arg2):
pass
scheduler.add_job(run_every_day_from_program_start, "interval", days=1, id="xxx")
```

View File

@@ -1,252 +0,0 @@
---
contentSidebar: true
sidebarDepth: 0
---
# NoneBot.typing 模块
## 类型
下面的文档中,「类型」部分使用 Python 的 Type Hint 语法,见 [PEP 484](https://www.python.org/dev/peps/pep-0484/)、[PEP 526](https://www.python.org/dev/peps/pep-0526/) 和 [typing](https://docs.python.org/3/library/typing.html)。
除了 Python 内置的类型,下面还出现了如下 NoneBot 自定类型,实际上它们是 Python 内置类型的别名。
以下类型均可从 nonebot.typing 模块导入。
## `Driver`
* **类型**
`BaseDriver`
* **说明**
所有 Driver 的基类。
## `WebSocket`
* **类型**
`BaseWebSocket`
* **说明**
所有 WebSocket 的基类。
## `Bot`
* **类型**
`BaseBot`
* **说明**
所有 Bot 的基类。
## `Event`
* **类型**
`BaseEvent`
* **说明**
所有 Event 的基类。
## `Message`
* **类型**
`BaseMessage`
* **说明**
所有 Message 的基类。
## `MessageSegment`
* **类型**
`BaseMessageSegment`
* **说明**
所有 MessageSegment 的基类。
## `PreProcessor`
* **类型**
`Callable[[Bot, Event, dict], Union[Awaitable[None], Awaitable[NoReturn]]]`
* **说明**
消息预处理函数 PreProcessor 类型
## `Matcher`
* **类型**
`Matcher`
* **说明**
Matcher 即响应事件的处理类。通过 Rule 判断是否响应事件,运行 Handler。
## `MatcherGroup`
* **类型**
`MatcherGroup`
* **说明**
MatcherGroup 为 Matcher 的集合。可以共享 Handler。
## `Rule`
* **类型**
`Rule`
* **说明**
Rule 即判断是否响应事件的处理类。内部存储 RuleChecker ,返回全为 True 则响应事件。
## `RuleChecker`
* **类型**
`Callable[[Bot, Event, dict], Union[bool, Awaitable[bool]]]`
* **说明**
RuleChecker 即判断是否响应事件的处理函数。
## `Permission`
* **类型**
`Permission`
* **说明**
Permission 即判断是否响应消息的处理类。内部存储 PermissionChecker ,返回只要有一个 True 则响应消息。
## `PermissionChecker`
* **类型**
`Callable[[Bot, Event], Union[bool, Awaitable[bool]]]`
* **说明**
RuleChecker 即判断是否响应消息的处理函数。
## `Handler`
* **类型**
`Callable[[Bot, Event, dict], Union[Awaitable[None], Awaitable[NoReturn]]]`
* **说明**
Handler 即事件的处理函数。
## `ArgsParser`
* **类型**
`Callable[[Bot, Event, dict], Union[Awaitable[None], Awaitable[NoReturn]]]`
* **说明**
ArgsParser 即消息参数解析函数,在 Matcher.got 获取参数时被运行。

View File

@@ -1,62 +0,0 @@
---
contentSidebar: true
sidebarDepth: 0
---
# NoneBot.utils 模块
## `escape_tag(s)`
* **说明**
用于记录带颜色日志时转义 `<tag>` 类型特殊标签
* **参数**
* `s: str`: 需要转义的字符串
* **返回**
* `str`
## `run_sync(func)`
* **说明**
一个用于包装 sync function 为 async function 的装饰器
* **参数**
* `func: Callable[..., Any]`: 被装饰的同步函数
* **返回**
* `Callable[..., Awaitable[Any]]`
## _class_ `DataclassEncoder`
基类:`json.encoder.JSONEncoder`
* **说明**
在JSON序列化 `Message` (List[Dataclass]) 时使用的 `JSONEncoder`

View File

@@ -1,34 +0,0 @@
# 概览
:::tip 提示
如果在阅读本文档时遇到难以理解的词汇,请随时查阅 [术语表](../glossary.md) 或使用 [Google 搜索](https://www.google.com/)。
:::
:::tip 提示
初次使用时可能会觉得这里的概览过于枯燥,可以先简单略读之后直接前往 [安装](./installation.md) 查看安装方法,并进行后续的基础使用教程。
:::
NoneBot2 是一个可扩展的 Python 异步机器人框架,它会对机器人收到的消息进行解析和处理,并以插件化的形式,分发给消息所对应的命令处理器和自然语言处理器,来完成具体的功能。
除了起到解析消息的作用NoneBot 还为插件提供了大量实用的预设操作和权限控制机制,尤其对于命令处理器,它更是提供了完善且易用的会话机制和内部调用机制,以分别适应命令的连续交互和插件内部功能复用等需求。
目前 NoneBot2 在 [FastAPI](https://fastapi.tiangolo.com/) 的基础上封装了与 [CQHTTP(OneBot) 协议](http://cqhttp.cc/)插件的网络交互。
得益于 Python 的 [asyncio](https://docs.python.org/3/library/asyncio.html) 机制NoneBot 处理消息的吞吐量有了很大的保障,再配合 WebSocket 通信方式也是最建议的通信方式NoneBot 的性能可以达到 HTTP 通信方式的两倍以上,相较于传统同步 I/O 的 HTTP 通信,更是有质的飞跃。
需要注意的是NoneBot 仅支持 Python 3.7+ 及 CQHTTP(OneBot) 插件 v11+。
## 它如何工作?
~~未填坑~~
## 特色
- 提供直观的测试前端
- 提供使用简易的脚手架
- 基于异步 I/O
- 同时支持 HTTP 和反向 WebSocket 通信方式
- 支持多个机器人账号负载均衡
- 提供直观的交互式会话接口
- 提供可自定义的权限控制机制
- 多种方式渲染要发送的消息内容,使对话足够自然

View File

@@ -1,68 +0,0 @@
# 基本配置
到目前为止我们还在使用 NoneBot 的默认行为,在开始编写自己的插件之前,我们先尝试在配置文件上动动手脚,让 NoneBot 表现出不同的行为。
在上一章节中,我们创建了默认的项目结构,其中 `.env`, `.env.*` 均为项目的配置文件,下面将介绍几种 NoneBot 配置方式。
:::danger 警告
请勿将敏感信息写入配置文件并提交至开源仓库!
:::
## .env 文件
NoneBot 在启动时将会从系统环境变量或者 `.env` 文件中寻找变量 `ENVIRONMENT` (大小写不敏感),默认值为 `prod`
这将引导 NoneBot 从系统环境变量或者 `.env.{ENVIRONMENT}` 文件中进一步加载具体配置。
现在,我们在 `.env` 文件中写入当前环境信息
```bash
# .env
ENVIRONMENT=dev
```
## .env.\* 文件
详细配置文件,使用 [pydantic](https://pydantic-docs.helpmanual.io/) 加载配置。在 NoneBot 初始化时可以指定忽略 `.env` 中的环境信息转而加载某个配置文件: `nonebot.init(_env_file=".env.dev")`
:::warning 提示
由于 `pydantic` 使用 JSON 加载配置项,请确保配置项值为 JSON 能够解析的数据。如果 JSON 解析失败将作为字符串处理。
:::
示例及说明:
```bash
HOST=0.0.0.0 # 配置 NoneBot 监听的 IP/主机名
PORT=8080 # 配置 NoneBot 监听的端口
DEBUG=true # 开启 debug 模式 **请勿在生产环境开启**
SUPERUSERS=["123456789", "987654321"] # 配置 NoneBot 超级用户
NICKNAME=["awesome", "bot"] # 配置机器人的昵称
COMMAND_START=["/", ""] # 配置命令起始字符
COMMAND_SEP=["."] # 配置命令分割字符
# Custom Configs
CUSTOM_CONFIG1="config in env file"
CUSTOM_CONFIG2= # 留空则从系统环境变量读取,如不存在则为空字符串
```
详细的配置项参考 [Config Reference](../api/config.md) 。
## bot.py 文件
配置项也可以在 NoneBot 初始化时传入。此处可以传入任意合法 Python 变量。当然也可以在初始化完成后修改或新增。
示例:
```python
# bot.py
import nonebot
nonebot.init(custom_config3="config on init")
config = nonebot.get_driver().config
config.custom_config3 = "changed after init"
config.custom_config4 = "new config after init"
```
## 优先级
`bot.py init` > `env file` > `system env`

View File

@@ -1,55 +0,0 @@
# 创建一个完整的项目
上一章中我们已经运行了一个最小的 NoneBot 实例,在这一章,我们将从零开始一个完整的项目。
## 目录结构
首先,我们可以使用 `nb-cli` 或者自行创建项目目录:
```bash
pip install nonebot2[cli]
# pip install nb-cli
nb create
```
这将创建默认的目录结构
<!-- prettier-ignore-start -->
:::vue
AweSome-Bot
├── `awesome_bot` _(**或是 src**)_
│ └── `plugins`
├── `.env` _(**可选的**)_
├── `.env.dev` _(**可选的**)_
├── `.env.prod` _(**可选的**)_
├── .gitignore
├── `bot.py`
├── docker-compose.yml
├── Dockerfile
├── `pyproject.toml`
└── README.md
:::
<!-- prettier-ignore-end -->
- `awesome_bot/plugins``src/plugins`: 用于存放编写的 bot 插件
- `.env`, `.env.dev`, `.env.prod`: 各环境配置文件
- `bot.py`: bot 入口文件
- `pyproject.toml`: 项目依赖管理文件,默认使用 [poetry](https://python-poetry.org/)
## 启动 Bot
如果你使用 `nb-cli`
```bash
nb run [--file=bot.py] [--app=app]
```
或者使用
```bash
python bot.py
```
:::tip 提示
如果在 bot 入口文件内定义了 asgi server `nb-cli` 将会为你启动**冷重载模式**
:::

View File

@@ -1,146 +0,0 @@
# 开始使用
一切都安装成功后,你就已经做好了进行简单配置以运行一个最小的 NoneBot 实例的准备。
## 最小实例
使用你最熟悉的编辑器或 IDE创建一个名为 `bot.py` 的文件,内容如下:
```python{3,4,7}
import nonebot
nonebot.init()
nonebot.load_builtin_plugins()
if __name__ == "__main__":
nonebot.run()
```
这几行高亮代码将依次:
1. 使用默认配置初始化 NoneBot 包
2. 加载 NoneBot 内置的插件
3. 在地址 `127.0.0.1:8080` 运行 NoneBot
在命令行使用如下命令即可运行这个 NoneBot 实例:
```bash
python bot.py
```
运行后会产生如下日志:
```default
09-14 21:02:00 [INFO] nonebot | Succeeded to import "nonebot.plugins.base"
09-14 21:02:00 [INFO] nonebot | Running NoneBot...
09-14 21:02:00 [INFO] uvicorn | Started server process [1234]
09-14 21:02:00 [INFO] uvicorn | Waiting for application startup.
09-14 21:02:00 [INFO] nonebot | Scheduler Started
09-14 21:02:00 [INFO] uvicorn | Application startup complete.
09-14 21:02:00 [INFO] uvicorn | Uvicorn running on http://127.0.0.1:8080 (Press CTRL+C to quit)
```
## 配置 QQ 协议端
单纯运行 NoneBot 实例并不会产生任何效果,因为此刻 QQ 这边还不知道 NoneBot 的存在,也就无法把消息发送给它,因此现在需要使用一个无头 QQ 来把消息等事件上报给 NoneBot。
目前支持的协议有:
- [OneBot(CQHTTP)](https://github.com/howmanybots/onebot)
QQ 协议端举例:
- [Mirai](https://github.com/mamoe/mirai) + [cqhttp-mirai](https://github.com/yyuueexxiinngg/cqhttp-mirai)
- [cqhttp-mirai-embedded](https://github.com/yyuueexxiinngg/cqhttp-mirai/tree/embedded)
- [Mirai](https://github.com/mamoe/mirai) + [Mirai Native](https://github.com/iTXTech/mirai-native) + [CQHTTP](https://github.com/richardchien/coolq-http-api)
- [go-cqhttp](https://github.com/Mrs4s/go-cqhttp) (基于 [MiraiGo](https://github.com/Mrs4s/MiraiGo))
- [OICQ-http-api](https://github.com/takayama-lily/onebot) (基于 [OICQ](https://github.com/takayama-lily/oicq))
这里以 [go-cqhttp](https://github.com/Mrs4s/go-cqhttp) 为例
1. 下载 go-cqhttp 对应平台的 release 文件
2. 双击 exe 文件或者使用 `./go-cqhttp` 启动
3. 生成默认配置文件并修改默认配置
```json{2,3,30-31}
{
"uin": 你的QQ号,
"password": "你的密码",
"encrypt_password": false,
"password_encrypted": "",
"enable_db": true,
"access_token": "",
"relogin": {
"enabled": true,
"relogin_delay": 3,
"max_relogin_times": 0
},
"ignore_invalid_cqcode": false,
"force_fragmented": true,
"heartbeat_interval": 0,
"http_config": {
"enabled": false,
"host": "0.0.0.0",
"port": 5700,
"timeout": 0,
"post_urls": {}
},
"ws_config": {
"enabled": false,
"host": "0.0.0.0",
"port": 6700
},
"ws_reverse_servers": [
{
"enabled": true,
"reverse_url": "ws://127.0.0.1:8080/cqhttp/ws",
"reverse_api_url": "",
"reverse_event_url": "",
"reverse_reconnect_interval": 3000
}
],
"post_message_format": "string",
"debug": false,
"log_level": ""
}
```
其中 `ws://127.0.0.1:8080/cqhttp/ws` 中的 `127.0.0.1` 和 `8080` 应分别对应 nonebot 配置的 HOST 和 PORT
## 历史性的第一次对话
一旦新的配置文件正确生效之后NoneBot 所在的控制台(如果正在运行的话)应该会输出类似下面的内容(两条访问日志):
```default
09-14 21:31:16 [INFO] uvicorn | ('127.0.0.1', 12345) - "WebSocket /cqhttp/ws" [accepted]
09-14 21:31:16 [INFO] nonebot | WebSocket Connection from CQHTTP Bot 你的QQ号 Accepted!
```
这表示 QQ 协议端已经成功地使用 CQHTTP 协议连接上了 NoneBot。
:::warning 注意
如果到这一步你没有看到上面这样的成功日志CQHTTP 的日志中在不断地重连或无反应,请注意检查配置中的 IP 和端口是否确实可以访问。比较常见的出错点包括:
- NoneBot 监听 `0.0.0.0`,然后在 CQHTTP 配置中填了 `ws://0.0.0.0:8080/cqhttp/ws`
- 在 Docker 容器内运行 CQHTTP并通过 `127.0.0.1` 访问宿主机上的 NoneBot
- 想从公网访问,但没有修改云服务商的安全组策略或系统防火墙
- NoneBot 所监听的端口存在冲突,已被其它程序占用
- 弄混了 NoneBot 的 `host`、`port` 参数与 CQHTTP 配置中的 `host`、`port` 参数
- 使用了 `ws_reverse_api_url` 和 `ws_reverse_event_url` 而非 universal client
- `ws://` 错填为 `http://`
- CQHTTP 或 NoneBot 启动时遭到外星武器干扰
请尝试重启 CQHTTP、重启 NoneBot、更换端口、修改防火墙、重启系统、仔细阅读前面的文档及提示、更新 CQHTTP 和 NoneBot 到最新版本等方式来解决。
:::
现在,尝试向你的 QQ 机器人账号发送如下内容:
```default
/say 你好,世界
```
到这里如果一切 OK你应该会收到机器人给你回复了 `你好,世界`。这一历史性的对话标志着你已经成功地运行了一个 NoneBot 的最小实例,开始了编写更强大的 QQ 机器人的创意之旅!
<ClientOnly>
<Messenger :messages="[{ position: 'right', msg: '/say 你好,世界' }, { position: 'left', msg: '你好,世界' }]"/>
</ClientOnly>

View File

@@ -1,73 +0,0 @@
# 安装
## NoneBot
:::warning 注意
请确保你的 Python 版本 >= 3.7。
:::
```bash
pip install nonebot2
```
如果你需要使用最新的(可能尚未发布的)特性,可以克隆 Git 仓库后手动安装:
```bash
git clone https://github.com/nonebot/nonebot2.git
cd nonebot2
poetry install --no-dev # 推荐
pip install . # 不推荐
```
## 额外依赖
### APScheduler
A task scheduling library for Python.
可用于计划任务,后台执行任务等
```bash
pip install nonebot2[scheduler]
poetry add nonebot2[scheduler]
```
[View On GitHub](https://github.com/agronholm/apscheduler)
### NoneBot-Test
A test frontend for nonebot2.
通过前端展示 nonebot 已加载的插件以及运行状态,同时可以用于模拟发送事件测试机器人
```bash
pip install nonebot2[test]
poetry add nonebot2[test]
```
[View On GitHub](https://github.com/nonebot/nonebot-test)
### CLI
CLI for nonebot2.
一个多功能脚手架
```bash
pip install nonebot2[cli]
poetry add nonebot2[cli]
```
[View On GitHub](https://github.com/yanyongyu/nb-cli)
### 我全都要
```bash
pip install nonebot2[full]
poetry add nonebot2[full]
```
```bash
pip install nonebot2[cli,scheduler]
poetry add nonebot2[cli,scheduler]
```

View File

@@ -1,290 +0,0 @@
# 编写插件
本章将以一个天气查询插件为例,教学如何编写自己的命令。
## 加载插件
在 [创建一个完整的项目](creating-a-project) 一章节中,我们已经创建了插件目录 `awesome_bot/plugins`,现在我们在机器人入口文件中加载它。当然,你也可以单独加载一个插件。
:::tip 提示
加载插件目录时,目录下以 `_` 下划线开头的插件将不会被加载!
:::
`bot.py` 文件中添加以下行:
```python{5,7}
import nonebot
nonebot.init()
# 加载单独的一个插件参数为合法的python包名
nonebot.load_plugin("nonebot.plugins.base")
# 加载插件目录,该目录下为各插件,以下划线开头的插件将不会被加载
nonebot.load_plugins("awesome_bot/plugins")
app = nonebot.get_asgi()
if __name__ == "__main__":
nonebot.run()
```
尝试运行 `nb run` 或者 `python bot.py`,可以看到日志输出了类似如下内容:
```plain
09-19 21:51:59 [INFO] nonebot | Succeeded to import "nonebot.plugins.base"
09-19 21:51:59 [INFO] nonebot | Succeeded to import "plugin_in_folder"
```
## 创建插件
现在我们已经有了一个空的插件目录,我们可以开始创建插件了!插件有两种形式
### 单文件形式
在插件目录下创建名为 `weather.py` 的 Python 文件,暂时留空,此时目录结构如下:
<!-- prettier-ignore-start -->
:::vue
AweSome-Bot
├── awesome_bot
│ └── plugins
│ └── `weather.py`
├── .env
├── .env.dev
├── .env.prod
├── .gitignore
├── bot.py
├── docker-compose.yml
├── Dockerfile
├── pyproject.toml
└── README.md
:::
<!-- prettier-ignore-end -->
这个时候它已经可以被称为一个插件了,尽管它还什么都没做。
### 包形式
在插件目录下创建文件夹 `weather`,并在该文件夹下创建文件 `__init__.py`,此时目录结构如下:
<!-- prettier-ignore-start -->
:::vue
AweSome-Bot
├── awesome_bot
│ └── plugins
│ └── `weather`
│ └── `__init__.py`
├── .env
├── .env.dev
├── .env.prod
├── .gitignore
├── bot.py
├── docker-compose.yml
├── Dockerfile
├── pyproject.toml
└── README.md
:::
<!-- prettier-ignore-end -->
这个时候 `weather` 就是一个合法的 Python 包了,同时也是合法的 NoneBot 插件,插件内容可以在 `__init__.py` 中编写。
## 编写真正的内容
好了,现在插件已经可以正确加载,我们可以开始编写命令的实际代码了。在 `weather.py` 中添加如下代码:
```python
from nonebot import on_command
from nonebot.rule import to_me
from nonebot.adapters.cqhttp import Bot, Event
weather = on_command("天气", rule=to_me(), priority=5)
@weather.handle()
async def handle_first_receive(bot: Bot, event: Event, state: dict):
args = str(event.message).strip() # 首次发送命令时跟随的参数,例:/天气 上海则args为上海
if args:
state["city"] = args # 如果用户发送了参数则直接赋值
@weather.got("city", prompt="你想查询哪个城市的天气呢?")
async def handle_city(bot: Bot, event: Event, state: dict):
city = state["city"]
if city not in ["上海", "北京"]:
await weather.reject("你想查询的城市暂不支持,请重新输入!")
city_weather = await get_weather(city)
await weather.finish(city_weather)
async def get_weather(city: str):
return f"{city}的天气是..."
```
为了简单起见,我们在这里的例子中没有接入真实的天气数据,但要接入也非常简单,你可以使用中国天气网、和风天气等网站提供的 API。
下面我们来说明这段代码是如何工作的。
:::tip 提示
从这里开始,你需要对 Python 的 asyncio 编程有所了解,因为 NoneBot 是完全基于 asyncio 的,具体可以参考 [廖雪峰的 Python 教程](https://www.liaoxuefeng.com/wiki/1016959663602400/1017959540289152)
:::
### 注册一个 [事件响应器](../api/matcher.md)
```python{4}
from nonebot import on_command
from nonebot.rule import to_me
from nonebot.permission import Permission
weather = on_command("天气", rule=to_me(), permission=Permission(), priority=5)
```
在上方代码中,我们注册了一个事件响应器 `Matcher`,它由几个部分组成:
1. `on_command` 注册一个消息类型的命令处理器
2. `"天气"` 指定 command 参数 - 命令名
3. `rule` 补充事件响应器的匹配规则
4. `priority` 事件响应器优先级
5. `block` 是否阻止事件传递
其他详细配置可以参考 API 文档,下面我们详细说明各个部分:
#### 事件响应器类型 type
事件响应器类型其实就是对应 `Event.type` NoneBot 提供了一个基础类型事件响应器 `on()` 以及一些内置的事件响应器。
- `on("事件类型")`: 基础事件响应器,第一个参数为事件类型,空字符串表示不限
- `on_metaevent()` ~ `on("meta_event")`: 元事件响应器
- `on_message()` ~ `on("message")`: 消息事件响应器
- `on_request()` ~ `on("request")`: 请求事件响应器
- `on_notice()` ~ `on("notice")`: 通知事件响应器
- `on_startswith(str)` ~ `on("message", startswith(str))`: 消息开头匹配处理器
- `on_endswith(str)` ~ `on("message", endswith(str))`: 消息结尾匹配处理器
- `on_command(str|tuple)` ~ `on("message", command(str|tuple))`: 命令处理器
- `on_regex(pattern_str)` ~ `on("message", regex(pattern_str))`: 正则匹配处理器
#### 匹配规则 rule
事件响应器的匹配规则即 `Rule`,由非负个 `RuleChecker` 组成,当所有 `RuleChecker` 返回 `True` 时匹配成功。这些 `RuleChecker` 的形式如下:
```python
async def check(bot: Bot, event: Event, state: dict) -> bool:
return True
def check(bot: Bot, event: Event, state: dict) -> bool:
return True
```
`Rule` 和 `RuleChecker` 之间可以使用 `&` 互相组合:
```python
from nonebot.rule import Rule
Rule(async_checker1) & sync_checker & async_checker2
```
:::danger 警告
`Rule(*checkers)` 只接受 async function或使用 `nonebot.utils.run_sync` 自行包裹 sync function。在使用 `&` 时NoneBot 会自动包裹 sync function
:::
#### 优先级 priority
事件响应器的优先级代表事件响应器的执行顺序,同一优先级的事件响应器会 **同时执行!**
:::tip 提示
使用 `nonebot-test` 可以看到当前所有事件响应器的执行流程,有助理解事件响应流程!
```bash
pip install nonebot2[test]
```
:::
#### 阻断 block
当有任意事件响应器发出了阻止事件传递信号时,该事件将不再会传递给下一优先级,直接结束处理。
NoneBot 内置的事件响应器中,所有 `message` 类的事件响应器默认会阻断事件传递,其他则不会。
### 编写事件处理函数 [Handler](../api/typing.md#handler)
```python{1,2,8,9}
@weather.handle()
async def handle_first_receive(bot: Bot, event: Event, state: dict):
args = str(event.message).strip() # 首次发送命令时跟随的参数,例:/天气 上海则args为上海
if args:
state["city"] = args # 如果用户发送了参数则直接赋值
@weather.got("city", prompt="你想查询哪个城市的天气呢?")
async def handle_city(bot: Bot, event: Event, state: dict):
city = state["city"]
if city not in ["上海", "北京"]:
await weather.reject("你想查询的城市暂不支持,请重新输入!")
city_weather = await get_weather(city)
await weather.finish(city_weather)
```
在上面的代码中,我们给 `weather` 事件响应器添加了两个事件处理函数:`handle_first_receive`, `handle_city`
其中有几个要点,我们一一解释:
#### 添加一个事件处理函数
在事件响应器响应事件时,事件处理函数会依次顺序执行,也就是说,与添加顺序一致。
我们可以使用 `@matcher.handle()` 装饰器来简单地为该事件响应器添加一个处理函数。
同时NoneBot 内置了几种添加事件处理函数方式以方便处理:
- `@matcher.receive()`: 指示 NoneBot 接收一条新的用户消息以继续执行后续处理函数。
- `@matcher.got(key, [prompt="请输入key"], [args_parser=function])`: 指示 NoneBot 当 `state` 中不存在 `key` 时向用户发送 `prompt` 等待用户回复并赋值给 `state[key]`
这些装饰器可以套娃使用!例如:
```python
@matcher.got("key1")
@matcher.got("key2")
async def handle(bot: Bot, event: Event, state: dict):
pass
```
#### 事件处理函数参数
事件处理函数类型为 `Callable[[Bot, Event, dict], Union[Awaitable[None], Awaitable[NoReturn]]]` 。
参数分别为:
1. [nonebot.typing.Bot](../api/typing.md#bot): 即事件上报连接对应的 Bot 对象,为 BaseBot 的子类。特别注意,此处的类型注释可以替换为指定的 Bot 类型,例如:`nonebot.adapters.cqhttp.Bot`,只有在上报事件的 Bot 类型与类型注释相符时才会执行该处理函数!可用于多平台进行不同的处理。
2. [nonebot.typing.Event](../api/typing.md#event): 即上报事件对象,可以获取到上报的所有信息。
3. `state`: 状态字典,可以存储任意的信息
#### 处理事件
在事件处理函数中,我们只需要对 `event` 做出相应的处理,存入状态字典 `state` 中,或者向用户发送消息、调用某个机器人 API 等等。
在 NoneBot 中,提供了几种特殊的处理函数:
##### `@matcher.args_parser`
这是一个装饰器,装饰一个函数来使它成为参数的默认解析函数,当使用 `matcher.got(xxx, [args_parser])` 获取到一条消息时,会运行 `matcher.got` 的 `args_parser` ,如果不存在则运行 `@matcher.args_parser`。
##### `matcher.pause`
这个函数用于结束当前事件处理函数,强制接收一条新的消息再运行**下一个消息处理函数**。
##### `matcher.reject`
这个函数用于结束当前事件处理函数,强制接收一条新的消息再**再次运行当前消息处理函数**。
##### `matcher.finish`
这个函数用于直接结束当前事件处理。
以上三个函数都拥有一个参数 `prompt`,用于向用户发送一条消息。
## 结语
至此,相信你已经能够写出一个基础的插件了,更多的用法将会在 进阶 部分进行介绍,这里给出几个小提示:
- 请千万注意事件处理器的优先级设定
- 在匹配规则中请勿使用耗时极长的函数
- 同一个用户可以跨群(私聊)继续他的事件处理(除非做出权限限制,将在后续介绍)

View File

@@ -1,108 +0,0 @@
{
"locales": {
"/": {
"label": "简体中文",
"selectText": "Languages",
"editLinkText": "在 GitHub 上编辑此页",
"lastUpdated": "上次更新",
"nav": [
{
"text": "主页",
"link": "/"
},
{
"text": "指南",
"link": "/guide/"
},
{
"text": "API",
"link": "/api/"
}
],
"sidebarDepth": 2,
"sidebar": {
"/guide/": [
{
"title": "指南",
"path": "",
"collapsable": false,
"sidebar": "auto",
"children": [
"",
"installation",
"getting-started",
"creating-a-project",
"basic-configuration",
"writing-a-plugin"
]
}
],
"/api/": [
{
"title": "NoneBot Api Reference",
"path": "",
"collapsable": false,
"children": [
{
"title": "nonebot 模块",
"path": "nonebot"
},
{
"title": "nonebot.config 模块",
"path": "config"
},
{
"title": "nonebot.matcher 模块",
"path": "matcher"
},
{
"title": "nonebot.rule 模块",
"path": "rule"
},
{
"title": "nonebot.permission 模块",
"path": "permission"
},
{
"title": "nonebot.sched 模块",
"path": "sched"
},
{
"title": "nonebot.log 模块",
"path": "log"
},
{
"title": "nonebot.utils 模块",
"path": "utils"
},
{
"title": "nonebot.typing 模块",
"path": "typing"
},
{
"title": "nonebot.exception 模块",
"path": "exception"
},
{
"title": "nonebot.drivers 模块",
"path": "drivers/"
},
{
"title": "nonebot.drivers.fastapi 模块",
"path": "drivers/fastapi"
},
{
"title": "nonebot.adapters 模块",
"path": "adapters/"
},
{
"title": "nonebot.adapters.cqhttp 模块",
"path": "adapters/cqhttp"
}
]
}
]
}
}
}
}

View File

@@ -1,219 +0,0 @@
<template>
<div class="qq-chat">
<v-app>
<v-main>
<v-card class="elevation-6">
<v-toolbar color="primary" dark dense flat>
<v-row no-gutters>
<v-col>
<v-row no-gutters justify="space-between">
<v-col cols="auto">
<v-icon small>fa-chevron-left</v-icon>
</v-col>
<v-col cols="auto">
<h3>🔥</h3>
</v-col>
</v-row>
</v-col>
<v-col cols="auto">
<h3 class="white--text">NoneBot</h3>
</v-col>
<v-col class="text-right">
<v-icon small>fa-user</v-icon>
</v-col>
</v-row>
</v-toolbar>
<v-container fluid ref="chat" class="chat chat-bg">
<template v-for="(item, index) in messages">
<v-row
v-if="item.position === 'right'"
justify="end"
:key="index"
class="message wow animate__fadeInRight"
data-wow-duration="0.7s"
>
<div
class="message-box"
v-html="
item.msg.replace(/\n/g, '<br/>').replace(/ /g, '&nbsp;')
"
></div>
<v-avatar color="blue lighten-2" size="36">
<v-icon small>fa-user</v-icon>
</v-avatar>
</v-row>
<v-row
v-else-if="item.position === 'left'"
justify="start"
:key="index"
class="message wow animate__fadeInLeft"
data-wow-duration="0.7s"
>
<v-avatar color="transparent" size="36">
<v-img src="/logo.png"></v-img>
</v-avatar>
<div
class="message-box"
v-html="
item.msg.replace(/\n/g, '<br/>').replace(/ /g, '&nbsp;')
"
></div>
</v-row>
<v-row
v-else
justify="center"
:key="index"
class="notify mt-1 wow animate__fadeIn"
data-wow-duration="0.7s"
>
<div class="notify-box">
<span style="display: inline; white-space: nowrap">
<v-icon x-small color="blue" left>fa-info-circle</v-icon>
</span>
<span
v-html="
item.msg.replace(/\n/g, '<br/>').replace(/ /g, '&nbsp;')
"
></span>
</div>
</v-row>
</template>
</v-container>
<v-container fluid class="chat-bg py-0">
<v-row dense class="mx-0">
<v-col>
<v-text-field
dense
solo
hide-details
height="28px"
></v-text-field>
</v-col>
<v-col cols="auto">
<v-btn
style="font-size: 0.8rem"
color="primary"
small
rounded
depressed
>发送</v-btn
>
</v-col>
</v-row>
<v-row class="text-center" no-gutters>
<v-col class="pa-1" cols="2">
<v-icon small>fa-microphone</v-icon>
</v-col>
<v-col class="pa-1" cols="2">
<v-icon small>fa-image</v-icon>
</v-col>
<v-col class="pa-1" cols="2">
<v-icon small>fa-camera</v-icon>
</v-col>
<v-col class="pa-1" cols="2">
<v-icon small>fa-wallet</v-icon>
</v-col>
<v-col class="pa-1" cols="2">
<v-icon small>fa-smile-wink</v-icon>
</v-col>
<v-col class="pa-1" cols="2">
<v-icon small>fa-plus-circle</v-icon>
</v-col>
</v-row>
</v-container>
</v-card>
</v-main>
</v-app>
</div>
</template>
<script>
import { WOW } from "wowjs";
import "animate.css/animate.min.css";
export default {
name: "Messenger",
props: {
messages: {
type: Array,
default: () => []
}
},
methods: {
initWOW: function() {
new WOW({
noxClass: "wow",
animateClass: "animate__animated",
offset: 0,
mobile: true,
live: true
}).init();
}
},
mounted() {
this.initWOW();
}
};
</script>
<style scoped>
.wow {
visibility: hidden;
}
.chat {
min-height: 150px;
overflow-x: hidden;
}
.chat-bg {
background-color: #f3f6f9;
}
.message {
position: relative;
margin: 0;
}
.message .message-box {
position: relative;
width: fit-content;
max-width: 55%;
border-radius: 0.5rem;
padding: 0.6rem 0.8rem;
margin: 0.4rem 0.8rem;
background-color: #fff;
}
.message .message-box::after {
content: "";
position: absolute;
right: 100%;
top: 0;
width: 8px;
height: 12px;
color: #fff;
border: 0 solid transparent;
border-bottom: 7px solid;
border-radius: 0 0 0 8px;
}
.message.justify-end .message-box::after {
left: 100%;
right: auto;
border-radius: 0 0 8px 0;
}
.notify {
position: relative;
}
.notify .notify-box {
max-width: 70%;
background: #e0e0e0;
border-radius: 10px;
padding: 5px 12px;
font-size: 12px;
}
</style>
<style>
.v-application--wrap {
min-height: 0 !important;
}
</style>

View File

@@ -1,173 +0,0 @@
const path = require("path");
module.exports = context => ({
title: "NoneBot",
description: "基于 酷Q 的 Python 异步 QQ 机器人框架",
markdown: {
lineNumbers: true
},
/**
* Extra tags to be injected to the page HTML `<head>`
*
* refhttps://v1.vuepress.vuejs.org/config/#head
*/
head: [
["link", { rel: "icon", href: "/logo.png" }],
["meta", { name: "theme-color", content: "#d32f2f" }],
["meta", { name: "application-name", content: "NoneBot" }],
["meta", { name: "apple-mobile-web-app-title", content: "NoneBot" }],
["meta", { name: "apple-mobile-web-app-capable", content: "yes" }],
[
"meta",
{ name: "apple-mobile-web-app-status-bar-style", content: "black" }
],
[
"link",
{
rel: "stylesheet",
href:
"https://cdn.jsdelivr.net/npm/@fortawesome/fontawesome-free@5/css/all.min.css"
}
]
],
locales: {
"/": {
lang: "zh-CN",
title: "NoneBot",
description: "基于 酷Q 的 Python 异步 QQ 机器人框架"
}
},
theme: "titanium",
themeConfig: {
logo: "/logo.png",
repo: "nonebot/nonebot",
docsDir: "docs",
docsBranch: "dev2",
docsDirVersioned: "archive",
docsDirPages: "pages",
editLinks: true,
smoothScroll: true,
locales: {
"/": {
label: "简体中文",
selectText: "Languages",
editLinkText: "在 GitHub 上编辑此页",
lastUpdated: "上次更新",
nav: [
{ text: "主页", link: "/" },
{ text: "指南", link: "/guide/" },
{ text: "API", link: "/api/" }
],
sidebarDepth: 2,
sidebar: {
"/guide/": [
{
title: "指南",
path: "",
collapsable: false,
sidebar: "auto",
children: [
"",
"installation",
"getting-started",
"creating-a-project",
"basic-configuration",
"writing-a-plugin"
]
}
],
"/api/": [
{
title: "NoneBot Api Reference",
path: "",
collapsable: false,
children: [
{
title: "nonebot 模块",
path: "nonebot"
},
{
title: "nonebot.config 模块",
path: "config"
},
{
title: "nonebot.matcher 模块",
path: "matcher"
},
{
title: "nonebot.rule 模块",
path: "rule"
},
{
title: "nonebot.permission 模块",
path: "permission"
},
{
title: "nonebot.sched 模块",
path: "sched"
},
{
title: "nonebot.log 模块",
path: "log"
},
{
title: "nonebot.utils 模块",
path: "utils"
},
{
title: "nonebot.typing 模块",
path: "typing"
},
{
title: "nonebot.exception 模块",
path: "exception"
},
{
title: "nonebot.drivers 模块",
path: "drivers/"
},
{
title: "nonebot.drivers.fastapi 模块",
path: "drivers/fastapi"
},
{
title: "nonebot.adapters 模块",
path: "adapters/"
},
{
title: "nonebot.adapters.cqhttp 模块",
path: "adapters/cqhttp"
}
]
}
]
}
}
}
},
plugins: [
"@vuepress/plugin-back-to-top",
"@vuepress/plugin-medium-zoom",
[
"versioning",
{
versionedSourceDir: path.resolve(context.sourceDir, "..", "archive"),
pagesSourceDir: path.resolve(context.sourceDir, "..", "pages"),
onNewVersion(version, versionDestPath) {
console.log(`Created version ${version} in ${versionDestPath}`);
}
}
],
[
"container",
{
type: "vue",
before: '<pre class="vue-container"><code>',
after: "</code></pre>"
}
]
]
});

View File

@@ -1,42 +0,0 @@
/**
* Client app enhancement file.
*
* https://v1.vuepress.vuejs.org/guide/basic-config.html#app-level-enhancements
*/
import Vuetify from "vuetify";
import "vuetify/dist/vuetify.min.css";
export default ({
Vue, // the version of Vue being used in the VuePress app
options, // the options for the root Vue instance
router, // the router instance for the app
siteData // site metadata
}) => {
Vue.use(Vuetify);
options.vuetify = new Vuetify({
icons: {
iconfont: "fa",
values: {
//
}
}
});
if (typeof process === "undefined" || process.env.VUE_ENV !== "server") {
router.onReady(() => {
const { app } = router;
app.$once("hook:mounted", () => {
// temporary fix for https://github.com/vuejs/vuepress/issues/2428
setTimeout(() => {
const { hash } = document.location;
if (hash.length > 1) {
const id = decodeURI(hash.substring(1));
const element = document.getElementById(id);
if (element) element.scrollIntoView();
}
}, 500);
});
});
}
};

View File

@@ -1,8 +0,0 @@
/**
* Custom Styles here.
*
* refhttps://v1.vuepress.vuejs.org/config/#index-styl
*/
.home .hero img
max-width 450px!important

View File

@@ -1,10 +0,0 @@
/**
* Custom palette here.
*
* refhttps://v1.vuepress.vuejs.org/zh/config/#palette-styl
*/
$accentColor = #ea5252
$textColor = #2c3e50
$borderColor = #eaecef
$codeBgColor = #282c34

View File

@@ -1,3 +0,0 @@
[
"2.0.0a3"
]

View File

@@ -1,15 +0,0 @@
---
home: true
heroImage: /logo.png
tagline: An asynchronous QQ bot framework.
actionText: 开始使用
actionLink: /guide/
features:
- title: 简洁
details: 提供极其简洁易懂的 API使你可以毫无压力地开始验证你的绝佳创意只需编写最少量的代码即可实现丰富的功能。
- title: 易于扩展
details: 精心设计的消息处理流程使得你可以很方便地将原型扩充为具有大量实用功能的完整聊天机器人,并持续保证扩展性。
- title: 高性能
details: 采用异步 I/O利用 WebSocket 进行通信,以获得极高的性能;同时,支持使用多账号同时接入,减少业务宕机的可能。
footer: MIT Licensed | Copyright © 2020 NoneBot Team
---

View File

@@ -1,46 +0,0 @@
# NoneBot Api Reference
* **模块索引**
* [nonebot](nonebot.html)
* [nonebot.config](config.html)
* [nonebot.matcher](matcher.html)
* [nonebot.rule](rule.html)
* [nonebot.permission](permission.html)
* [nonebot.sched](sched.html)
* [nonebot.log](log.html)
* [nonebot.utils](utils.html)
* [nonebot.typing](typing.html)
* [nonebot.exception](exception.html)
* [nonebot.drivers](drivers/)
* [nonebot.drivers.fastapi](drivers/fastapi.html)
* [nonebot.adapters](adapters/)
* [nonebot.adapters.cqhttp](adapters/cqhttp.html)

View File

@@ -1,323 +0,0 @@
---
contentSidebar: true
sidebarDepth: 0
---
# NoneBot.adapters 模块
## 协议适配基类
各协议请继承以下基类,并使用 `driver.register_adapter` 注册适配器
## _class_ `BaseBot`
基类:`abc.ABC`
Bot 基类。用于处理上报消息,并提供 API 调用接口。
### _abstract_ `__init__(driver, connection_type, config, self_id, *, websocket=None)`
* **参数**
* `driver: Driver`: Driver 对象
* `connection_type: str`: http 或者 websocket
* `config: Config`: Config 对象
* `self_id: str`: 机器人 ID
* `websocket: Optional[WebSocket]`: Websocket 连接对象
### `driver`
Driver 对象
### `connection_type`
连接类型
### `config`
Config 配置对象
### `self_id`
机器人 ID
### `websocket`
Websocket 连接对象
### _abstract property_ `type`
Adapter 类型
### _abstract async_ `handle_message(message)`
* **说明**
处理上报消息的函数,转换为 `Event` 事件后调用 `nonebot.message.handle_event` 进一步处理事件。
* **参数**
* `message: dict`: 收到的上报消息
### _abstract async_ `call_api(api, **data)`
* **说明**
调用机器人 API 接口,可以通过该函数或直接通过 bot 属性进行调用
* **参数**
* `api: str`: API 名称
* `**data`: API 数据
* **示例**
```python
await bot.call_api("send_msg", data={"message": "hello world"})
await bot.send_msg(message="hello world")
```
### _abstract async_ `send(event, message, **kwargs)`
* **说明**
调用机器人基础发送消息接口
* **参数**
* `event: Event`: 上报事件
* `message: Union[str, Message, MessageSegment]`: 要发送的消息
* `**kwargs`
## _class_ `BaseEvent`
基类:`abc.ABC`
Event 基类。提供上报信息的关键信息,其余信息可从原始上报消息获取。
### `__init__(raw_event)`
* **参数**
* `raw_event: dict`: 原始上报消息
### _property_ `raw_event`
原始上报消息
### _abstract property_ `id`
事件 ID
### _abstract property_ `name`
事件名称
### _abstract property_ `self_id`
机器人 ID
### _abstract property_ `time`
事件发生时间
### _abstract property_ `type`
事件主类型
### _abstract property_ `detail_type`
事件详细类型
### _abstract property_ `sub_type`
事件子类型
### _abstract property_ `user_id`
触发事件的主体 ID
### _abstract property_ `group_id`
触发事件的主体群 ID
### _abstract property_ `to_me`
事件是否为发送给机器人的消息
### _abstract property_ `message`
消息内容
### _abstract property_ `reply`
回复的消息
### _abstract property_ `raw_message`
原始消息
### _abstract property_ `plain_text`
纯文本消息
### _abstract property_ `sender`
消息发送者信息
## _class_ `BaseMessageSegment`
基类:`abc.ABC`
消息段基类
### `type`
* 类型: `str`
* 说明: 消息段类型
### `data`
* 类型: `Dict[str, Union[str, list]]`
* 说明: 消息段数据
## _class_ `BaseMessage`
基类:`list`, `abc.ABC`
消息数组
### `__init__(message=None, *args, **kwargs)`
* **参数**
* `message: Union[str, dict, list, MessageSegment, Message]`: 消息内容
### `append(obj)`
* **说明**
添加一个消息段到消息数组末尾
* **参数**
* `obj: Union[str, MessageSegment]`: 要添加的消息段
### `extend(obj)`
* **说明**
拼接一个消息数组或多个消息段到消息数组末尾
* **参数**
* `obj: Union[Message, Iterable[MessageSegment]]`: 要添加的消息数组
### `reduce()`
* **说明**
缩减消息数组,即拼接相邻纯文本消息段
### `extract_plain_text()`
* **说明**
提取消息内纯文本消息

View File

@@ -1,411 +0,0 @@
---
contentSidebar: true
sidebarDepth: 0
---
# NoneBot.adapters.cqhttp 模块
## CQHTTP (OneBot) v11 协议适配
协议详情请看: [CQHTTP](http://cqhttp.cc/) | [OneBot](https://github.com/howmanybots/onebot)
## `log(level, message)`
* **说明**
用于打印 CQHTTP 日志。
* **参数**
* `level: str`: 日志等级
* `message: str`: 日志信息
## `escape(s, *, escape_comma=True)`
* **说明**
对字符串进行 CQ 码转义。
* **参数**
* `s: str`: 需要转义的字符串
* `escape_comma: bool`: 是否转义逗号(`,`)。
## `unescape(s)`
* **说明**
对字符串进行 CQ 码去转义。
* **参数**
* `s: str`: 需要转义的字符串
## `_b2s(b)`
转换布尔值为字符串。
## _async_ `_check_reply(bot, event)`
* **说明**
检查消息中存在的回复,去除并赋值 `event.reply`, `event.to_me`
* **参数**
* `bot: Bot`: Bot 对象
* `event: Event`: Event 对象
## `_check_at_me(bot, event)`
* **说明**
检查消息开头或结尾是否存在 @机器人,去除并赋值 `event.to_me`
* **参数**
* `bot: Bot`: Bot 对象
* `event: Event`: Event 对象
## `_check_nickname(bot, event)`
* **说明**
检查消息开头是否存在,去除并赋值 `event.to_me`
* **参数**
* `bot: Bot`: Bot 对象
* `event: Event`: Event 对象
## `_handle_api_result(result)`
* **说明**
处理 API 请求返回值。
* **参数**
* `result: Optional[Dict[str, Any]]`: API 返回数据
* **返回**
* `Any`: API 调用返回数据
* **异常**
* `ActionFailed`: API 调用失败
## _class_ `Bot`
基类:[`nonebot.adapters.BaseBot`](#None)
CQHTTP 协议 Bot 适配。继承属性参考 [BaseBot](./#class-basebot) 。
### _property_ `type`
* 返回: `"cqhttp"`
### _async_ `handle_message(message)`
* **说明**
调用 [_check_reply](#async-check-reply-bot-event), [_check_at_me](#check-at-me-bot-event), [_check_nickname](#check-nickname-bot-event) 处理事件并转换为 [Event](#class-event)
### _async_ `call_api(api, **data)`
* **说明**
调用 CQHTTP 协议 API
* **参数**
* `api: str`: API 名称
* `**data: Any`: API 参数
* **返回**
* `Any`: API 调用返回数据
* **异常**
* `NetworkError`: 网络错误
* `ActionFailed`: API 调用失败
### _async_ `send(event, message, at_sender=False, **kwargs)`
* **说明**
根据 `event` 向触发事件的主体发送消息。
* **参数**
* `event: Event`: Event 对象
* `message: Union[str, Message, MessageSegment]`: 要发送的消息
* `at_sender: bool`: 是否 @ 事件主体
* `**kwargs`: 覆盖默认参数
* **返回**
* `Any`: API 调用返回数据
* **异常**
* `ValueError`: 缺少 `user_id`, `group_id`
* `NetworkError`: 网络错误
* `ActionFailed`: API 调用失败
## _class_ `Event`
基类:[`nonebot.adapters.BaseEvent`](#None)
CQHTTP 协议 Event 适配。继承属性参考 [BaseEvent](./#class-baseevent) 。
### _property_ `id`
* 类型: `Optional[int]`
* 说明: 事件/消息 ID
### _property_ `name`
* 类型: `str`
* 说明: 事件名称,由类型与 `.` 组合而成
### _property_ `self_id`
* 类型: `str`
* 说明: 机器人自身 ID
### _property_ `time`
* 类型: `int`
* 说明: 事件发生时间
### _property_ `type`
* 类型: `str`
* 说明: 事件类型
### _property_ `detail_type`
* 类型: `str`
* 说明: 事件详细类型
### _property_ `sub_type`
* 类型: `Optional[str]`
* 说明: 事件子类型
### _property_ `user_id`
* 类型: `Optional[int]`
* 说明: 事件主体 ID
### _property_ `group_id`
* 类型: `Optional[int]`
* 说明: 事件主体群 ID
### _property_ `to_me`
* 类型: `Optional[bool]`
* 说明: 消息是否与机器人相关
### _property_ `message`
* 类型: `Optional[Message]`
* 说明: 消息内容
### _property_ `reply`
* 类型: `Optional[dict]`
* 说明: 回复消息详情
### _property_ `raw_message`
* 类型: `Optional[str]`
* 说明: 原始消息
### _property_ `plain_text`
* 类型: `Optional[str]`
* 说明: 纯文本消息内容
### _property_ `sender`
* 类型: `Optional[dict]`
* 说明: 消息发送者信息
## _class_ `MessageSegment`
基类:[`nonebot.adapters.BaseMessageSegment`](#None)
## _class_ `Message`
基类:[`nonebot.adapters.BaseMessage`](#None)

View File

@@ -1,265 +0,0 @@
---
contentSidebar: true
sidebarDepth: 0
---
# NoneBot.config 模块
## 配置
NoneBot 使用 [pydantic](https://pydantic-docs.helpmanual.io/) 以及 [python-dotenv](https://saurabh-kumar.com/python-dotenv/) 来读取配置。
配置项需符合特殊格式或 json 序列化格式。详情见 [pydantic Field Type](https://pydantic-docs.helpmanual.io/usage/types/) 文档。
## _class_ `Env`
基类:`pydantic.env_settings.BaseSettings`
运行环境配置。大小写不敏感。
将会从 `nonebot.init 参数` > `环境变量` > `.env 环境配置文件` 的优先级读取配置。
### `environment`
* 类型: `str`
* 默认值: `"prod"`
* 说明:
当前环境名。 NoneBot 将从 `.env.{environment}` 文件中加载配置。
## _class_ `Config`
基类:`nonebot.config.BaseConfig`
NoneBot 主要配置。大小写不敏感。
除了 NoneBot 的配置项外,还可以自行添加配置项到 `.env.{environment}` 文件中。
这些配置将会在 json 反序列化后一起带入 `Config` 类中。
### `driver`
* 类型: `str`
* 默认值: `"nonebot.drivers.fastapi"`
* 说明:
NoneBot 运行所使用的 `Driver` 。继承自 `nonebot.driver.BaseDriver`
### `host`
* 类型: `IPvAnyAddress`
* 默认值: `127.0.0.1`
* 说明:
NoneBot 的 HTTP 和 WebSocket 服务端监听的 IP/主机名。
### `port`
* 类型: `int`
* 默认值: `8080`
* 说明:
NoneBot 的 HTTP 和 WebSocket 服务端监听的端口。
### `debug`
* 类型: `bool`
* 默认值: `False`
* 说明:
是否以调试模式运行 NoneBot。
### `api_root`
* 类型: `Dict[str, str]`
* 默认值: `{}`
* 说明:
以机器人 ID 为键,上报地址为值的字典,环境变量或文件中应使用 json 序列化。
* 示例:
```default
API_ROOT={"123456": "http://127.0.0.1:5700"}
```
### `api_timeout`
* 类型: `Optional[float]`
* 默认值: `30.`
* 说明:
API 请求超时时间,单位: 秒。
### `access_token`
* 类型: `Optional[str]`
* 默认值: `None`
* 说明:
API 请求以及上报所需密钥,在请求头中携带。
* 示例:
```http
POST /cqhttp/ HTTP/1.1
Authorization: Bearer kSLuTF2GC2Q4q4ugm3
```
### `secret`
* 类型: `Optional[str]`
* 默认值: `None`
* 说明:
HTTP POST 形式上报所需签名,在请求头中携带。
* 示例:
```http
POST /cqhttp/ HTTP/1.1
X-Signature: sha1=f9ddd4863ace61e64f462d41ca311e3d2c1176e2
```
### `superusers`
* 类型: `Set[int]`
* 默认值: `set()`
* 说明:
机器人超级用户。
* 示例:
```default
SUPER_USERS=[12345789]
```
### `nickname`
* 类型: `Set[str]`
* 默认值: `set()`
* 说明:
机器人昵称。
### `command_start`
* 类型: `Set[str]`
* 默认值: `{"/"}`
* 说明:
命令的起始标记,用于判断一条消息是不是命令。
### `command_sep`
* 类型: `Set[str]`
* 默认值: `{"."}`
* 说明:
命令的分隔标记,用于将文本形式的命令切分为元组(实际的命令名)。
### `session_expire_timeout`
* 类型: `timedelta`
* 默认值: `timedelta(minutes=2)`
* 说明:
等待用户回复的超时时间。
* 示例:
```default
SESSION_EXPIRE_TIMEOUT=120 # 单位: 秒
SESSION_EXPIRE_TIMEOUT=[DD ][HH:MM]SS[.ffffff]
SESSION_EXPIRE_TIMEOUT=P[DD]DT[HH]H[MM]M[SS]S # ISO 8601
```
### `apscheduler_config`
* 类型: `dict`
* 默认值: `{"apscheduler.timezone": "Asia/Shanghai"}`
* 说明:
APScheduler 的配置对象,见 [Configuring the Scheduler](https://apscheduler.readthedocs.io/en/latest/userguide.html#configuring-the-scheduler)

View File

@@ -1,37 +0,0 @@
---
contentSidebar: true
sidebarDepth: 0
---
# NoneBot.drivers 模块
## 后端驱动适配基类
各驱动请继承以下基类
## _class_ `BaseDriver`
基类:`abc.ABC`
Driver 基类。将后端框架封装,以满足适配器使用。
### `_adapters`
* **类型**
`Dict[str, Type[Bot]]`
* **说明**
已注册的适配器列表
### _abstract_ `__init__(env, config)`
Initialize self. See help(type(self)) for accurate signature.

View File

@@ -1,16 +0,0 @@
---
contentSidebar: true
sidebarDepth: 0
---
# NoneBot.drivers.fastapi 模块
## _class_ `Driver`
基类:[`nonebot.drivers.BaseDriver`](#None)
### `__init__(env, config)`
Initialize self. See help(type(self)) for accurate signature.

View File

@@ -1,156 +0,0 @@
---
contentSidebar: true
sidebarDepth: 0
---
# NoneBot.exception 模块
## 异常
下列文档中的异常是所有 NoneBot 运行时可能会抛出的。
这些异常并非所有需要用户处理,在 NoneBot 内部运行时被捕获,并进行对应操作。
## _exception_ `IgnoredException`
基类:`Exception`
* **说明**
指示 NoneBot 应该忽略该事件。可由 PreProcessor 抛出。
* **参数**
* `reason`: 忽略事件的原因
## _exception_ `PausedException`
基类:`Exception`
* **说明**
指示 NoneBot 结束当前 `Handler` 并等待下一条消息后继续下一个 `Handler`
可用于用户输入新信息。
* **用法**
可以在 `Handler` 中通过 `Matcher.pause()` 抛出。
## _exception_ `RejectedException`
基类:`Exception`
* **说明**
指示 NoneBot 结束当前 `Handler` 并等待下一条消息后重新运行当前 `Handler`
可用于用户重新输入。
* **用法**
可以在 `Handler` 中通过 `Matcher.reject()` 抛出。
## _exception_ `FinishedException`
基类:`Exception`
* **说明**
指示 NoneBot 结束当前 `Handler` 且后续 `Handler` 不再被运行。
可用于结束用户会话。
* **用法**
可以在 `Handler` 中通过 `Matcher.finish()` 抛出。
## _exception_ `ExpiredException`
基类:`Exception`
* **说明**
指示 NoneBot 当前 `Matcher` 已失效。
* **用法**
`Matcher` 运行前检查时抛出。
## _exception_ `StopPropagation`
基类:`Exception`
* **说明**
指示 NoneBot 终止事件向下层传播。
* **用法**
`Matcher.block == True` 时抛出。
## _exception_ `ApiNotAvailable`
基类:`Exception`
* **说明**
在 API 连接不可用时抛出。
## _exception_ `NetworkError`
基类:`Exception`
* **说明**
在网络出现问题时抛出,如: API 请求地址不正确, API 请求无返回或返回状态非正常等。
## _exception_ `ActionFailed`
基类:`Exception`
* **说明**
API 请求成功返回数据,但 API 操作失败。
* **参数**
* `retcode`: 错误代码

View File

@@ -1,55 +0,0 @@
---
contentSidebar: true
sidebarDepth: 0
---
# NoneBot.log 模块
## 日志
NoneBot 使用 [loguru](https://github.com/Delgan/loguru) 来记录日志信息。
自定义 logger 请参考 [loguru](https://github.com/Delgan/loguru) 文档。
## `logger`
* **说明**
NoneBot 日志记录器对象。
* **默认信息**
* 格式: `[%(asctime)s %(name)s] %(levelname)s: %(message)s`
* 等级: `DEBUG` / `INFO` ,根据 config 配置改变
* 输出: 输出至 stdout
* **用法**
```python
from nonebot.log import logger
```
## _class_ `LoguruHandler`
基类:`logging.Handler`
### `emit(record)`
Do whatever it takes to actually log the specified logging record.
This version is intended to be implemented by subclasses and so
raises a NotImplementedError.

View File

@@ -1,485 +0,0 @@
---
contentSidebar: true
sidebarDepth: 0
---
# NoneBot.matcher 模块
## 事件响应器
该模块实现事件响应器的创建与运行,并提供一些快捷方法来帮助用户更好的与机器人进行 对话 。
## `matchers`
* **类型**
`Dict[int, List[Type[Matcher]]]`
* **说明**
用于存储当前所有的事件响应器
## _class_ `Matcher`
基类:`object`
事件响应器类
### `module`
* **类型**
`Optional[str]`
* **说明**
事件响应器所在模块名称
### `type`
* **类型**
`str`
* **说明**
事件响应器类型
### `rule`
* **类型**
`Rule`
* **说明**
事件响应器匹配规则
### `permission`
* **类型**
`Permission`
* **说明**
事件响应器触发权限
### `priority`
* **类型**
`int`
* **说明**
事件响应器优先级
### `block`
* **类型**
`bool`
* **说明**
事件响应器是否阻止事件传播
### `temp`
* **类型**
`bool`
* **说明**
事件响应器是否为临时
### `expire_time`
* **类型**
`Optional[datetime]`
* **说明**
事件响应器过期时间点
### `_default_state`
* **类型**
`dict`
* **说明**
事件响应器默认状态
### `_default_parser`
* **类型**
`Optional[ArgsParser]`
* **说明**
事件响应器默认参数解析函数
### `__init__()`
实例化 Matcher 以便运行
### `handlers`
* **类型**
`List[Handler]`
* **说明**
事件响应器拥有的事件处理函数列表
### _classmethod_ `new(type_='', rule=None, permission=None, handlers=None, temp=False, priority=1, block=False, *, module=None, default_state=None, expire_time=None)`
* **说明**
创建一个新的事件响应器,并存储至 [matchers](#matchers)
* **参数**
* `type_: str`: 事件响应器类型,与 `event.type` 一致时触发,空字符串表示任意
* `rule: Optional[Rule]`: 匹配规则
* `permission: Optional[Permission]`: 权限
* `handlers: Optional[List[Handler]]`: 事件处理函数列表
* `temp: bool`: 是否为临时事件响应器,即触发一次后删除
* `priority: int`: 响应优先级
* `block: bool`: 是否阻止事件向更低优先级的响应器传播
* `module: Optional[str]`: 事件响应器所在模块名称
* `default_state: Optional[dict]`: 默认状态 `state`
* `expire_time: Optional[datetime]`: 事件响应器最终有效时间点,过时即被删除
* **返回**
* `Type[Matcher]`: 新的事件响应器类
### _async classmethod_ `check_perm(bot, event)`
* **说明**
检查是否满足触发权限
* **参数**
* `bot: Bot`: Bot 对象
* `event: Event`: 上报事件
* **返回**
* `bool`: 是否满足权限
### _async classmethod_ `check_rule(bot, event, state)`
* **说明**
检查是否满足匹配规则
* **参数**
* `bot: Bot`: Bot 对象
* `event: Event`: 上报事件
* `state: dict`: 当前状态
* **返回**
* `bool`: 是否满足匹配规则
### _classmethod_ `args_parser(func)`
* **说明**
装饰一个函数来更改当前事件响应器的默认参数解析函数
* **参数**
* `func: ArgsParser`: 参数解析函数
### _classmethod_ `handle()`
* **说明**
装饰一个函数来向事件响应器直接添加一个处理函数
* **参数**
*
### _classmethod_ `receive()`
* **说明**
装饰一个函数来指示 NoneBot 在接收用户新的一条消息后继续运行该函数
* **参数**
*
### _classmethod_ `got(key, prompt=None, args_parser=None)`
* **说明**
装饰一个函数来指示 NoneBot 当要获取的 `key` 不存在时接收用户新的一条消息并经过 `ArgsParser` 处理后再运行该函数,如果 `key` 已存在则直接继续运行
* **参数**
* `key: str`: 参数名
* `prompt: Optional[Union[str, Message, MessageSegment]]`: 在参数不存在时向用户发送的消息
* `args_parser: Optional[ArgsParser]`: 可选参数解析函数,空则使用默认解析函数
### _async classmethod_ `send(message)`
* **说明**
发送一条消息给当前交互用户
* **参数**
* `message: Union[str, Message, MessageSegment]`: 消息内容
### _async classmethod_ `finish(message=None)`
* **说明**
发送一条消息给当前交互用户并结束当前事件响应器
* **参数**
* `message: Union[str, Message, MessageSegment]`: 消息内容
### _async classmethod_ `pause(prompt=None)`
* **说明**
发送一条消息给当前交互用户并暂停事件响应器,在接收用户新的一条消息后继续下一个处理函数
* **参数**
* `prompt: Union[str, Message, MessageSegment]`: 消息内容
### _async classmethod_ `reject(prompt=None)`
* **说明**
发送一条消息给当前交互用户并暂停事件响应器,在接收用户新的一条消息后重新运行当前处理函数
* **参数**
* `prompt: Union[str, Message, MessageSegment]`: 消息内容
## _class_ `MatcherGroup`
基类:`object`
事件响应器组合,统一管理。用法同 `Matcher`
### `__init__(type_='', rule=None, permission=None, handlers=None, temp=False, priority=1, block=False, *, module=None, default_state=None, expire_time=None)`
* **说明**
创建一个事件响应器组合,参数为默认值,与 `Matcher.new` 一致
### `matchers`
* **类型**
`List[Type[Matcher]]`
* **说明**
组内事件响应器列表
### `new(type_='', rule=None, permission=None, handlers=None, temp=False, priority=1, block=False, *, module=None, default_state=None, expire_time=None)`
* **说明**
在组中创建一个新的事件响应器,参数留空则使用组合默认值
:::danger 警告
如果使用 handlers 参数覆盖组合默认值则该事件响应器不会随组合一起添加新的事件处理函数
:::

View File

@@ -1,257 +0,0 @@
---
contentSidebar: true
sidebarDepth: 0
---
# NoneBot 模块
## 快捷导入
为方便使用,`nonebot` 模块从子模块导入了部分内容
* `on_message` => `nonebot.plugin.on_message`
* `on_notice` => `nonebot.plugin.on_notice`
* `on_request` => `nonebot.plugin.on_request`
* `on_metaevent` => `nonebot.plugin.on_metaevent`
* `on_startswith` => `nonebot.plugin.on_startswith`
* `on_endswith` => `nonebot.plugin.on_endswith`
* `on_command` => `nonebot.plugin.on_command`
* `on_regex` => `nonebot.plugin.on_regex`
* `on_regex` => `nonebot.plugin.on_regex`
* `on_regex` => `nonebot.plugin.on_regex`
* `CommandGroup` => `nonebot.plugin.CommandGroup`
* `load_plugin` => `nonebot.plugin.load_plugin`
* `load_plugins` => `nonebot.plugin.load_plugins`
* `load_builtin_plugins` => `nonebot.plugin.load_builtin_plugins`
* `get_loaded_plugins` => `nonebot.plugin.get_loaded_plugins`
## `get_driver()`
* **说明**
获取全局 Driver 对象。可用于在计划任务的回调中获取当前 Driver 对象。
* **返回**
* `Driver`: 全局 Driver 对象
* **异常**
* `ValueError`: 全局 Driver 对象尚未初始化 (nonebot.init 尚未调用)
* **用法**
```python
driver = nonebot.get_driver()
```
## `get_app()`
* **说明**
获取全局 Driver 对应 Server App 对象。
* **返回**
* `Any`: Server App 对象
* **异常**
* `ValueError`: 全局 Driver 对象尚未初始化 (nonebot.init 尚未调用)
* **用法**
```python
app = nonebot.get_app()
```
## `get_asgi()`
* **说明**
获取全局 Driver 对应 Asgi 对象。
* **返回**
* `Any`: Asgi 对象
* **异常**
* `ValueError`: 全局 Driver 对象尚未初始化 (nonebot.init 尚未调用)
* **用法**
```python
asgi = nonebot.get_asgi()
```
## `get_bots()`
* **说明**
获取所有通过 ws 连接 NoneBot 的 Bot 对象。
* **返回**
* `Dict[str, Bot]`: 一个以字符串 ID 为键Bot 对象为值的字典
* **异常**
* `ValueError`: 全局 Driver 对象尚未初始化 (nonebot.init 尚未调用)
* **用法**
```python
bots = nonebot.get_bots()
```
## `init(*, _env_file=None, **kwargs)`
* **说明**
初始化 NoneBot 以及 全局 Driver 对象。
NoneBot 将会从 .env 文件中读取环境信息,并使用相应的 env 文件配置。
你也可以传入自定义的 _env_file 来指定 NoneBot 从该文件读取配置。
* **参数**
* `_env_file: Optional[str]`: 配置文件名,默认从 .env.{env_name} 中读取配置
* `**kwargs`: 任意变量,将会存储到 Config 对象里
* **返回**
* `None`
* **用法**
```python
nonebot.init(database=Database(...))
```
## `run(host=None, port=None, *args, **kwargs)`
* **说明**
启动 NoneBot即运行全局 Driver 对象。
* **参数**
* `host: Optional[str]`: 主机名IP若不传入则使用配置文件中指定的值
* `port: Optional[int]`: 端口,若不传入则使用配置文件中指定的值
* `*args`: 传入 Driver.run 的位置参数
* `**kwargs`: 传入 Driver.run 的命名参数
* **返回**
* `None`
* **用法**
```python
nonebot.run(host="127.0.0.1", port=8080)
```

View File

@@ -1,121 +0,0 @@
---
contentSidebar: true
sidebarDepth: 0
---
# NoneBot.permission 模块
## 权限
每个 `Matcher` 拥有一个 `Permission` ,其中是 **异步** `PermissionChecker` 的集合,只要有一个 `PermissionChecker` 检查结果为 `True` 时就会继续运行。
:::tip 提示
`PermissionChecker` 既可以是 async function 也可以是 sync function
:::
## `MESSAGE`
* **说明**: 匹配任意 `message` 类型事件,仅在需要同时捕获不同类型事件时使用。优先使用 message type 的 Matcher。
## `NOTICE`
* **说明**: 匹配任意 `notice` 类型事件,仅在需要同时捕获不同类型事件时使用。优先使用 notice type 的 Matcher。
## `REQUEST`
* **说明**: 匹配任意 `request` 类型事件,仅在需要同时捕获不同类型事件时使用。优先使用 request type 的 Matcher。
## `METAEVENT`
* **说明**: 匹配任意 `meta_event` 类型事件,仅在需要同时捕获不同类型事件时使用。优先使用 meta_event type 的 Matcher。
## `USER(*user, perm=<nonebot.permission.Permission object>)`
* **说明**
在白名单内且满足 perm
* **参数**
* `*user: int`: 白名单
* `perm: Permission`: 需要同时满足的权限
## `PRIVATE`
* **说明**: 匹配任意私聊消息类型事件
## `PRIVATE_FRIEND`
* **说明**: 匹配任意好友私聊消息类型事件
## `PRIVATE_GROUP`
* **说明**: 匹配任意群临时私聊消息类型事件
## `PRIVATE_OTHER`
* **说明**: 匹配任意其他私聊消息类型事件
## `GROUP`
* **说明**: 匹配任意群聊消息类型事件
## `GROUP_MEMBER`
* **说明**: 匹配任意群员群聊消息类型事件
:::warning 警告
该权限通过 event.sender 进行判断且不包含管理员以及群主!
:::
## `GROUP_ADMIN`
* **说明**: 匹配任意群管理员群聊消息类型事件
## `GROUP_OWNER`
* **说明**: 匹配任意群主群聊消息类型事件
## `SUPERUSER`
* **说明**: 匹配任意超级用户消息类型事件
## `EVERYBODY`
* **说明**: 匹配任意消息类型事件

View File

@@ -1,202 +0,0 @@
---
contentSidebar: true
sidebarDepth: 0
---
# NoneBot.rule 模块
## 规则
每个事件响应器 `Matcher` 拥有一个匹配规则 `Rule` ,其中是 **异步** `RuleChecker` 的集合,只有当所有 `RuleChecker` 检查结果为 `True` 时继续运行。
:::tip 提示
`RuleChecker` 既可以是 async function 也可以是 sync function但在最终会被 `nonebot.utils.run_sync` 转换为 async function
:::
## _class_ `Rule`
基类:`object`
* **说明**
`Matcher` 规则类,当事件传递时,在 `Matcher` 运行前进行检查。
* **示例**
```python
Rule(async_function) & sync_function
# 等价于
from nonebot.utils import run_sync
Rule(async_function, run_sync(sync_function))
```
### `__init__(*checkers)`
* **参数**
* `*checkers: Callable[[Bot, Event, dict], Awaitable[bool]]`: **异步** RuleChecker
### `checkers`
* **说明**
存储 `RuleChecker`
* **类型**
* `Set[Callable[[Bot, Event, dict], Awaitable[bool]]]`
### _async_ `__call__(bot, event, state)`
* **说明**
检查是否符合所有规则
* **参数**
* `bot: Bot`: Bot 对象
* `event: Event`: Event 对象
* `state: dict`: 当前 State
* **返回**
* `bool`
## `startswith(msg)`
* **说明**
匹配消息开头
* **参数**
* `msg: str`: 消息开头字符串
## `endswith(msg)`
* **说明**
匹配消息结尾
* **参数**
* `msg: str`: 消息结尾字符串
## `keyword(msg)`
* **说明**
匹配消息关键词
* **参数**
* `msg: str`: 关键词
## `command(command)`
* **说明**
命令形式匹配,根据配置里提供的 `command_start`, `command_sep` 判断消息是否为命令。
* **参数**
* `command: Tuples[str, ...]`: 命令内容
* **示例**
使用默认 `command_start`, `command_sep` 配置
命令 `("test",)` 可以匹配:`/test` 开头的消息
命令 `("test", "sub")` 可以匹配”`/test.sub` 开头的消息
:::tip 提示
命令内容与后续消息间无需空格!
:::
## `regex(regex, flags=0)`
* **说明**
根据正则表达式进行匹配
* **参数**
* `regex: str`: 正则表达式
* `flags: Union[int, re.RegexFlag]`: 正则标志
## `to_me()`
* **说明**
通过 `event.to_me` 判断消息是否是发送给机器人
* **参数**
*

View File

@@ -1,41 +0,0 @@
---
contentSidebar: true
sidebarDepth: 0
---
# NoneBot.sched 模块
## 计划任务
计划任务使用第三方库 [APScheduler](https://github.com/agronholm/apscheduler) ,使用文档请参考 [APScheduler使用文档](https://apscheduler.readthedocs.io/en/latest/) 。
## `scheduler`
* **类型**
`Optional[apscheduler.schedulers.asyncio.AsyncIOScheduler]`
* **说明**
当可选依赖 `APScheduler` 未安装时,`scheduler` 为 None
使用 `pip install nonebot[scheduler]` 安装可选依赖
* **常用示例**
```python
from nonebot import scheduler
@scheduler.scheduled_job("cron", hour="*/2", id="xxx", args=[1], kwargs={arg2: 2})
async def run_every_2_hour(arg1, arg2):
pass
scheduler.add_job(run_every_day_from_program_start, "interval", days=1, id="xxx")
```

View File

@@ -1,252 +0,0 @@
---
contentSidebar: true
sidebarDepth: 0
---
# NoneBot.typing 模块
## 类型
下面的文档中,「类型」部分使用 Python 的 Type Hint 语法,见 [PEP 484](https://www.python.org/dev/peps/pep-0484/)、[PEP 526](https://www.python.org/dev/peps/pep-0526/) 和 [typing](https://docs.python.org/3/library/typing.html)。
除了 Python 内置的类型,下面还出现了如下 NoneBot 自定类型,实际上它们是 Python 内置类型的别名。
以下类型均可从 nonebot.typing 模块导入。
## `Driver`
* **类型**
`BaseDriver`
* **说明**
所有 Driver 的基类。
## `WebSocket`
* **类型**
`BaseWebSocket`
* **说明**
所有 WebSocket 的基类。
## `Bot`
* **类型**
`BaseBot`
* **说明**
所有 Bot 的基类。
## `Event`
* **类型**
`BaseEvent`
* **说明**
所有 Event 的基类。
## `Message`
* **类型**
`BaseMessage`
* **说明**
所有 Message 的基类。
## `MessageSegment`
* **类型**
`BaseMessageSegment`
* **说明**
所有 MessageSegment 的基类。
## `PreProcessor`
* **类型**
`Callable[[Bot, Event, dict], Union[Awaitable[None], Awaitable[NoReturn]]]`
* **说明**
消息预处理函数 PreProcessor 类型
## `Matcher`
* **类型**
`Matcher`
* **说明**
Matcher 即响应事件的处理类。通过 Rule 判断是否响应事件,运行 Handler。
## `MatcherGroup`
* **类型**
`MatcherGroup`
* **说明**
MatcherGroup 为 Matcher 的集合。可以共享 Handler。
## `Rule`
* **类型**
`Rule`
* **说明**
Rule 即判断是否响应事件的处理类。内部存储 RuleChecker ,返回全为 True 则响应事件。
## `RuleChecker`
* **类型**
`Callable[[Bot, Event, dict], Union[bool, Awaitable[bool]]]`
* **说明**
RuleChecker 即判断是否响应事件的处理函数。
## `Permission`
* **类型**
`Permission`
* **说明**
Permission 即判断是否响应消息的处理类。内部存储 PermissionChecker ,返回只要有一个 True 则响应消息。
## `PermissionChecker`
* **类型**
`Callable[[Bot, Event], Union[bool, Awaitable[bool]]]`
* **说明**
RuleChecker 即判断是否响应消息的处理函数。
## `Handler`
* **类型**
`Callable[[Bot, Event, dict], Union[Awaitable[None], Awaitable[NoReturn]]]`
* **说明**
Handler 即事件的处理函数。
## `ArgsParser`
* **类型**
`Callable[[Bot, Event, dict], Union[Awaitable[None], Awaitable[NoReturn]]]`
* **说明**
ArgsParser 即消息参数解析函数,在 Matcher.got 获取参数时被运行。

View File

@@ -1,62 +0,0 @@
---
contentSidebar: true
sidebarDepth: 0
---
# NoneBot.utils 模块
## `escape_tag(s)`
* **说明**
用于记录带颜色日志时转义 `<tag>` 类型特殊标签
* **参数**
* `s: str`: 需要转义的字符串
* **返回**
* `str`
## `run_sync(func)`
* **说明**
一个用于包装 sync function 为 async function 的装饰器
* **参数**
* `func: Callable[..., Any]`: 被装饰的同步函数
* **返回**
* `Callable[..., Awaitable[Any]]`
## _class_ `DataclassEncoder`
基类:`json.encoder.JSONEncoder`
* **说明**
在JSON序列化 `Message` (List[Dataclass]) 时使用的 `JSONEncoder`

View File

@@ -1,34 +0,0 @@
# 概览
:::tip 提示
如果在阅读本文档时遇到难以理解的词汇,请随时查阅 [术语表](../glossary.md) 或使用 [Google 搜索](https://www.google.com/)。
:::
:::tip 提示
初次使用时可能会觉得这里的概览过于枯燥,可以先简单略读之后直接前往 [安装](./installation.md) 查看安装方法,并进行后续的基础使用教程。
:::
NoneBot2 是一个可扩展的 Python 异步机器人框架,它会对机器人收到的消息进行解析和处理,并以插件化的形式,分发给消息所对应的命令处理器和自然语言处理器,来完成具体的功能。
除了起到解析消息的作用NoneBot 还为插件提供了大量实用的预设操作和权限控制机制,尤其对于命令处理器,它更是提供了完善且易用的会话机制和内部调用机制,以分别适应命令的连续交互和插件内部功能复用等需求。
目前 NoneBot2 在 [FastAPI](https://fastapi.tiangolo.com/) 的基础上封装了与 [CQHTTP(OneBot) 协议](http://cqhttp.cc/)插件的网络交互。
得益于 Python 的 [asyncio](https://docs.python.org/3/library/asyncio.html) 机制NoneBot 处理消息的吞吐量有了很大的保障,再配合 WebSocket 通信方式也是最建议的通信方式NoneBot 的性能可以达到 HTTP 通信方式的两倍以上,相较于传统同步 I/O 的 HTTP 通信,更是有质的飞跃。
需要注意的是NoneBot 仅支持 Python 3.7+ 及 CQHTTP(OneBot) 插件 v11+。
## 它如何工作?
~~未填坑~~
## 特色
- 提供直观的测试前端
- 提供使用简易的脚手架
- 基于异步 I/O
- 同时支持 HTTP 和反向 WebSocket 通信方式
- 支持多个机器人账号负载均衡
- 提供直观的交互式会话接口
- 提供可自定义的权限控制机制
- 多种方式渲染要发送的消息内容,使对话足够自然

View File

@@ -1,68 +0,0 @@
# 基本配置
到目前为止我们还在使用 NoneBot 的默认行为,在开始编写自己的插件之前,我们先尝试在配置文件上动动手脚,让 NoneBot 表现出不同的行为。
在上一章节中,我们创建了默认的项目结构,其中 `.env`, `.env.*` 均为项目的配置文件,下面将介绍几种 NoneBot 配置方式。
:::danger 警告
请勿将敏感信息写入配置文件并提交至开源仓库!
:::
## .env 文件
NoneBot 在启动时将会从系统环境变量或者 `.env` 文件中寻找变量 `ENVIRONMENT` (大小写不敏感),默认值为 `prod`
这将引导 NoneBot 从系统环境变量或者 `.env.{ENVIRONMENT}` 文件中进一步加载具体配置。
现在,我们在 `.env` 文件中写入当前环境信息
```bash
# .env
ENVIRONMENT=dev
```
## .env.\* 文件
详细配置文件,使用 [pydantic](https://pydantic-docs.helpmanual.io/) 加载配置。在 NoneBot 初始化时可以指定忽略 `.env` 中的环境信息转而加载某个配置文件: `nonebot.init(_env_file=".env.dev")`
:::warning 提示
由于 `pydantic` 使用 JSON 加载配置项,请确保配置项值为 JSON 能够解析的数据。如果 JSON 解析失败将作为字符串处理。
:::
示例及说明:
```bash
HOST=0.0.0.0 # 配置 NoneBot 监听的 IP/主机名
PORT=8080 # 配置 NoneBot 监听的端口
DEBUG=true # 开启 debug 模式 **请勿在生产环境开启**
SUPERUSERS=["123456789", "987654321"] # 配置 NoneBot 超级用户
NICKNAME=["awesome", "bot"] # 配置机器人的昵称
COMMAND_START=["/", ""] # 配置命令起始字符
COMMAND_SEP=["."] # 配置命令分割字符
# Custom Configs
CUSTOM_CONFIG1="config in env file"
CUSTOM_CONFIG2= # 留空则从系统环境变量读取,如不存在则为空字符串
```
详细的配置项参考 [Config Reference](../api/config.md) 。
## bot.py 文件
配置项也可以在 NoneBot 初始化时传入。此处可以传入任意合法 Python 变量。当然也可以在初始化完成后修改或新增。
示例:
```python
# bot.py
import nonebot
nonebot.init(custom_config3="config on init")
config = nonebot.get_driver().config
config.custom_config3 = "changed after init"
config.custom_config4 = "new config after init"
```
## 优先级
`bot.py init` > `env file` > `system env`

View File

@@ -1,55 +0,0 @@
# 创建一个完整的项目
上一章中我们已经运行了一个最小的 NoneBot 实例,在这一章,我们将从零开始一个完整的项目。
## 目录结构
首先,我们可以使用 `nb-cli` 或者自行创建项目目录:
```bash
pip install nonebot2[cli]
# pip install nb-cli
nb create
```
这将创建默认的目录结构
<!-- prettier-ignore-start -->
:::vue
AweSome-Bot
├── `awesome_bot` _(**或是 src**)_
│ └── `plugins`
├── `.env` _(**可选的**)_
├── `.env.dev` _(**可选的**)_
├── `.env.prod` _(**可选的**)_
├── .gitignore
├── `bot.py`
├── docker-compose.yml
├── Dockerfile
├── `pyproject.toml`
└── README.md
:::
<!-- prettier-ignore-end -->
- `awesome_bot/plugins``src/plugins`: 用于存放编写的 bot 插件
- `.env`, `.env.dev`, `.env.prod`: 各环境配置文件
- `bot.py`: bot 入口文件
- `pyproject.toml`: 项目依赖管理文件,默认使用 [poetry](https://python-poetry.org/)
## 启动 Bot
如果你使用 `nb-cli`
```bash
nb run [--file=bot.py] [--app=app]
```
或者使用
```bash
python bot.py
```
:::tip 提示
如果在 bot 入口文件内定义了 asgi server `nb-cli` 将会为你启动**冷重载模式**
:::

View File

@@ -1,146 +0,0 @@
# 开始使用
一切都安装成功后,你就已经做好了进行简单配置以运行一个最小的 NoneBot 实例的准备。
## 最小实例
使用你最熟悉的编辑器或 IDE创建一个名为 `bot.py` 的文件,内容如下:
```python{3,4,7}
import nonebot
nonebot.init()
nonebot.load_builtin_plugins()
if __name__ == "__main__":
nonebot.run()
```
这几行高亮代码将依次:
1. 使用默认配置初始化 NoneBot 包
2. 加载 NoneBot 内置的插件
3. 在地址 `127.0.0.1:8080` 运行 NoneBot
在命令行使用如下命令即可运行这个 NoneBot 实例:
```bash
python bot.py
```
运行后会产生如下日志:
```default
09-14 21:02:00 [INFO] nonebot | Succeeded to import "nonebot.plugins.base"
09-14 21:02:00 [INFO] nonebot | Running NoneBot...
09-14 21:02:00 [INFO] uvicorn | Started server process [1234]
09-14 21:02:00 [INFO] uvicorn | Waiting for application startup.
09-14 21:02:00 [INFO] nonebot | Scheduler Started
09-14 21:02:00 [INFO] uvicorn | Application startup complete.
09-14 21:02:00 [INFO] uvicorn | Uvicorn running on http://127.0.0.1:8080 (Press CTRL+C to quit)
```
## 配置 QQ 协议端
单纯运行 NoneBot 实例并不会产生任何效果,因为此刻 QQ 这边还不知道 NoneBot 的存在,也就无法把消息发送给它,因此现在需要使用一个无头 QQ 来把消息等事件上报给 NoneBot。
目前支持的协议有:
- [OneBot(CQHTTP)](https://github.com/howmanybots/onebot)
QQ 协议端举例:
- [Mirai](https://github.com/mamoe/mirai) + [cqhttp-mirai](https://github.com/yyuueexxiinngg/cqhttp-mirai)
- [cqhttp-mirai-embedded](https://github.com/yyuueexxiinngg/cqhttp-mirai/tree/embedded)
- [Mirai](https://github.com/mamoe/mirai) + [Mirai Native](https://github.com/iTXTech/mirai-native) + [CQHTTP](https://github.com/richardchien/coolq-http-api)
- [go-cqhttp](https://github.com/Mrs4s/go-cqhttp) (基于 [MiraiGo](https://github.com/Mrs4s/MiraiGo))
- [OICQ-http-api](https://github.com/takayama-lily/onebot) (基于 [OICQ](https://github.com/takayama-lily/oicq))
这里以 [go-cqhttp](https://github.com/Mrs4s/go-cqhttp) 为例
1. 下载 go-cqhttp 对应平台的 release 文件
2. 双击 exe 文件或者使用 `./go-cqhttp` 启动
3. 生成默认配置文件并修改默认配置
```json{2,3,30-31}
{
"uin": 你的QQ号,
"password": "你的密码",
"encrypt_password": false,
"password_encrypted": "",
"enable_db": true,
"access_token": "",
"relogin": {
"enabled": true,
"relogin_delay": 3,
"max_relogin_times": 0
},
"ignore_invalid_cqcode": false,
"force_fragmented": true,
"heartbeat_interval": 0,
"http_config": {
"enabled": false,
"host": "0.0.0.0",
"port": 5700,
"timeout": 0,
"post_urls": {}
},
"ws_config": {
"enabled": false,
"host": "0.0.0.0",
"port": 6700
},
"ws_reverse_servers": [
{
"enabled": true,
"reverse_url": "ws://127.0.0.1:8080/cqhttp/ws",
"reverse_api_url": "",
"reverse_event_url": "",
"reverse_reconnect_interval": 3000
}
],
"post_message_format": "string",
"debug": false,
"log_level": ""
}
```
其中 `ws://127.0.0.1:8080/cqhttp/ws` 中的 `127.0.0.1` 和 `8080` 应分别对应 nonebot 配置的 HOST 和 PORT
## 历史性的第一次对话
一旦新的配置文件正确生效之后NoneBot 所在的控制台(如果正在运行的话)应该会输出类似下面的内容(两条访问日志):
```default
09-14 21:31:16 [INFO] uvicorn | ('127.0.0.1', 12345) - "WebSocket /cqhttp/ws" [accepted]
09-14 21:31:16 [INFO] nonebot | WebSocket Connection from CQHTTP Bot 你的QQ号 Accepted!
```
这表示 QQ 协议端已经成功地使用 CQHTTP 协议连接上了 NoneBot。
:::warning 注意
如果到这一步你没有看到上面这样的成功日志CQHTTP 的日志中在不断地重连或无反应,请注意检查配置中的 IP 和端口是否确实可以访问。比较常见的出错点包括:
- NoneBot 监听 `0.0.0.0`,然后在 CQHTTP 配置中填了 `ws://0.0.0.0:8080/cqhttp/ws`
- 在 Docker 容器内运行 CQHTTP并通过 `127.0.0.1` 访问宿主机上的 NoneBot
- 想从公网访问,但没有修改云服务商的安全组策略或系统防火墙
- NoneBot 所监听的端口存在冲突,已被其它程序占用
- 弄混了 NoneBot 的 `host`、`port` 参数与 CQHTTP 配置中的 `host`、`port` 参数
- 使用了 `ws_reverse_api_url` 和 `ws_reverse_event_url` 而非 universal client
- `ws://` 错填为 `http://`
- CQHTTP 或 NoneBot 启动时遭到外星武器干扰
请尝试重启 CQHTTP、重启 NoneBot、更换端口、修改防火墙、重启系统、仔细阅读前面的文档及提示、更新 CQHTTP 和 NoneBot 到最新版本等方式来解决。
:::
现在,尝试向你的 QQ 机器人账号发送如下内容:
```default
/say 你好,世界
```
到这里如果一切 OK你应该会收到机器人给你回复了 `你好,世界`。这一历史性的对话标志着你已经成功地运行了一个 NoneBot 的最小实例,开始了编写更强大的 QQ 机器人的创意之旅!
<ClientOnly>
<Messenger :messages="[{ position: 'right', msg: '/say 你好,世界' }, { position: 'left', msg: '你好,世界' }]"/>
</ClientOnly>

View File

@@ -1,73 +0,0 @@
# 安装
## NoneBot
:::warning 注意
请确保你的 Python 版本 >= 3.7。
:::
```bash
pip install nonebot2
```
如果你需要使用最新的(可能尚未发布的)特性,可以克隆 Git 仓库后手动安装:
```bash
git clone https://github.com/nonebot/nonebot2.git
cd nonebot2
poetry install --no-dev # 推荐
pip install . # 不推荐
```
## 额外依赖
### APScheduler
A task scheduling library for Python.
可用于计划任务,后台执行任务等
```bash
pip install nonebot2[scheduler]
poetry add nonebot2[scheduler]
```
[View On GitHub](https://github.com/agronholm/apscheduler)
### NoneBot-Test
A test frontend for nonebot2.
通过前端展示 nonebot 已加载的插件以及运行状态,同时可以用于模拟发送事件测试机器人
```bash
pip install nonebot2[test]
poetry add nonebot2[test]
```
[View On GitHub](https://github.com/nonebot/nonebot-test)
### CLI
CLI for nonebot2.
一个多功能脚手架
```bash
pip install nonebot2[cli]
poetry add nonebot2[cli]
```
[View On GitHub](https://github.com/yanyongyu/nb-cli)
### 我全都要
```bash
pip install nonebot2[full]
poetry add nonebot2[full]
```
```bash
pip install nonebot2[cli,scheduler]
poetry add nonebot2[cli,scheduler]
```

View File

@@ -1,290 +0,0 @@
# 编写插件
本章将以一个天气查询插件为例,教学如何编写自己的命令。
## 加载插件
在 [创建一个完整的项目](creating-a-project) 一章节中,我们已经创建了插件目录 `awesome_bot/plugins`,现在我们在机器人入口文件中加载它。当然,你也可以单独加载一个插件。
:::tip 提示
加载插件目录时,目录下以 `_` 下划线开头的插件将不会被加载!
:::
`bot.py` 文件中添加以下行:
```python{5,7}
import nonebot
nonebot.init()
# 加载单独的一个插件参数为合法的python包名
nonebot.load_plugin("nonebot.plugins.base")
# 加载插件目录,该目录下为各插件,以下划线开头的插件将不会被加载
nonebot.load_plugins("awesome_bot/plugins")
app = nonebot.get_asgi()
if __name__ == "__main__":
nonebot.run()
```
尝试运行 `nb run` 或者 `python bot.py`,可以看到日志输出了类似如下内容:
```plain
09-19 21:51:59 [INFO] nonebot | Succeeded to import "nonebot.plugins.base"
09-19 21:51:59 [INFO] nonebot | Succeeded to import "plugin_in_folder"
```
## 创建插件
现在我们已经有了一个空的插件目录,我们可以开始创建插件了!插件有两种形式
### 单文件形式
在插件目录下创建名为 `weather.py` 的 Python 文件,暂时留空,此时目录结构如下:
<!-- prettier-ignore-start -->
:::vue
AweSome-Bot
├── awesome_bot
│ └── plugins
│ └── `weather.py`
├── .env
├── .env.dev
├── .env.prod
├── .gitignore
├── bot.py
├── docker-compose.yml
├── Dockerfile
├── pyproject.toml
└── README.md
:::
<!-- prettier-ignore-end -->
这个时候它已经可以被称为一个插件了,尽管它还什么都没做。
### 包形式
在插件目录下创建文件夹 `weather`,并在该文件夹下创建文件 `__init__.py`,此时目录结构如下:
<!-- prettier-ignore-start -->
:::vue
AweSome-Bot
├── awesome_bot
│ └── plugins
│ └── `weather`
│ └── `__init__.py`
├── .env
├── .env.dev
├── .env.prod
├── .gitignore
├── bot.py
├── docker-compose.yml
├── Dockerfile
├── pyproject.toml
└── README.md
:::
<!-- prettier-ignore-end -->
这个时候 `weather` 就是一个合法的 Python 包了,同时也是合法的 NoneBot 插件,插件内容可以在 `__init__.py` 中编写。
## 编写真正的内容
好了,现在插件已经可以正确加载,我们可以开始编写命令的实际代码了。在 `weather.py` 中添加如下代码:
```python
from nonebot import on_command
from nonebot.rule import to_me
from nonebot.adapters.cqhttp import Bot, Event
weather = on_command("天气", rule=to_me(), priority=5)
@weather.handle()
async def handle_first_receive(bot: Bot, event: Event, state: dict):
args = str(event.message).strip() # 首次发送命令时跟随的参数,例:/天气 上海则args为上海
if args:
state["city"] = args # 如果用户发送了参数则直接赋值
@weather.got("city", prompt="你想查询哪个城市的天气呢?")
async def handle_city(bot: Bot, event: Event, state: dict):
city = state["city"]
if city not in ["上海", "北京"]:
await weather.reject("你想查询的城市暂不支持,请重新输入!")
city_weather = await get_weather(city)
await weather.finish(city_weather)
async def get_weather(city: str):
return f"{city}的天气是..."
```
为了简单起见,我们在这里的例子中没有接入真实的天气数据,但要接入也非常简单,你可以使用中国天气网、和风天气等网站提供的 API。
下面我们来说明这段代码是如何工作的。
:::tip 提示
从这里开始,你需要对 Python 的 asyncio 编程有所了解,因为 NoneBot 是完全基于 asyncio 的,具体可以参考 [廖雪峰的 Python 教程](https://www.liaoxuefeng.com/wiki/1016959663602400/1017959540289152)
:::
### 注册一个 [事件响应器](../api/matcher.md)
```python{4}
from nonebot import on_command
from nonebot.rule import to_me
from nonebot.permission import Permission
weather = on_command("天气", rule=to_me(), permission=Permission(), priority=5)
```
在上方代码中,我们注册了一个事件响应器 `Matcher`,它由几个部分组成:
1. `on_command` 注册一个消息类型的命令处理器
2. `"天气"` 指定 command 参数 - 命令名
3. `rule` 补充事件响应器的匹配规则
4. `priority` 事件响应器优先级
5. `block` 是否阻止事件传递
其他详细配置可以参考 API 文档,下面我们详细说明各个部分:
#### 事件响应器类型 type
事件响应器类型其实就是对应 `Event.type` NoneBot 提供了一个基础类型事件响应器 `on()` 以及一些内置的事件响应器。
- `on("事件类型")`: 基础事件响应器,第一个参数为事件类型,空字符串表示不限
- `on_metaevent()` ~ `on("meta_event")`: 元事件响应器
- `on_message()` ~ `on("message")`: 消息事件响应器
- `on_request()` ~ `on("request")`: 请求事件响应器
- `on_notice()` ~ `on("notice")`: 通知事件响应器
- `on_startswith(str)` ~ `on("message", startswith(str))`: 消息开头匹配处理器
- `on_endswith(str)` ~ `on("message", endswith(str))`: 消息结尾匹配处理器
- `on_command(str|tuple)` ~ `on("message", command(str|tuple))`: 命令处理器
- `on_regex(pattern_str)` ~ `on("message", regex(pattern_str))`: 正则匹配处理器
#### 匹配规则 rule
事件响应器的匹配规则即 `Rule`,由非负个 `RuleChecker` 组成,当所有 `RuleChecker` 返回 `True` 时匹配成功。这些 `RuleChecker` 的形式如下:
```python
async def check(bot: Bot, event: Event, state: dict) -> bool:
return True
def check(bot: Bot, event: Event, state: dict) -> bool:
return True
```
`Rule` 和 `RuleChecker` 之间可以使用 `&` 互相组合:
```python
from nonebot.rule import Rule
Rule(async_checker1) & sync_checker & async_checker2
```
:::danger 警告
`Rule(*checkers)` 只接受 async function或使用 `nonebot.utils.run_sync` 自行包裹 sync function。在使用 `&` 时NoneBot 会自动包裹 sync function
:::
#### 优先级 priority
事件响应器的优先级代表事件响应器的执行顺序,同一优先级的事件响应器会 **同时执行!**
:::tip 提示
使用 `nonebot-test` 可以看到当前所有事件响应器的执行流程,有助理解事件响应流程!
```bash
pip install nonebot2[test]
```
:::
#### 阻断 block
当有任意事件响应器发出了阻止事件传递信号时,该事件将不再会传递给下一优先级,直接结束处理。
NoneBot 内置的事件响应器中,所有 `message` 类的事件响应器默认会阻断事件传递,其他则不会。
### 编写事件处理函数 [Handler](../api/typing.md#handler)
```python{1,2,8,9}
@weather.handle()
async def handle_first_receive(bot: Bot, event: Event, state: dict):
args = str(event.message).strip() # 首次发送命令时跟随的参数,例:/天气 上海则args为上海
if args:
state["city"] = args # 如果用户发送了参数则直接赋值
@weather.got("city", prompt="你想查询哪个城市的天气呢?")
async def handle_city(bot: Bot, event: Event, state: dict):
city = state["city"]
if city not in ["上海", "北京"]:
await weather.reject("你想查询的城市暂不支持,请重新输入!")
city_weather = await get_weather(city)
await weather.finish(city_weather)
```
在上面的代码中,我们给 `weather` 事件响应器添加了两个事件处理函数:`handle_first_receive`, `handle_city`
其中有几个要点,我们一一解释:
#### 添加一个事件处理函数
在事件响应器响应事件时,事件处理函数会依次顺序执行,也就是说,与添加顺序一致。
我们可以使用 `@matcher.handle()` 装饰器来简单地为该事件响应器添加一个处理函数。
同时NoneBot 内置了几种添加事件处理函数方式以方便处理:
- `@matcher.receive()`: 指示 NoneBot 接收一条新的用户消息以继续执行后续处理函数。
- `@matcher.got(key, [prompt="请输入key"], [args_parser=function])`: 指示 NoneBot 当 `state` 中不存在 `key` 时向用户发送 `prompt` 等待用户回复并赋值给 `state[key]`
这些装饰器可以套娃使用!例如:
```python
@matcher.got("key1")
@matcher.got("key2")
async def handle(bot: Bot, event: Event, state: dict):
pass
```
#### 事件处理函数参数
事件处理函数类型为 `Callable[[Bot, Event, dict], Union[Awaitable[None], Awaitable[NoReturn]]]` 。
参数分别为:
1. [nonebot.typing.Bot](../api/typing.md#bot): 即事件上报连接对应的 Bot 对象,为 BaseBot 的子类。特别注意,此处的类型注释可以替换为指定的 Bot 类型,例如:`nonebot.adapters.cqhttp.Bot`,只有在上报事件的 Bot 类型与类型注释相符时才会执行该处理函数!可用于多平台进行不同的处理。
2. [nonebot.typing.Event](../api/typing.md#event): 即上报事件对象,可以获取到上报的所有信息。
3. `state`: 状态字典,可以存储任意的信息
#### 处理事件
在事件处理函数中,我们只需要对 `event` 做出相应的处理,存入状态字典 `state` 中,或者向用户发送消息、调用某个机器人 API 等等。
在 NoneBot 中,提供了几种特殊的处理函数:
##### `@matcher.args_parser`
这是一个装饰器,装饰一个函数来使它成为参数的默认解析函数,当使用 `matcher.got(xxx, [args_parser])` 获取到一条消息时,会运行 `matcher.got` 的 `args_parser` ,如果不存在则运行 `@matcher.args_parser`。
##### `matcher.pause`
这个函数用于结束当前事件处理函数,强制接收一条新的消息再运行**下一个消息处理函数**。
##### `matcher.reject`
这个函数用于结束当前事件处理函数,强制接收一条新的消息再**再次运行当前消息处理函数**。
##### `matcher.finish`
这个函数用于直接结束当前事件处理。
以上三个函数都拥有一个参数 `prompt`,用于向用户发送一条消息。
## 结语
至此,相信你已经能够写出一个基础的插件了,更多的用法将会在 进阶 部分进行介绍,这里给出几个小提示:
- 请千万注意事件处理器的优先级设定
- 在匹配规则中请勿使用耗时极长的函数
- 同一个用户可以跨群(私聊)继续他的事件处理(除非做出权限限制,将在后续介绍)

View File

@@ -1,20 +0,0 @@
# Minimal makefile for Sphinx documentation
#
# You can set these variables from the command line, and also
# from the environment for the first two.
SPHINXOPTS ?=
SPHINXBUILD ?= sphinx-build
SOURCEDIR = .
BUILDDIR = _build
# Put it first so that "make" without argument is like "make help".
help:
@$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
.PHONY: help Makefile
# Catch-all target: route all unknown targets to Sphinx using the new
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
%: Makefile
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)

View File

@@ -1,18 +0,0 @@
NoneBot Api Reference
=====================
:模块索引:
- `nonebot <nonebot.html>`_
- `nonebot.config <config.html>`_
- `nonebot.matcher <matcher.html>`_
- `nonebot.rule <rule.html>`_
- `nonebot.permission <permission.html>`_
- `nonebot.sched <sched.html>`_
- `nonebot.log <log.html>`_
- `nonebot.utils <utils.html>`_
- `nonebot.typing <typing.html>`_
- `nonebot.exception <exception.html>`_
- `nonebot.drivers <drivers/>`_
- `nonebot.drivers.fastapi <drivers/fastapi.html>`_
- `nonebot.adapters <adapters/>`_
- `nonebot.adapters.cqhttp <adapters/cqhttp.html>`_

View File

@@ -1,13 +0,0 @@
---
contentSidebar: true
sidebarDepth: 0
---
NoneBot.adapters 模块
=====================
.. automodule:: nonebot.adapters
:members:
:private-members:
:special-members: __init__
:show-inheritance:

View File

@@ -1,12 +0,0 @@
---
contentSidebar: true
sidebarDepth: 0
---
NoneBot.adapters.cqhttp 模块
============================
.. automodule:: nonebot.adapters.cqhttp
:members:
:private-members:
:show-inheritance:

View File

@@ -1,79 +0,0 @@
# Configuration file for the Sphinx documentation builder.
#
# This file only contains a selection of the most common options. For a full
# list see the documentation:
# https://www.sphinx-doc.org/en/master/usage/configuration.html
# -- Path setup --------------------------------------------------------------
# If extensions (or modules to document with autodoc) are in another directory,
# add these directories to sys.path here. If the directory is relative to the
# documentation root, use os.path.abspath to make it absolute, like shown here.
#
import os
import sys
sys.path.insert(0, os.path.abspath(os.path.dirname(os.path.dirname(__file__))))
# -- Project information -----------------------------------------------------
project = 'nonebot'
copyright = '2020, richardchien'
author = 'richardchien'
# The short X.Y version
version = '2.0.0'
# The full version, including alpha/beta/rc tags
release = '2.0.0'
# -- General configuration ---------------------------------------------------
# Add any Sphinx extension module names here, as strings. They can be
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
# ones.
extensions = [
'sphinx.ext.autodoc',
'sphinx.ext.viewcode',
'sphinx.ext.todo',
]
# Add any paths that contain templates here, relative to this directory.
templates_path = ['_templates']
# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
#
# This is also used if you do content translation via gettext catalogs.
# Usually you set "language" from the command line for these cases.
language = 'zh'
master_doc = "README"
# List of patterns, relative to source directory, that match files and
# directories to ignore when looking for source files.
# This pattern also affects html_static_path and html_extra_path.
exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store']
# -- Options for HTML output -------------------------------------------------
# The theme to use for HTML and HTML Help pages. See the documentation for
# a list of builtin themes.
#
html_theme = 'alabaster'
# Add any paths that contain custom static files (such as style sheets) here,
# relative to this directory. They are copied after the builtin static files,
# so a file named "default.css" will overwrite the builtin "default.css".
html_static_path = ['_static']
# html_baseurl = '/api/'
# -- Extension configuration -------------------------------------------------
# -- Options for autodoc extension ----------------------------------------------
autodoc_default_options = {'member-order': 'bysource'}
# -- Options for todo extension ----------------------------------------------
# If true, `todo` and `todoList` produce output, else they produce nothing.
todo_include_todos = True

View File

@@ -1,11 +0,0 @@
---
contentSidebar: true
sidebarDepth: 0
---
NoneBot.config 模块
===================
.. automodule:: nonebot.config
:members: Env, Config
:show-inheritance:

View File

@@ -1,13 +0,0 @@
---
contentSidebar: true
sidebarDepth: 0
---
NoneBot.drivers 模块
=====================
.. automodule:: nonebot.drivers
:members:
:private-members:
:special-members: __init__
:show-inheritance:

View File

@@ -1,13 +0,0 @@
---
contentSidebar: true
sidebarDepth: 0
---
NoneBot.drivers.fastapi 模块
=====================
.. automodule:: nonebot.drivers.fastapi
:members:
:private-members:
:special-members: __init__
:show-inheritance:

View File

@@ -1,11 +0,0 @@
---
contentSidebar: true
sidebarDepth: 0
---
NoneBot.exception 模块
======================
.. automodule:: nonebot.exception
:members:
:show-inheritance:

View File

@@ -1,11 +0,0 @@
---
contentSidebar: true
sidebarDepth: 0
---
NoneBot.log 模块
=================
.. automodule:: nonebot.log
:members:
:show-inheritance:

View File

@@ -1,35 +0,0 @@
@ECHO OFF
pushd %~dp0
REM Command file for Sphinx documentation
if "%SPHINXBUILD%" == "" (
set SPHINXBUILD=sphinx-build
)
set SOURCEDIR=.
set BUILDDIR=_build
if "%1" == "" goto help
%SPHINXBUILD% >NUL 2>NUL
if errorlevel 9009 (
echo.
echo.The 'sphinx-build' command was not found. Make sure you have Sphinx
echo.installed, then set the SPHINXBUILD environment variable to point
echo.to the full path of the 'sphinx-build' executable. Alternatively you
echo.may add the Sphinx directory to PATH.
echo.
echo.If you don't have Sphinx installed, grab it from
echo.http://sphinx-doc.org/
exit /b 1
)
%SPHINXBUILD% -M %1 %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O%
goto end
:help
%SPHINXBUILD% -M help %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O%
:end
popd

View File

@@ -1,13 +0,0 @@
---
contentSidebar: true
sidebarDepth: 0
---
NoneBot.matcher 模块
====================
.. automodule:: nonebot.matcher
:members:
:private-members:
:special-members: __init__
:show-inheritance:

View File

@@ -1,11 +0,0 @@
---
contentSidebar: true
sidebarDepth: 0
---
NoneBot 模块
===============
.. automodule:: nonebot
:members:
:show-inheritance:

View File

@@ -1,11 +0,0 @@
---
contentSidebar: true
sidebarDepth: 0
---
NoneBot.permission 模块
=======================
.. automodule:: nonebot.permission
:members:
:show-inheritance:

View File

@@ -1,12 +0,0 @@
---
contentSidebar: true
sidebarDepth: 0
---
NoneBot.rule 模块
====================
.. automodule:: nonebot.rule
:members:
:special-members:
:show-inheritance:

View File

@@ -1,11 +0,0 @@
---
contentSidebar: true
sidebarDepth: 0
---
NoneBot.sched 模块
===================
.. automodule:: nonebot.sched
:members:
:show-inheritance:

View File

@@ -1,11 +0,0 @@
---
contentSidebar: true
sidebarDepth: 0
---
NoneBot.typing 模块
===================
.. automodule:: nonebot.typing
:members:
:show-inheritance:

View File

@@ -1,13 +0,0 @@
---
contentSidebar: true
sidebarDepth: 0
---
NoneBot.utils 模块
==================
.. autofunction:: nonebot.utils.escape_tag
.. autodecorator:: nonebot.utils.run_sync
.. autoclass:: nonebot.utils.DataclassEncoder
:show-inheritance:

View File

@@ -1,240 +1,288 @@
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
快捷导入
========
"""本模块主要定义了 NoneBot 启动所需函数,供 bot 入口文件调用。
为方便使用,``nonebot`` 模块从子模块导入了部分内容
## 快捷导入
- ``on_message`` => ``nonebot.plugin.on_message``
- ``on_notice`` => ``nonebot.plugin.on_notice``
- ``on_request`` => ``nonebot.plugin.on_request``
- ``on_metaevent`` => ``nonebot.plugin.on_metaevent``
- ``on_startswith`` => ``nonebot.plugin.on_startswith``
- ``on_endswith`` => ``nonebot.plugin.on_endswith``
- ``on_command`` => ``nonebot.plugin.on_command``
- ``on_regex`` => ``nonebot.plugin.on_regex``
- ``on_regex`` => ``nonebot.plugin.on_regex``
- ``on_regex`` => ``nonebot.plugin.on_regex``
- ``CommandGroup`` => ``nonebot.plugin.CommandGroup``
- ``load_plugin`` => ``nonebot.plugin.load_plugin``
- ``load_plugins`` => ``nonebot.plugin.load_plugins``
- ``load_builtin_plugins`` => ``nonebot.plugin.load_builtin_plugins``
- ``get_loaded_plugins`` => ``nonebot.plugin.get_loaded_plugins``
为方便使用,本模块从子模块导入了部分内容,以下内容可以直接通过本模块导入:
- `on` => {ref}``on` <nonebot.plugin.on.on>`
- `on_metaevent` => {ref}``on_metaevent` <nonebot.plugin.on.on_metaevent>`
- `on_message` => {ref}``on_message` <nonebot.plugin.on.on_message>`
- `on_notice` => {ref}``on_notice` <nonebot.plugin.on.on_notice>`
- `on_request` => {ref}``on_request` <nonebot.plugin.on.on_request>`
- `on_startswith` => {ref}``on_startswith` <nonebot.plugin.on.on_startswith>`
- `on_endswith` => {ref}``on_endswith` <nonebot.plugin.on.on_endswith>`
- `on_fullmatch` => {ref}``on_fullmatch` <nonebot.plugin.on.on_fullmatch>`
- `on_keyword` => {ref}``on_keyword` <nonebot.plugin.on.on_keyword>`
- `on_command` => {ref}``on_command` <nonebot.plugin.on.on_command>`
- `on_shell_command` => {ref}``on_shell_command` <nonebot.plugin.on.on_shell_command>`
- `on_regex` => {ref}``on_regex` <nonebot.plugin.on.on_regex>`
- `CommandGroup` => {ref}``CommandGroup` <nonebot.plugin.on.CommandGroup>`
- `Matchergroup` => {ref}``MatcherGroup` <nonebot.plugin.on.MatcherGroup>`
- `load_plugin` => {ref}``load_plugin` <nonebot.plugin.load.load_plugin>`
- `load_plugins` => {ref}``load_plugins` <nonebot.plugin.load.load_plugins>`
- `load_all_plugins` => {ref}``load_all_plugins` <nonebot.plugin.load.load_all_plugins>`
- `load_from_json` => {ref}``load_from_json` <nonebot.plugin.load.load_from_json>`
- `load_from_toml` => {ref}``load_from_toml` <nonebot.plugin.load.load_from_toml>`
- `load_builtin_plugin` => {ref}``load_builtin_plugin` <nonebot.plugin.load.load_builtin_plugin>`
- `load_builtin_plugins` => {ref}``load_builtin_plugins` <nonebot.plugin.load.load_builtin_plugins>`
- `get_plugin` => {ref}``get_plugin` <nonebot.plugin.plugin.get_plugin>`
- `get_loaded_plugins` => {ref}``get_loaded_plugins` <nonebot.plugin.plugin.get_loaded_plugins>`
- `export` => {ref}``export` <nonebot.plugin.export.export>`
- `require` => {ref}``require` <nonebot.plugin.load.require>`
FrontMatter:
sidebar_position: 0
description: nonebot 模块
"""
import importlib
from nonebot.typing import Bot, Dict, Type, Union, Driver, Optional, NoReturn
from typing import Any, Dict, Type, Optional
import pkg_resources
from nonebot.adapters import Bot
from nonebot.utils import escape_tag
from nonebot.config import Env, Config
from nonebot.log import logger, default_filter
from nonebot.drivers import Driver, ReverseDriver, combine_driver
try:
_dist: pkg_resources.Distribution = pkg_resources.get_distribution("nonebot2")
__version__ = _dist.version
VERSION = _dist.parsed_version
except pkg_resources.DistributionNotFound: # pragma: no cover
__version__ = None
VERSION = None
_driver: Optional[Driver] = None
def get_driver() -> Union[NoReturn, Driver]:
"""
:说明:
def get_driver() -> Driver:
"""获取全局 {ref}`nonebot.drivers.Driver` 实例。
获取全局 Driver 对象。可用于在计划任务的回调中获取当前 Driver 对象
可用于在计划任务的回调等情形中获取当前 {ref}`nonebot.drivers.Driver` 实例
:返回:
返回:
全局 {ref}`nonebot.drivers.Driver` 对象
* ``Driver``: 全局 Driver 对象
:异常:
* ``ValueError``: 全局 Driver 对象尚未初始化 (nonebot.init 尚未调用)
:用法:
.. code-block:: python
异常:
ValueError: 全局 {ref}`nonebot.drivers.Driver` 对象尚未初始化 ({ref}`nonebot.init <nonebot.init>` 尚未调用)
用法:
```python
driver = nonebot.get_driver()
```
"""
if _driver is None:
raise ValueError("NoneBot has not been initialized.")
return _driver
def get_app():
"""
:说明:
def get_app() -> Any:
"""获取全局 {ref}`nonebot.drivers.ReverseDriver` 对应的 Server App 对象。
获取全局 Driver 对应 Server App 对象。
返回:
Server App 对象
:返回:
* ``Any``: Server App 对象
:异常:
* ``ValueError``: 全局 Driver 对象尚未初始化 (nonebot.init 尚未调用)
:用法:
.. code-block:: python
异常:
AssertionError: 全局 Driver 对象不是 {ref}`nonebot.drivers.ReverseDriver` 类型
ValueError: 全局 {ref}`nonebot.drivers.Driver` 对象尚未初始化 ({ref}`nonebot.init <nonebot.init>` 尚未调用)
用法:
```python
app = nonebot.get_app()
```
"""
driver = get_driver()
assert isinstance(
driver, ReverseDriver
), "app object is only available for reverse driver"
return driver.server_app
def get_asgi():
"""
:说明:
def get_asgi() -> Any:
"""获取全局 {ref}`nonebot.drivers.ReverseDriver` 对应 [ASGI](https://asgi.readthedocs.io/) 对象。
获取全局 Driver 对应 Asgi 对象。
返回:
ASGI 对象
:返回:
* ``Any``: Asgi 对象
:异常:
* ``ValueError``: 全局 Driver 对象尚未初始化 (nonebot.init 尚未调用)
:用法:
.. code-block:: python
异常:
AssertionError: 全局 Driver 对象不是 {ref}`nonebot.drivers.ReverseDriver` 类型
ValueError: 全局 {ref}`nonebot.drivers.Driver` 对象尚未初始化 ({ref}`nonebot.init <nonebot.init>` 尚未调用)
用法:
```python
asgi = nonebot.get_asgi()
```
"""
driver = get_driver()
assert isinstance(
driver, ReverseDriver
), "asgi object is only available for reverse driver"
return driver.asgi
def get_bots() -> Union[NoReturn, Dict[str, Bot]]:
def get_bot(self_id: Optional[str] = None) -> Bot:
"""获取一个连接到 NoneBot 的 {ref}`nonebot.adapters.Bot` 对象。
当提供 `self_id` 时,此函数是 `get_bots()[self_id]` 的简写;
当不提供时,返回一个 {ref}`nonebot.adapters.Bot`。
参数:
self_id: 用来识别 {ref}`nonebot.adapters.Bot` 的 {ref}`nonebot.adapters.Bot.self_id` 属性
返回:
{ref}`nonebot.adapters.Bot` 对象
异常:
KeyError: 对应 self_id 的 Bot 不存在
ValueError: 没有传入 self_id 且没有 Bot 可用
ValueError: 全局 {ref}`nonebot.drivers.Driver` 对象尚未初始化 ({ref}`nonebot.init <nonebot.init>` 尚未调用)
用法:
```python
assert nonebot.get_bot("12345") == nonebot.get_bots()["12345"]
another_unspecified_bot = nonebot.get_bot()
```
"""
:说明:
bots = get_bots()
if self_id is not None:
return bots[self_id]
获取所有通过 ws 连接 NoneBot 的 Bot 对象。
for bot in bots.values():
return bot
:返回:
raise ValueError("There are no bots to get.")
* ``Dict[str, Bot]``: 一个以字符串 ID 为键Bot 对象为值的字典
:异常:
def get_bots() -> Dict[str, Bot]:
"""获取所有连接到 NoneBot 的 {ref}`nonebot.adapters.Bot` 对象。
* ``ValueError``: 全局 Driver 对象尚未初始化 (nonebot.init 尚未调用)
返回:
一个以 {ref}`nonebot.adapters.Bot.self_id` 为键,{ref}`nonebot.adapters.Bot` 对象为值的字典
:用法:
.. code-block:: python
异常:
ValueError: 全局 {ref}`nonebot.drivers.Driver` 对象尚未初始化 ({ref}`nonebot.init <nonebot.init>` 尚未调用)
用法:
```python
bots = nonebot.get_bots()
```
"""
driver = get_driver()
return driver.bots
from nonebot.sched import scheduler
from nonebot.utils import escape_tag
from nonebot.config import Env, Config
from nonebot.log import logger, default_filter
from nonebot.adapters.cqhttp import Bot as CQBot
try:
import nonebot_test
except ImportError:
nonebot_test = None
def _resolve_dot_notation(
obj_str: str, default_attr: str, default_prefix: Optional[str] = None
) -> Any:
modulename, _, cls = obj_str.partition(":")
if default_prefix is not None and modulename.startswith("~"):
modulename = default_prefix + modulename[1:]
module = importlib.import_module(modulename)
if not cls:
return getattr(module, default_attr)
instance = module
for attr_str in cls.split("."):
instance = getattr(instance, attr_str)
return instance
def init(*, _env_file: Optional[str] = None, **kwargs):
"""
:说明:
def _resolve_combine_expr(obj_str: str) -> Type[Driver]:
drivers = obj_str.split("+")
DriverClass = _resolve_dot_notation(
drivers[0], "Driver", default_prefix="nonebot.drivers."
)
if len(drivers) == 1:
logger.trace(f"Detected driver {DriverClass} with no mixins.")
return DriverClass
mixins = [
_resolve_dot_notation(mixin, "Mixin", default_prefix="nonebot.drivers.")
for mixin in drivers[1:]
]
logger.trace(f"Detected driver {DriverClass} with mixins {mixins}.")
return combine_driver(DriverClass, *mixins)
初始化 NoneBot 以及 全局 Driver 对象。
def init(*, _env_file: Optional[str] = None, **kwargs: Any) -> None:
"""初始化 NoneBot 以及 全局 {ref}`nonebot.drivers.Driver` 对象。
NoneBot 将会从 .env 文件中读取环境信息,并使用相应的 env 文件配置。
也可以传入自定义的 _env_file 来指定 NoneBot 从该文件读取配置。
也可以传入自定义的 `_env_file` 来指定 NoneBot 从该文件读取配置。
:参数:
* ``_env_file: Optional[str]``: 配置文件名,默认从 .env.{env_name} 中读取配置
* ``**kwargs``: 任意变量,将会存储到 Config 对象里
:返回:
- ``None``
:用法:
.. code-block:: python
参数:
_env_file: 配置文件名,默认从 `.env.{env_name}` 中读取配置
kwargs: 任意变量,将会存储到 {ref}`nonebot.drivers.Driver.config` 对象里
用法:
```python
nonebot.init(database=Database(...))
```
"""
global _driver
if not _driver:
logger.info("NoneBot is initializing...")
logger.success("NoneBot is initializing...")
env = Env()
logger.opt(
colors=True).info(f"Current <y><b>Env: {env.environment}</b></y>")
config = Config(**kwargs,
_env_file=_env_file or f".env.{env.environment}")
config = Config(
**kwargs,
_common_config=env.dict(),
_env_file=_env_file or f".env.{env.environment}",
)
default_filter.level = "DEBUG" if config.debug else "INFO"
default_filter.level = config.log_level
logger.opt(colors=True).info(
f"Current <y><b>Env: {escape_tag(env.environment)}</b></y>"
)
logger.opt(colors=True).debug(
f"Loaded <y><b>Config</b></y>: {escape_tag(str(config.dict()))}")
f"Loaded <y><b>Config</b></y>: {escape_tag(str(config.dict()))}"
)
DriverClass: Type[Driver] = getattr(
importlib.import_module(config.driver), "Driver")
DriverClass: Type[Driver] = _resolve_combine_expr(config.driver)
_driver = DriverClass(env, config)
# register build-in adapters
_driver.register_adapter("cqhttp", CQBot)
# load nonebot test frontend if debug
if config.debug and nonebot_test:
logger.debug("Loading nonebot test frontend...")
nonebot_test.init()
def run(*args: Any, **kwargs: Any) -> None:
"""启动 NoneBot即运行全局 {ref}`nonebot.drivers.Driver` 对象。
if scheduler:
_driver.on_startup(_start_scheduler)
def run(host: Optional[str] = None,
port: Optional[int] = None,
*args,
**kwargs):
"""
:说明:
启动 NoneBot即运行全局 Driver 对象。
:参数:
* ``host: Optional[str]``: 主机名IP若不传入则使用配置文件中指定的值
* ``port: Optional[int]``: 端口,若不传入则使用配置文件中指定的值
* ``*args``: 传入 Driver.run 的位置参数
* ``**kwargs``: 传入 Driver.run 的命名参数
:返回:
- ``None``
:用法:
.. code-block:: python
参数:
args: 传入 {ref}`nonebot.drivers.Driver.run` 的位置参数
kwargs: 传入 {ref}`nonebot.drivers.Driver.run` 的命名参数
用法:
```python
nonebot.run(host="127.0.0.1", port=8080)
```
"""
logger.info("Running NoneBot...")
get_driver().run(host, port, *args, **kwargs)
logger.success("Running NoneBot...")
get_driver().run(*args, **kwargs)
async def _start_scheduler():
if scheduler and not scheduler.running:
scheduler.configure(_driver.config.apscheduler_config)
scheduler.start()
logger.opt(colors=True).info("<y>Scheduler Started</y>")
from nonebot.plugin import on as on
from nonebot.plugin import export as export
from nonebot.plugin import require as require
from nonebot.plugin import on_regex as on_regex
from nonebot.plugin import on_notice as on_notice
from nonebot.plugin import get_plugin as get_plugin
from nonebot.plugin import on_command as on_command
from nonebot.plugin import on_keyword as on_keyword
from nonebot.plugin import on_message as on_message
from nonebot.plugin import on_request as on_request
from nonebot.plugin import load_plugin as load_plugin
from nonebot.plugin import on_endswith as on_endswith
from nonebot.plugin import CommandGroup as CommandGroup
from nonebot.plugin import MatcherGroup as MatcherGroup
from nonebot.plugin import load_plugins as load_plugins
from nonebot.plugin import on_fullmatch as on_fullmatch
from nonebot.plugin import on_metaevent as on_metaevent
from nonebot.plugin import on_startswith as on_startswith
from nonebot.plugin import load_from_json as load_from_json
from nonebot.plugin import load_from_toml as load_from_toml
from nonebot.plugin import load_all_plugins as load_all_plugins
from nonebot.plugin import on_shell_command as on_shell_command
from nonebot.plugin import get_loaded_plugins as get_loaded_plugins
from nonebot.plugin import load_builtin_plugin as load_builtin_plugin
from nonebot.plugin import load_builtin_plugins as load_builtin_plugins
from nonebot.plugin import on_message, on_notice, on_request, on_metaevent
from nonebot.plugin import on_startswith, on_endswith, on_command, on_regex, CommandGroup
from nonebot.plugin import load_plugin, load_plugins, load_builtin_plugins, get_loaded_plugins
__autodoc__ = {"internal": False}

Some files were not shown because too many files have changed in this diff Show More