Skip to content

Commit

Permalink
🔥 version 0.52.0
Browse files Browse the repository at this point in the history
  • Loading branch information
RF-Tar-Railt committed Aug 24, 2024
1 parent a0891a0 commit 1a7911d
Show file tree
Hide file tree
Showing 14 changed files with 29 additions and 112 deletions.
39 changes: 19 additions & 20 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,6 @@ async def _():
| [Mirai](https://docs.mirai.mamoe.net/mirai-api-http/) | adapters.mirai |
| [Ntchat](https://github.com/JustUndertaker/adapter-ntchat) | adapters.ntchat |
| [MineCraft](https://github.com/17TheWord/nonebot-adapter-minecraft) | adapters.minecraft |
| [BiliBili Live](https://github.com/wwweww/adapter-bilibili) | adapters.bilibili |
| [Walle-Q](https://github.com/onebot-walle/nonebot_adapter_walleq) | adapters.onebot12 |
| [Discord](https://github.com/nonebot/adapter-discord) | adapters.discord |
| [Red 协议](https://github.com/nonebot/adapter-red) | adapters.red |
Expand All @@ -108,25 +107,25 @@ async def _():
> [!WARNING]
> 斜体的协议名称意味着其协议或其适配器长时间未维护或已失效
| 元素\适配器 | OneBot V11 | OneBot V12 | Telegram | 飞书 | Github | QQ-API | _钉钉_ | Console | 开黑啦 | Mirai | _Ntchat_ | MineCraft | _BiliBili Live_ | 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 |
|------------------|------------|------------|----------|----|--------|--------|------|---------|-----|-------|----------|-----------|---------|-------|--------|---------|--------|----------|
| 文本 Text |||||||||||||||||||
| 样式文本 Styled Text | 🚫 | 🚫 || 🚫 |||||| 🚫 | 🚫 || 🚫 | 🚫 || 🚫 | 🚫 ||
| 提及用户 At(user) ||||| ⬆️ ||| 🚫 |||| 🚫 |||||||
| 提及角色 At(role) | 🚫 | 🚫 | 🚫 | 🚫 | 🚫 | 🚫 | 🚫 | 🚫 || 🚫 | 🚫 | 🚫 || 🚫 ||| 🚫 | 🚫 |
| 提及频道 At(channel) | 🚫 | 🚫 | 🚫 | 🚫 | 🚫 || 🚫 | 🚫 || 🚫 | 🚫 | 🚫 || 🚫 ||| 🚫 ||
| 提交全体 AtAll ||| 🚫 || 🚫 ||| 🚫 ||| 🚫 | 🚫 |||||| 🚫 |
| 表情 Emoji || 🚫 || 🚫 | 🚫 || 🚫 |||| 🚫 | 🚫 ||| 🚫 | 🚫 |||
| 图片 Image ||||| ⬆️ ||| 🚫 |||||||||||
| 音频 Audio | ⬆️ |||| 🚫 || 🚫 | 🚫 || ⬆️ | ⬇️ | 🚫 | ⬆️ | ⬆️ || 🚫 | ⬆️ | 🚫 |
| 语音 Voice |||| ⬆️ | 🚫 | ⬆️ | 🚫 | 🚫 | ⬆️ || ⬇️ | 🚫 | ⬆️ || ⬆️ | 🚫 || 🚫 |
| 视频 Video ||||| 🚫 || 🚫 | 🚫 |||| 🚫 | ⬆️ ||||| 🚫 |
| 文件 File | ⬇️ |||| 🚫 || 🚫 | 🚫 |||| 🚫 | ⬆️ ||| ⬇️ | ⬇️ ||
| 回复 Reply ||||| 🚫 || 🚫 | 🚫 |||| 🚫 |||||||
| 引用转发 Reference || 🚫 | 🚫 | 🚫 | 🚫 | 🚫 | 🚫 | 🚫 | 🚫 || 🚫 | 🚫 | 🚫 ||| 🚫 || 🚫 |
| 超级消息 Hyper || 🚫 | 🚫 | ⬇️ | 🚫 || 🚫 | 🚫 |||| 🚫 | 🚫 || 🚫 | 🚫 || 🚫 |
| 按钮 Button | 🚫 | 🚫 | ⬆️ | 🚫 | 🚫 || 🚫 | 🚫 | 🚫 | 🚫 | 🚫 | ⬆️ || 🚫 || 🚫 || 🚫 |
| 其余 Other |||||||||||||||||||


## 配置项
Expand Down
3 changes: 1 addition & 2 deletions docs.md
Original file line number Diff line number Diff line change
Expand Up @@ -423,10 +423,9 @@ async def handle():
| [钉钉](https://github.com/nonebot/adapter-ding) | adapters.ding |
| [Console](https://github.com/nonebot/adapter-console) | adapters.console |
| [开黑啦](https://github.com/Tian-que/nonebot-adapter-kaiheila) | adapters.kook |
| [Mirai](https://github.com/ieew/nonebot_adapter_mirai2) | adapters.mirai, adapters.mirai2 |
| [Mirai](https://github.com/nonebot/adapter-mirai) | adapters.mirai, adapters.mirai2 |
| [Ntchat](https://github.com/JustUndertaker/adapter-ntchat) | adapters.ntchat |
| [MineCraft](https://github.com/17TheWord/nonebot-adapter-minecraft) | adapters.minecraft |
| [BiliBili Live](https://github.com/wwweww/adapter-bilibili) | adapters.bilibili |
| [Walle-Q](https://github.com/onebot-walle/nonebot_adapter_walleq) | adapters.onebot12 |
| [Discord](https://github.com/nonebot/adapter-discord) | adapters.discord |
| [Red 协议](https://github.com/nonebot/adapter-red) | adapters.red |
Expand Down
2 changes: 1 addition & 1 deletion example/bot.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
# driver.register_adapter(SatoriAdapter)

# nonebot.require("nonebot_plugin_alconna")
nonebot.load_plugin("plugins.demo")
nonebot.load_plugin("plugins.demo1")


async def _():
Expand Down
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.51.4"
__version__ = "0.52.0"

__plugin_meta__ = PluginMetadata(
name="Alconna 插件",
Expand Down
1 change: 0 additions & 1 deletion src/nonebot_plugin_alconna/adapters/__init__.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
MAPPING = {
"BilibiliLive": "bilibili",
"Console": "console",
"Ding": "ding",
"Discord": "discord",
Expand Down
1 change: 0 additions & 1 deletion src/nonebot_plugin_alconna/adapters/bilibili.py

This file was deleted.

8 changes: 5 additions & 3 deletions src/nonebot_plugin_alconna/rule.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,9 +77,11 @@ def __init__(
self.auto_send = True if config.alconna_auto_send_output is None else config.alconna_auto_send_output
else:
self.auto_send = auto_send_output
if (
config.alconna_use_command_start if use_cmd_start is None else use_cmd_start
) and global_config.command_start:
if use_cmd_start is None:
_use_cmd_start = False if config.alconna_use_command_start is None else config.alconna_use_command_start
else:
_use_cmd_start = use_cmd_start
if _use_cmd_start and global_config.command_start:
with command_manager.update(command):
if command.prefixes:
if command.command:
Expand Down
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 BUILDER_MAPPING, FETCHER_MAPPING, EXPORTER_MAPPING

__version__ = "0.51.4"
__version__ = "0.52.0"

__plugin_meta__ = PluginMetadata(
name="Universal Segment 插件",
Expand Down
17 changes: 0 additions & 17 deletions src/nonebot_plugin_alconna/uniseg/adapters/bilibili/__init__.py

This file was deleted.

15 changes: 0 additions & 15 deletions src/nonebot_plugin_alconna/uniseg/adapters/bilibili/builder.py

This file was deleted.

39 changes: 0 additions & 39 deletions src/nonebot_plugin_alconna/uniseg/adapters/bilibili/exporter.py

This file was deleted.

3 changes: 0 additions & 3 deletions src/nonebot_plugin_alconna/uniseg/constraint.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
class SupportAdapter(str, Enum):
"""支持的适配器"""

bilibili = "BilibiliLive"
console = "Console"
ding = "Ding"
discord = "Discord"
Expand Down Expand Up @@ -50,7 +49,6 @@ class SupportScope(str, Enum):
kook = "Kaiheila"
minecraft = "Minecraft"
github = "GitHub"
bilibili = "Bilibili"
console = "Console"
ding = "Ding"
wechat = "WeChat"
Expand Down Expand Up @@ -96,7 +94,6 @@ def ensure_satori(platform: str):
class SupportAdapterModule(str, Enum):
"""支持的适配器的模块路径"""

bilibili = "nonebot.adapters.bilibili"
console = "nonebot.adapters.console"
ding = "nonebot.adapters.ding"
discord = "nonebot.adapters.discord"
Expand Down
2 changes: 1 addition & 1 deletion src/nonebot_plugin_alconna/uniseg/segment.py
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ def data(self) -> dict[str, Any]:
res.pop("_children", None)
return res

def __call__(self, *segments: Union[str, "Segment"]) -> Self:
def __call__(self, *segments: Union[str, "TS"]) -> Self:
if not segments:
return self
self._children.extend(Text(s) if isinstance(s, str) else s for s in segments)
Expand Down
7 changes: 0 additions & 7 deletions src/nonebot_plugin_alconna/uniseg/target.py
Original file line number Diff line number Diff line change
Expand Up @@ -429,13 +429,6 @@ async def select_github(target: "Target", bot: Bot):
return bot.adapter.get_name() == SupportAdapter.github


@_register(SupportScope.bilibili)
async def select_bilibili(target: "Target", bot: Bot):
if target.channel or target.private:
return False
return bot.adapter.get_name() == SupportAdapter.bilibili


@_register(SupportScope.console)
async def select_console(target: "Target", bot: Bot):
if target.channel:
Expand Down

0 comments on commit 1a7911d

Please sign in to comment.