Skip to main content
NoneBotPluginLogo

NoneBotPluginText

nonebot-plugin-person

✨ Nonebot2 简易插件随个人,随个群友当幸运观众🤪 ✨

license pypi python

💿 安装

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

打开 nonebot2 项目的 bot.py 文件, 在其中写入

nonebot.load_plugin('nonebot-plugin-person')
从 github 安装 在 nonebot2 项目的插件目录下, 打开命令行, 输入以下命令克隆此储存库
git clone https://github.com/jcjrobert/nonebot-plugin-person.git

打开 nonebot2 项目的 bot.py 文件, 在其中写入

nonebot.load_plugin('src.plugins.nonebot-plugin-person')

⚙️ 配置

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

配置项 必填 默认值 说明
person_show_avatar 否 true 是否显示头像,默认显示
person_extra_messages 否 [] 自定义文案,{name}会替换成Bot昵称,{person}会替换成抽到的人的信息,没有这两项依然能展示
person_extra_messages_overwrite 否 false 自定义文案是否覆盖已有文案,默认不覆盖
person_at 否 false 是否at随人对象,将会替换QQ号放在消息结尾
person_choose_last 否 false 是否仅抽取最近发言的群友,默认否
person_choose_last_time 否 2592000 最近发言时间范围,默认为2592000(30天)
person_check_last 否 false 日志打印,用于检查群友最近发言时间

注意,不要将最近发言时间范围设置的太短,因为API获取到的最近发言时间戳经测试并不同步,如果有更好的方案欢迎提出issue或pr

🎉 使用

随个人

随个人帮我打代码

随个人XXX

...

📝 更新日志

展开/收起

0.0.5

  • 支持仅抽取最近发言的群友

0.0.4

  • 修复机器人昵称配置为空时报错的BUG

0.0.3

  • 支持AT随人对象

0.0.2

  • 支持头像显示
  • 支持自定义文案,同时支持是否覆盖原文案

0.0.1

  • 插件初次发布

开源许可

本项目使用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-person 0.0.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-person 0.0.5
File Size Uploaded Provenance
nonebot-plugin-person-0.0.5.tar.gz 5.4 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for nonebot-plugin-person 0.0.5
File Interpreter ABI Platform
nonebot_plugin_person-0.0.5-py3-none-any.whl Python 3 none any Details

Total release size: 11.5 kB

Release files / nonebot-plugin-person-0.0.5.tar.gz

Download URL nonebot-plugin-person-0.0.5.tar.gz
Size 5.4 kB
Tags Source
SHA-256 checksum
How to use checksums
207e209df98f964824574b9a45ea87af811c562426fa10e401fc4e3267be5a0a
BLAKE2b-256 checksum
How to use checksums
a6fa8a8ccea095f46862732c8eb0a7a96dc4f824b4e81c57f4950ea449e22c68
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.8.10

Release files / nonebot_plugin_person-0.0.5-py3-none-any.whl

Download URL nonebot_plugin_person-0.0.5-py3-none-any.whl
Size 6.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
178d6941447d67844d6db9a590d8c72cb02b7fef407a53d513c96b8f7a088ac5
BLAKE2b-256 checksum
How to use checksums
6f547460c6b516c53ae023549ab42ec3c73340825646df1e9b06e89e2b92639e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.8.10

Security for nonebot-plugin-person 0.0.5

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

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