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 错误或接口响应格式异常时,插件会返回对应的错误提示。

🎨 效果图

暂无示例图。

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_metals-0.2.0.tar.gz (68.7 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_metals-0.2.0-py3-none-any.whl (5.2 kB view details)

Uploaded Python 3

File details

Details for the file nonebot_plugin_metals-0.2.0.tar.gz.

File metadata

  • Download URL: nonebot_plugin_metals-0.2.0.tar.gz
  • Upload date:
  • Size: 68.7 kB
  • Tags: Source
  • Uploaded using 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}

File hashes

Hashes for nonebot_plugin_metals-0.2.0.tar.gz
Algorithm Hash digest
SHA256 6c3e9aa60a42e49f98a490c1e34954ec7fe24057eee378ff48586354b64cd089
MD5 b10afa18638703be2d75a503977da9ce
BLAKE2b-256 3467b036c23d3d83d2c24a0abf89a0958aa0a34216da5be435705574693fddda

See more details on using hashes here.

File details

Details for the file nonebot_plugin_metals-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: nonebot_plugin_metals-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 5.2 kB
  • Tags: Python 3
  • Uploaded using 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}

File hashes

Hashes for nonebot_plugin_metals-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 1229d51812ac4fafcc7a90270aa71b45e2ab923dd6d809146f591045e479c6e3
MD5 e7d66e2ecffb1cc43a21ca19008848ff
BLAKE2b-256 30f5ef8ea2af715457e87501c1163c2969fbe27f0bea21fcb9ed62dc4079c2a3

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

0.2.0 This release

2 files

0.1.0

2 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