Skip to main content

通过API获取维维语录图片的NoneBot2插件

Project description

nonebot-plugin-vvquest

License Python Version NoneBot Version Adapter

通过API获取维维语录图片的NoneBot2插件

功能介绍

通过API获取维维语录图片,支持直接搜索和引用消息搜索,可配置返回图片数量和使用合并转发消息。

安装方式

使用 nb-cli 安装(推荐)

nb plugin install nonebot-plugin-vvquest

使用 pip 安装

pip install nonebot-plugin-vvquest

手动安装

  1. 克隆本仓库
git clone https://github.com/webjoin111/nonebot-plugin-vvquest.git
  1. nonebot_plugin_vvquest文件夹复制到你的插件目录下

  2. pyproject.toml中添加插件

[tool.nonebot]
plugins = ["nonebot_plugin_vvquest"]

配置项

.env文件中添加以下配置:

# 最大返回图片数量限制 (1-50)
VVQUEST_MAX_NUM=10

# 是否使用合并转发消息
VVQUEST_USE_FORWARD=true

# 本地API完整地址(如 http://localhost:8000/search),留空使用默认在线API
VVQUEST_API_BASE=""

# API请求冷却时间(秒),防止频繁请求 (1-300)
VVQUEST_COOLDOWN=30

使用方法

直接搜索

/vv语录 <标题> [数量/参数]

引用消息搜索

引用某条消息 + /vv语录 [数量/参数]

支持本地API

在配置中设置 VVQUEST_API_BASE 项,填写完整API地址(如 http://localhost:8000/search)

示例

/vv语录 你好
/vv语录 你好 5
/vv语录 你好 n=5

注意事项

  • 默认返回5条结果,最大返回数量受配置限制
  • 请求有冷却时间,防止频繁请求
  • 本地API失败时会自动回退到在线API
  • 插件内置API请求失败重试机制,提高稳定性

API 来源

本插件使用的 API 基于 MemeMeow 项目,在此对该项目的开发者表示衷心的感谢!

如果网络连接有问题,建议开启代理工具,并将 api.zvv.quest 加入规则列表,以确保 API 请求能够正常进行。

开源协议

本项目使用 MIT 许可证开源。

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_vvquest-0.1.0.tar.gz (6.4 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_vvquest-0.1.0-py3-none-any.whl (7.2 kB view details)

Uploaded Python 3

File details

Details for the file nonebot_plugin_vvquest-0.1.0.tar.gz.

File metadata

  • Download URL: nonebot_plugin_vvquest-0.1.0.tar.gz
  • Upload date:
  • Size: 6.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.6

File hashes

Hashes for nonebot_plugin_vvquest-0.1.0.tar.gz
Algorithm Hash digest
SHA256 94b7f19802606f2c706f0d149840fdb441eec047bceaed64cd1ccfd558e34003
MD5 aadbc17519ff87e47e0dbae2b3b89780
BLAKE2b-256 b2150895f75a08a4f378fe9b91521be3207cdded9b83d2e397bc29fd068f63d0

See more details on using hashes here.

File details

Details for the file nonebot_plugin_vvquest-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for nonebot_plugin_vvquest-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 52cf11c2e365e33c15e4e645b2614d6954275d8375a344edd0f90fc860c4d88f
MD5 9fab6738d7bd1b9772327b1c594954e8
BLAKE2b-256 69b33a66730dd9be6f0dea7a4b00cfee5d5e6e72d84a1bf148869ecf872d5024

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