a simple weiwei bot
Project description
📖 介绍
一个快速查找维维老师语录的机器人
💿 安装
使用 nb-cli 安装
在 nonebot2 项目的根目录下打开命令行, 输入以下指令即可安装nb plugin install nonebot-plugin-weiweibot
使用包管理器安装
在 nonebot2 项目的插件目录下, 打开命令行, 根据你使用的包管理器, 输入相应的安装命令pip
pip install nonebot-plugin-weiweibot
pdm
pdm add nonebot-plugin-weiweibot
poetry
poetry add nonebot-plugin-weiweibot
uv
uv add nonebot-plugin-weiweibot
打开 nonebot2 项目根目录下的 pyproject.toml 文件, 在 [tool.nonebot] 部分追加写入
plugins = ["nonebot_plugin_weiweibot"]
⚙️ 配置
在 nonebot2 项目的.env文件中添加下表中的必填配置
| 配置项 | 必填 | 默认值 | 说明 |
|---|---|---|---|
| COMMAND_START | 否 | ["/"] | 决定命令开头 |
| COMMAND_SEP | 否 | ["."] | 决定命令分割符 |
| GPG_EMAIL | 是 | xxx@example.com | 决定 bot 使用的密钥 |
| PLUG_LISTEN_GROUPS | 是 | [114514, 1919810] | 决定插件响应群组 |
| ALGOLIA_APPLICATION_ID | 是 | 114514 | 请先将 nin 的图片库上传 algolia |
| ALGOLIA_API_KEY | 是 | 114514 | 请先将 nin 的图片库上传 algolia |
🎉 使用
指令表
| 指令 | 权限 | 需要@ | 说明 |
|---|---|---|---|
| /help | 所有人 | 否 | 帮助说明 |
| /deta | 所有人 | 否 | 进一步的帮助说明(bushi |
| /vv | 所有人 | 否 | 输入任意关键字, 返回匹配的随机图片 |
| /r | 所有人 | 否 | 无需参数, 返回随机图片 |
| /al | 所有人 | 否 | algolia 搜索, 输入任意关键字, 返回匹配列表或指定图 |
| /acc | 所有人 | 否 | 精确搜索, 输入关键字, 返回匹配的图片列表或唯一图片 |
| /gpg | 所有人 | 否 | 加载 nin 的 gpg 密钥用于加密通信 |
| /upload | 所有人 | 否 | 上传图片 |
🥹 目前仅 /vv 和 /al 指令支持 gpg, clip 正在绝赞施工中
⚠️ 目前部分指令未进行全面的测试
😘本项目使用了 nonebot_plugin_localstore 进行会话存储, 存储位置等请参照该插件文档
🥰 nin 可以在本仓库的 assets 里下载样例图片
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file nonebot_plugin_weiweibot-0.2.3.tar.gz.
File metadata
- Download URL: nonebot_plugin_weiweibot-0.2.3.tar.gz
- Upload date:
- Size: 12.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
bee123e24b58a50579d31c21bf2434fac9857f1efe42c9161bea74254a80bdec
|
|
| MD5 |
81eca59f43c3036f17b44b4dda61af7a
|
|
| BLAKE2b-256 |
2a15080fad8461e4faeecc51eb1ce68030c043daa8c2d2b9068b9ec057261abd
|
Provenance
The following attestation bundles were made for nonebot_plugin_weiweibot-0.2.3.tar.gz:
Publisher:
python-publish.yml on SwedishDoveCooker/nonebot-plugin-weiweibot
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
nonebot_plugin_weiweibot-0.2.3.tar.gz -
Subject digest:
bee123e24b58a50579d31c21bf2434fac9857f1efe42c9161bea74254a80bdec - Sigstore transparency entry: 425211876
- Sigstore integration time:
-
Permalink:
SwedishDoveCooker/nonebot-plugin-weiweibot@4439e46b22069c1a49fb6e0fe3c3533bcf03c966 -
Branch / Tag:
refs/heads/master - Owner: https://github.com/SwedishDoveCooker
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@4439e46b22069c1a49fb6e0fe3c3533bcf03c966 -
Trigger Event:
push
-
Statement type:
File details
Details for the file nonebot_plugin_weiweibot-0.2.3-py3-none-any.whl.
File metadata
- Download URL: nonebot_plugin_weiweibot-0.2.3-py3-none-any.whl
- Upload date:
- Size: 12.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
aade1d6816ab7481dd3db32a57af89f74fb09700d76595d39bbe8da60049e993
|
|
| MD5 |
171a65e0dc3e076e4e0bacb7ba207f7c
|
|
| BLAKE2b-256 |
5c17215718e2027a7503cdfbf4575e9b2fc46caca0cdc5b1acb2d13b0922e185
|
Provenance
The following attestation bundles were made for nonebot_plugin_weiweibot-0.2.3-py3-none-any.whl:
Publisher:
python-publish.yml on SwedishDoveCooker/nonebot-plugin-weiweibot
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
nonebot_plugin_weiweibot-0.2.3-py3-none-any.whl -
Subject digest:
aade1d6816ab7481dd3db32a57af89f74fb09700d76595d39bbe8da60049e993 - Sigstore transparency entry: 425211895
- Sigstore integration time:
-
Permalink:
SwedishDoveCooker/nonebot-plugin-weiweibot@4439e46b22069c1a49fb6e0fe3c3533bcf03c966 -
Branch / Tag:
refs/heads/master - Owner: https://github.com/SwedishDoveCooker
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@4439e46b22069c1a49fb6e0fe3c3533bcf03c966 -
Trigger Event:
push
-
Statement type: