Skip to main content
logo

✨ nonebot-plugin-metals ✨

LICENSE pypi python uv
ruff

📖 介绍

基于招商银行公开接口的 NoneBot 黄金行情插件,查询 AU9999 的实时行情。 插件通过 nonebot_plugin_metals 模块加载,关键词仅匹配整条消息,且不区分大小写。

💿 安装

使用 nb-cli 安装 在 nonebot2 项目的根目录下打开命令行, 输入以下指令即可安装
nb plugin install nonebot-plugin-metals --upgrade

使用 pypi 源安装

nb plugin install nonebot-plugin-metals --upgrade -i "https://pypi.org/simple"

使用清华源安装

nb plugin install nonebot-plugin-metals --upgrade -i "https://pypi.tuna.tsinghua.edu.cn/simple"
使用包管理器安装 在 nonebot2 项目的插件目录下, 打开命令行, 根据你使用的包管理器, 输入相应的安装命令
uv
uv add nonebot-plugin-metals

安装仓库 master 分支

uv add git+https://github.com/ByteColtX/nonebot-plugin-metals@master
pdm
pdm add nonebot-plugin-metals

安装仓库 master 分支

pdm add git+https://github.com/ByteColtX/nonebot-plugin-metals@master
poetry
poetry add nonebot-plugin-metals

安装仓库 master 分支

poetry add git+https://github.com/ByteColtX/nonebot-plugin-metals@master

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

plugins = ["nonebot_plugin_metals"]
使用 nbr 安装(使用 uv 管理依赖可用)

nbr 是一个基于 uv 的 nb-cli,可以方便地管理 nonebot2

nbr plugin install nonebot-plugin-metals

使用 pypi 源安装

nbr plugin install nonebot-plugin-metals -i "https://pypi.org/simple"

使用清华源安装

nbr plugin install nonebot-plugin-metals -i "https://pypi.tuna.tsinghua.edu.cn/simple"

⚙️ 配置

插件不需要额外配置。行情数据来自招商银行公开接口,查询 AU9999 黄金实时行情。

🎉 使用

指令表

指令 权限 需要@ 范围 说明
发送 黄金 群员 否 群聊、私聊 查询 AU9999 黄金实时行情
发送 au99 群员 否 群聊、私聊 查询 AU9999 黄金实时行情
发送 gold 群员 否 群聊、私聊 查询 AU9999 黄金实时行情
发送 金块 群员 否 群聊、私聊 查询 AU9999 黄金实时行情

以上关键词必须单独作为整条消息发送,关键词不区分大小写。

黄金行情

黄金
au99
gold
金块

返回内容包括获取日期、黄金品种、最新价、开盘价、昨收盘、最高价、最低价、平均价、成交量、涨跌额、涨跌幅和更新时间。

网络超时、HTTP 错误或接口响应格式异常时,插件会返回对应的错误提示。

🎨 效果图

暂无示例图。

Metadata

Release files for nonebot-plugin-metals 0.2.0

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-metals 0.2.0
File Size Uploaded
nonebot_plugin_metals-0.2.0.tar.gz 68.7 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for nonebot-plugin-metals 0.2.0
File Interpreter ABI Platform
nonebot_plugin_metals-0.2.0-py3-none-any.whl Python 3 none any Details

Total release size: 73.9 kB

Release files / nonebot_plugin_metals-0.2.0.tar.gz

Download URL nonebot_plugin_metals-0.2.0.tar.gz
Size 68.7 kB
Tags Source
SHA-256 checksum
How to use checksums
6c3e9aa60a42e49f98a490c1e34954ec7fe24057eee378ff48586354b64cd089
BLAKE2b-256 checksum
How to use checksums
3467b036c23d3d83d2c24a0abf89a0958aa0a34216da5be435705574693fddda
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.12.5 {"installer":{"name":"uv","version":"0.12.5","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / nonebot_plugin_metals-0.2.0-py3-none-any.whl

Download URL nonebot_plugin_metals-0.2.0-py3-none-any.whl
Size 5.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
1229d51812ac4fafcc7a90270aa71b45e2ab923dd6d809146f591045e479c6e3
BLAKE2b-256 checksum
How to use checksums
30f5ef8ea2af715457e87501c1163c2969fbe27f0bea21fcb9ed62dc4079c2a3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.12.5 {"installer":{"name":"uv","version":"0.12.5","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release history Release notifications | RSS feed

This release

0.2.0 This release

2 release files

0.1.0

2 release files

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