Skip to main content

提取于LittlePaimon的帮助插件

Project description

NoneBotPluginLogo

nonebot-plugin-pmhelp

✨提取于LittlePaimon的帮助插件✨

📖 介绍

虽然LittlePaimon不再维护了,但是 @CMHopeSunshine 的帮助插件真好用,所以把LittlePaimon帮助插件独立出来(因为直接照搬,有问题请pr

💿 安装

使用 nb-cli 安装 在 nonebot2 项目的根目录下打开命令行, 输入以下指令即可安装
nb plugin install nonebot-plugin-pmhelp
使用包管理器安装 在 nonebot2 项目的插件目录下, 打开命令行, 根据你使用的包管理器, 输入相应的安装命令
pip
pip install nonebot-plugin-pmhelp
pdm
pdm add nonebot-plugin-pmhelp
poetry
poetry add nonebot-plugin-pmhelp
conda
conda install nonebot-plugin-pmhelp

打开 nonebot2 项目根目录下的 pyproject.toml 文件, 在 [tool.nonebot] 部分追加写入

plugins = ["nonebot_plugin_pmhelp"]

📋 效果

帮助图(举例)
_
被禁用对应变黑(全部禁用)
_

⚙️ 配置

在 nonebot2 项目的.env文件中添加下表中的必填配置

配置项 必填 默认值 说明
img_cache True 图片资源缓存开关(无需引号)
pm_version "11.45.14" 帮助显示的版本号
pm_text "自定义文本" 自定义文本
pm_plugin "1" 管理插件文件的位置(1为统一目录,2为机器人目录,3为自定义目录)
pm_path pm_plugin为3时的目录(无需引号)

nonebot2插件生成帮助图位于{帮助文件目录}/pm_config下

举例(xxx.yml):
description: 根据加载的nonebot2...   #插件介绍
matchers:                           #帮助图展示的指令卡片(可能需要自行配置)
- {pm_description: 禁用|取消...,     #介绍
    pm_name: pm-ban|unban,          #此帮助名
    pm_priority: 1,                 #优先级
    pm_show: true,                  #是否展示
    pm_usage: pm ban|unba...,       #触发命令
  }
-{....}
module_name: nonebot_plugin_pmhelp  #插件包名
name: PM帮助                         #插件名字
priority: 1                          #优先级
show: true                           #是否展示在帮助图中
usage: help                          #默认读取插件命令
编写命令时实例
xxx = on_command(
    ....,
    state={
        "pm_name": #此帮助名,
        "pm_description": #介绍,
        "pm_usage": #触发命令,
        "pm_priority": #优先级,
    },
)

🎉 使用

指令表

指令 权限 需要@ 范围 说明
help 所有 全部 打开所有帮助
pm ban unban <插件名> 管理 全部

丨💸鸣谢

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_pmhelp-1.1.5.tar.gz (17.9 MB view details)

Uploaded Source

Built Distribution

nonebot_plugin_pmhelp-1.1.5-py3-none-any.whl (17.9 MB view details)

Uploaded Python 3

File details

Details for the file nonebot_plugin_pmhelp-1.1.5.tar.gz.

File metadata

  • Download URL: nonebot_plugin_pmhelp-1.1.5.tar.gz
  • Upload date:
  • Size: 17.9 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.7

File hashes

Hashes for nonebot_plugin_pmhelp-1.1.5.tar.gz
Algorithm Hash digest
SHA256 1b3ed54c9aadab392c50b140eca1132667cdd0d28d9940d27ebb1db98c79e2ae
MD5 583f77bf9b2db92c900a2afd71b612d6
BLAKE2b-256 5f8d3c45ffd17fb2c9111d0bef98fb9de31b49c6ecd77960fef3b7edb685a715

See more details on using hashes here.

File details

Details for the file nonebot_plugin_pmhelp-1.1.5-py3-none-any.whl.

File metadata

File hashes

Hashes for nonebot_plugin_pmhelp-1.1.5-py3-none-any.whl
Algorithm Hash digest
SHA256 c20c4041a13f0729e52a19559f241360d5647fc21120b1ad89a07d9a5bed93aa
MD5 e94fa9077ac50c3d68adf377f7ad784c
BLAKE2b-256 44a704b78d415df72975f8aa0b50a715c10b0861d5004d5d9d8711c54acfba6a

See more details on using hashes here.

Supported by

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