Skip to main content

nonebot2 pypi python

nonebot-plugin-keyreply

基于 NoneBot2 的轻量级关键词自动回复插件。

特性

  • 群聊隔离:各群聊及私聊数据完全独立,互不干扰。
  • 多种匹配:支持 精确匹配(默认)、模糊匹配、正则匹配。
  • 权限受控:管理指令限超级用户(SUPERUSER)或群管理(GROUP_ADMIN | GROUP_OWNER)执行。

安装

推荐使用 nb-cli 安装:

nb plugin install nonebot-plugin-keyreply
或使用包管理器
pip install nonebot-plugin-keyreply

并在 pyproject.toml 或 bot.py 中加载插件:

plugins = ["nonebot_plugin_keyreply"]

指令说明

指令前缀默认为 /reply(实际取决于 COMMAND_START 配置)。

指令格式 参数说明 匹配范围参数 示例
/reply add <关键词> <回复> -f 模糊匹配
-r 正则匹配
-g 全局词条
-p 私聊词条
/reply add 菜单 "群菜单内容"
/reply add -f -g 帮助 帮助文档
/reply add -r -p "hi|hello" 你好
/reply edit <关键词> <新回复> - -g 全局 / -p 私聊 /reply edit 菜单 "新菜单"
/reply del <关键词> - -g 全局 / -p 私聊 /reply del 菜单
/reply list [关键词] - -g 全局 / -p 私聊 /reply list
/reply list 菜单

[!IMPORTANT] 添加、修改和删除全局(-g)与私聊(-p)规则仅限超级用户(SUPERUSER)执行,查询列表(list)不受此限制。 如果关键词或回复内容包含空格,请使用双引号包裹,例如:/reply add "早上 好" "您好!"

Metadata

Release files for nonebot-plugin-keyreply 0.1.5

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-keyreply 0.1.5
File Size Uploaded
nonebot_plugin_keyreply-0.1.5.tar.gz 5.5 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for nonebot-plugin-keyreply 0.1.5
File Interpreter ABI Platform
nonebot_plugin_keyreply-0.1.5-py3-none-any.whl Python 3 none any Details

Total release size: 12.0 kB

Release files / nonebot_plugin_keyreply-0.1.5.tar.gz

Download URL nonebot_plugin_keyreply-0.1.5.tar.gz
Size 5.5 kB
Tags Source
SHA-256 checksum
How to use checksums
9b12a0303c8c878d40139cef314ee07d8bab8fd9d6f0b05c9c33f10fab7696c3
BLAKE2b-256 checksum
How to use checksums
ad49ab1442d6a7a345cc5666f5e83e70791c949141ed4ca97aaf755600ab81d2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.12

Release files / nonebot_plugin_keyreply-0.1.5-py3-none-any.whl

Download URL nonebot_plugin_keyreply-0.1.5-py3-none-any.whl
Size 6.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
0ddb772c9359f1b72e48fdb488c0a55178c487728a46e0e41b3b56a04c0e613c
BLAKE2b-256 checksum
How to use checksums
b6ccfdfc4c7980fccbaa9db5dfced78f56a43fb2a992252fe01f44def59ec4f6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.12

Release history Release notifications | RSS feed

This release

0.1.5 This release

2 release files

0.1.4

2 release files

0.1.3

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