Skip to content

Commit

Permalink
🔖 version 0.54.0
Browse files Browse the repository at this point in the history
  • Loading branch information
RF-Tar-Railt committed Nov 23, 2024
1 parent 7af02be commit ff47913
Show file tree
Hide file tree
Showing 7 changed files with 59 additions and 41 deletions.
39 changes: 20 additions & 19 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@ async def _():
| [Dodo IM](https://github.com/nonebot/adapter-dodo) | adapters.dodo |
| [Kritor](https://github.com/nonebot/adapter-kritor) | adapters.kritor |
| [Tailchat](https://github.com/eya46/nonebot-adapter-tailchat) | adapters.tailchat |
| [Mail](https://github.com/mobyw/nonebot-adapter-mail) | adapters.mail |

### 支持的消息元素

Expand All @@ -107,25 +108,25 @@ async def _():
> [!WARNING]
> 斜体的协议名称意味着其协议或其适配器长时间未维护或已失效
| 元素\适配器 | OneBot V11 | OneBot V12 | Telegram | 飞书 | Github | QQ-API | _钉钉_ | Console | 开黑啦 | Mirai | _Ntchat_ | MineCraft | Discord | _Red_ | Satori | Dodo IM | Kritor | Tailchat |
|------------------|------------|------------|----------|----|--------|--------|------|---------|-----|-------|----------|-----------|---------|-------|--------|---------|--------|----------|
| 文本 Text |||||||||||||||||||
| 样式文本 Styled Text | 🚫 | 🚫 || 🚫 |||||| 🚫 | 🚫 || 🚫 | 🚫 || 🚫 | 🚫 ||
| 提及用户 At(user) ||||| ⬆️ ||| 🚫 |||| 🚫 |||||||
| 提及角色 At(role) | 🚫 | 🚫 | 🚫 | 🚫 | 🚫 | 🚫 | 🚫 | 🚫 || 🚫 | 🚫 | 🚫 || 🚫 ||| 🚫 | 🚫 |
| 提及频道 At(channel) | 🚫 | 🚫 | 🚫 | 🚫 | 🚫 || 🚫 | 🚫 || 🚫 | 🚫 | 🚫 || 🚫 ||| 🚫 ||
| 提交全体 AtAll ||| 🚫 || 🚫 ||| 🚫 ||| 🚫 | 🚫 |||||| 🚫 |
| 表情 Emoji || 🚫 || 🚫 | 🚫 || 🚫 |||| 🚫 | 🚫 ||| 🚫 | 🚫 |||
| 图片 Image ||||| ⬆️ ||| 🚫 |||||||||||
| 音频 Audio | ⬆️ |||| 🚫 || 🚫 | 🚫 || ⬆️ | ⬇️ | 🚫 | ⬆️ | ⬆️ || 🚫 | ⬆️ | 🚫 |
| 语音 Voice |||| ⬆️ | 🚫 | ⬆️ | 🚫 | 🚫 | ⬆️ || ⬇️ | 🚫 | ⬆️ || ⬆️ | 🚫 || 🚫 |
| 视频 Video ||||| 🚫 || 🚫 | 🚫 |||| 🚫 | ⬆️ ||||| 🚫 |
| 文件 File | ⬇️ |||| 🚫 || 🚫 | 🚫 |||| 🚫 | ⬆️ ||| ⬇️ | ⬇️ ||
| 回复 Reply ||||| 🚫 || 🚫 | 🚫 |||| 🚫 |||||||
| 引用转发 Reference || 🚫 | 🚫 | 🚫 | 🚫 | 🚫 | 🚫 | 🚫 | 🚫 || 🚫 | 🚫 | 🚫 ||| 🚫 || 🚫 |
| 超级消息 Hyper || 🚫 | 🚫 | ⬇️ | 🚫 || 🚫 | 🚫 |||| 🚫 | 🚫 || 🚫 | 🚫 || 🚫 |
| 按钮 Button | 🚫 | 🚫 | ⬆️ | 🚫 | 🚫 || 🚫 | 🚫 | 🚫 | 🚫 | 🚫 | ⬆️ || 🚫 || 🚫 || 🚫 |
| 其余 Other |||||||||||||||||||
| 元素\适配器 | OneBot V11 | OneBot V12 | Telegram | 飞书 | Github | QQ-API | _钉钉_ | Console | 开黑啦 | Mirai | _Ntchat_ | MineCraft | Discord | _Red_ | Satori | Dodo IM | Kritor | Tailchat | Mail |
|------------------|------------|------------|----------|----|--------|--------|------|---------|-----|-------|----------|-----------|---------|-------|--------|---------|--------|----------|------|
| 文本 Text ||||||||||||||||||||
| 样式文本 Styled Text | 🚫 | 🚫 || 🚫 |||||| 🚫 | 🚫 || 🚫 | 🚫 || 🚫 | 🚫 |||
| 提及用户 At(user) ||||| ⬆️ ||| 🚫 |||| 🚫 ||||||| ⬆️ |
| 提及角色 At(role) | 🚫 | 🚫 | 🚫 | 🚫 | 🚫 | 🚫 | 🚫 | 🚫 || 🚫 | 🚫 | 🚫 || 🚫 ||| 🚫 | 🚫 | 🚫 |
| 提及频道 At(channel) | 🚫 | 🚫 | 🚫 | 🚫 | 🚫 || 🚫 | 🚫 || 🚫 | 🚫 | 🚫 || 🚫 ||| 🚫 || ⬆️ |
| 提交全体 AtAll ||| 🚫 || 🚫 ||| 🚫 ||| 🚫 | 🚫 |||||| 🚫 | 🚫 |
| 表情 Emoji || 🚫 || 🚫 | 🚫 || 🚫 |||| 🚫 | 🚫 ||| 🚫 | 🚫 ||| 🚫 |
| 图片 Image ||||| ⬆️ ||| 🚫 ||||||||||||
| 音频 Audio | ⬆️ |||| 🚫 || 🚫 | 🚫 || ⬆️ | ⬇️ | 🚫 | ⬆️ | ⬆️ || 🚫 | ⬆️ | 🚫 ||
| 语音 Voice |||| ⬆️ | 🚫 | ⬆️ | 🚫 | 🚫 | ⬆️ || ⬇️ | 🚫 | ⬆️ || ⬆️ | 🚫 || 🚫 ||
| 视频 Video ||||| 🚫 || 🚫 | 🚫 |||| 🚫 | ⬆️ ||||| 🚫 ||
| 文件 File | ⬇️ |||| 🚫 || 🚫 | 🚫 |||| 🚫 | ⬆️ ||| ⬇️ | ⬇️ |||
| 回复 Reply ||||| 🚫 || 🚫 | 🚫 |||| 🚫 ||||||||
| 引用转发 Reference || 🚫 | 🚫 | 🚫 | 🚫 | 🚫 | 🚫 | 🚫 | 🚫 || 🚫 | 🚫 | 🚫 ||| 🚫 || 🚫 | 🚫 |
| 超级消息 Hyper || 🚫 | 🚫 | ⬇️ | 🚫 || 🚫 | 🚫 |||| 🚫 | 🚫 || 🚫 | 🚫 || 🚫 | 🚫 |
| 按钮 Button | 🚫 | 🚫 | ⬆️ | 🚫 | 🚫 || 🚫 | 🚫 | 🚫 | 🚫 | 🚫 | ⬆️ || 🚫 || 🚫 || 🚫 | 🚫 |
| 其余 Other ||||||||||||||||||||


## 配置项
Expand Down
38 changes: 19 additions & 19 deletions pdm.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion src/nonebot_plugin_alconna/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@
from .uniseg import SupportAdapterModule as SupportAdapterModule
from .extension import add_global_extension as add_global_extension

__version__ = "0.53.1"
__version__ = "0.54.0"

__plugin_meta__ = PluginMetadata(
name="Alconna 插件",
Expand Down
1 change: 1 addition & 0 deletions src/nonebot_plugin_alconna/adapters/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
"Github": "github",
"Kritor": "kritor",
"Kaiheila": "kook",
"Mail": "mail",
"Minecraft": "minecraft",
"Mirai": "mirai",
"ntchat": "ntchat",
Expand Down
14 changes: 14 additions & 0 deletions src/nonebot_plugin_alconna/adapters/mail.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
from nonebot.adapters.mail.message import MessageSegment

from nonebot_plugin_alconna.uniseg.segment import Text, Media
from nonebot_plugin_alconna.typings import SegmentPattern, TextSegmentPattern

Attachment = SegmentPattern("attachment", MessageSegment, Media, MessageSegment.attachment)


def is_html(self, text: Text):
if text.extract_most_style().startswith("html"):
return MessageSegment.html(text.text)


Markup = TextSegmentPattern("html", MessageSegment, MessageSegment.html, is_html)
4 changes: 3 additions & 1 deletion src/nonebot_plugin_alconna/argv.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
from nonebot.adapters import Message
from arclet.alconna import NullMessage
from nepattern import MatchMode, BasePattern, MatchFailed
from arclet.alconna.argv import Argv, argv_config, set_default_argv_type
from arclet.alconna.argv import Argv, argv_config, set_default_argv_type, set_namespace_argv_type

from .uniseg import Text, Segment, UniMessage

Expand Down Expand Up @@ -183,3 +183,5 @@ def converter(data: str | list[str | Segment]) -> UniMessage:

argv_config(MessageArgv, converter=converter)
set_default_argv_type(MessageArgv)
set_namespace_argv_type("nonebot", MessageArgv)
set_namespace_argv_type("arclet", Argv)
2 changes: 1 addition & 1 deletion src/nonebot_plugin_alconna/uniseg/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@
from .constraint import SupportAdapterModule as SupportAdapterModule
from .adapters import alter_get_builder, alter_get_fetcher, alter_get_exporter

__version__ = "0.53.1"
__version__ = "0.54.0"

__plugin_meta__ = PluginMetadata(
name="Universal Segment 插件",
Expand Down

0 comments on commit ff47913

Please sign in to comment.