Skip to main content

NoneBot-Plugin-Argot

✨ NoneBot2 暗语消息 ✨

pypi python uv-managed alc-resolved
NoneBot Registry Supported Adapters
📸 演示与预览   |   📦️ 下载插件   |   💬 加入交流群

📖 介绍

NoneBot2 暗语消息支持

starify
Star History

💿 安装

以下提到的方法任选 其一 即可

[推荐] 使用 nb-cli 安装 在 Bot 的根目录下打开命令行, 输入以下指令即可安装
nb plugin install nonebot-plugin-argot
使用包管理器安装
pip install nonebot-plugin-argot
# or, use poetry
poetry add nonebot-plugin-argot
# or, use pdm
pdm add nonebot-plugin-argot
# or, use uv
uv add nonebot-plugin-argot

🎉 使用

本插件基于 plugin-alconna,为 NoneBot 提供了一个新的消息段 Argot

@dataclass
class Argot(Segment):
    name: str
    segment: str | Segment | list[Segment]
    command: str | Literal[False] | None = field(default=None, kw_only=True)
    expired_at: int | timedelta = field(default_factory=timedelta, kw_only=True)
    extra: dict[str, Any] = field(default_factory=dict, kw_only=True)
  • name: 暗语名称
  • segment: 暗语包含的消息段
  • command: 触发暗语的指令(跟随 COMMAND_START 配置)
    • None: 使用 name 作为指令名
    • False: 禁止通过指令获取暗语
  • expired_at: 过期时间
  • extra:暗语事件中储存的额外数据

可以通过 on_argot 监听暗语事件

@on_argot("name")
async def _(event: ArgotEvent):
  ...

示例:👉 传送门

📸 效果图

example example

💖 鸣谢

贡献者们

contributors sponsors

感谢这些大佬对本项目作出的贡献:

contributors

📄 许可证

本项目使用 MIT 许可证开源

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

Metadata

Release files for nonebot-plugin-argot 0.2.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for nonebot-plugin-argot 0.2.2
File Size Uploaded
nonebot_plugin_argot-0.2.2.tar.gz 12.7 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for nonebot-plugin-argot 0.2.2
File Interpreter ABI Platform
nonebot_plugin_argot-0.2.2-py3-none-any.whl Python 3 none any Details

Total release size: 25.6 kB

Release files / nonebot_plugin_argot-0.2.2.tar.gz

Download URL nonebot_plugin_argot-0.2.2.tar.gz
Size 12.7 kB
Tags Source
SHA-256 checksum
How to use checksums
5244a0c60ade77b20b37ac2cbc8b284cd6973f85844082f23ca64c5cd1ef386a
BLAKE2b-256 checksum
How to use checksums
2a0f87e6c181389ed2c7f9217e0fcd188bd46d390dfd4d4a8645a18e573c9b18
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.8.22

Release files / nonebot_plugin_argot-0.2.2-py3-none-any.whl

Download URL nonebot_plugin_argot-0.2.2-py3-none-any.whl
Size 12.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
a712e0fd87d5ed7e330ba614df322e40c785e5d530a502c55301c445ffd6753a
BLAKE2b-256 checksum
How to use checksums
006304b950489f364f69aaf7c6c1cf27085f1f93b9d2c801dc8f718b6d788d3d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.8.22

Release history Release notifications | RSS feed

This release

0.2.2 This release

2 release files

0.2.1

2 release files

0.2.0

2 release files

0.1.9

2 release files

0.1.8

2 release files

0.1.7

2 release files

0.1.6

2 release files

0.1.5

2 release files

0.1.4

2 release files

0.1.3

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page