Skip to main content

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

Project description

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.tomlbot.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 "早上 好" "您好!"

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

nonebot_plugin_keyreply-0.1.4.tar.gz (5.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

nonebot_plugin_keyreply-0.1.4-py3-none-any.whl (6.4 kB view details)

Uploaded Python 3

File details

Details for the file nonebot_plugin_keyreply-0.1.4.tar.gz.

File metadata

  • Download URL: nonebot_plugin_keyreply-0.1.4.tar.gz
  • Upload date:
  • Size: 5.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for nonebot_plugin_keyreply-0.1.4.tar.gz
Algorithm Hash digest
SHA256 172972a6a448f5e32775137e08d3739fd04ea9f8a6cecfe4325d246ebf1bb70c
MD5 c56b92b88866d05b1cf4d7127ad111d5
BLAKE2b-256 c28ff38c869f9b39f64944ef7e77346e243b8d47806d4c78030fd1fb86550027

See more details on using hashes here.

File details

Details for the file nonebot_plugin_keyreply-0.1.4-py3-none-any.whl.

File metadata

File hashes

Hashes for nonebot_plugin_keyreply-0.1.4-py3-none-any.whl
Algorithm Hash digest
SHA256 c34ced337b5a9f193c7baf03fe7ffa36f125b3bccebbf6eafe3927439a4662e4
MD5 95d2206e12eeb4b9870d53fe5e744288
BLAKE2b-256 a647dc0c9211f12d3683295de4969c2b15dd04960c69302b7b87addaf531bb3b

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page