💿 安装
1. nb-cli安装(推荐)
bot根目录下打开命令行,执行nb命令安装插件,插件配置会自动添加至配置文件
nb plugin install nonebot_plugin_HttpCat
2. pip安装
pip install nonebot_plugin_HttpCat --upgrade
打开 nonebot2 项目的 bot.py 文件, 在其中写入
nonebot.load_plugin('nonebot_plugin_HttpCat')
或在bot路径pyproject.toml的[tool.nonebot]的plugins中添加nonebot_plugin_HttpCat即可
3.应用思路(开发者)
本包提供了两个函数,分别对应了httpcat的 解释msg 和 图片url,或许大家可以拿来让http报错不再无聊~(笑)
from nonebot_plugin_HttpCat import httpcat_msg,httpcat_pic
...
send(msgs + MessageSegment.image(file=url))
🎉 使用
指令表
| 指令 | 需要@ | 范围 | 说明 |
|---|---|---|---|
| httpcat + http status code | 否 | 群聊/私聊 | 后加http提示码 |
注意
默认情况下, 您应该在指令前加上命令前缀, 通常是 /
🧡特别感谢
omega-miya: https://github.com/Ailitonia/omega-miya 超可爱的Miyabot提供的httpcat思路
Metadata
Release files for nonebot-plugin-HttpCat 0.0.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| nonebot_plugin_HttpCat-0.0.2.tar.gz | 3.2 kB | Without provenance | Details |
Release files / nonebot_plugin_HttpCat-0.0.2.tar.gz
| Download URL | nonebot_plugin_HttpCat-0.0.2.tar.gz |
|---|---|
| Size | 3.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
38abe5cc69abcf0f072261472499f48a0f56bc34271902b5d9267d84c25fbaf7
|
|
BLAKE2b-256 checksum How to use checksums |
2de7fc1548094a7e3e6bfaaa2ef755d9915812d207c76a95769c372351857da5
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.10.0
|
Security for nonebot-plugin-HttpCat 0.0.2
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.