NoneBot2 plugin for currency converter
Project description
📖 介绍
支持汇率换算与汇率查询
💿 安装
使用 nb-cli 安装
在 nonebot2 项目的根目录下打开命令行, 输入以下指令即可安装nb plugin install nonebot-plugin-exchangerate
使用包管理器安装
在 nonebot2 项目的插件目录下, 打开命令行, 根据你使用的包管理器, 输入相应的安装命令pip
pip install nonebot-plugin-exchangerate
pdm
pdm add nonebot-plugin-exchangerate
poetry
poetry add nonebot-plugin-exchangerate
conda
conda install nonebot-plugin-exchangerate
打开 nonebot2 项目的 bot.py
文件, 在其中写入
nonebot.load_plugin('nonebot_plugin_exchangerate')
⚙️ 配置
在 nonebot2 项目的.env
文件中添加下表中的必填配置
配置项 | 必填 | 默认值 | 说明 |
---|---|---|---|
EXCHANGE_APP_KEY | 是 | 无 | 聚合数据的汇率APP_KEY,点击此处获取 |
EXCHANGE_DECIMALS | 否 | 2 | 汇率换算保留小数位 |
🎉 使用
指令表
指令 | 需要@ | 范围 | 说明 |
---|---|---|---|
数字+货币名称 | 否 | 私聊/群聊 | 将该数量的货币换算为对应的人民币,如:200日元 |
货币名称+汇率 | 否 | 私聊/群聊 | 展示该货币的汇率详情 |
汇率列表/货币列表 | 否 | 私聊/群聊 | 查看支持的货币清单 |
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
Close
Hashes for nonebot-plugin-exchangerate-0.1.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 76b8caafe27d744681773c50bae49bcc295f5d9dec30fd3a09c41c407d437f08 |
|
MD5 | 071979073db11f3f87cef4a4d81980ce |
|
BLAKE2b-256 | 38594e2e0344406b29536f15cfc5a83b68e7840c5adc0a6268dc9f2aa7e69131 |
Close
Hashes for nonebot_plugin_exchangerate-0.1.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 05e2f918bbc50a6fb72dbdde32ae2d0b593ea1b28595fa99e9bfca84be139ff5 |
|
MD5 | 446e1191faa1d4b1df199406e6b482c1 |
|
BLAKE2b-256 | dcaf7f0682fd39814ac6d9b453390b5dfaa68fd8a347cb3fd01f9c578da036e1 |