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.2.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 298d4c49aa05b0fc3f77b1a4a0eae9b9c101ed4719610c9062508fd24b28fe38 |
|
MD5 | 4176196119a0ba897bf9097428aaf3a0 |
|
BLAKE2b-256 | f31bb468679a626d59f1d6848a118e691680f12b7287ac07ed44860596f65746 |
Close
Hashes for nonebot_plugin_exchangerate-0.1.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3dd5488056d9c1bd4084c851ca6d53f8000f3c784c0cf661bc2e9d429b27501b |
|
MD5 | 189bb6712042aa398180649275eb1fba |
|
BLAKE2b-256 | 94fce253f440921c1f8a94c230fa7fdbfde67f2921539a05442e32e777ec52e3 |