nonebot每日油价插件
Project description
📖 介绍
定时向指定群&好友发送 当日油价
数据源:汽车之家
- 推荐python
3.10+
💿 安装
使用 nb-cli 安装
在 nonebot2 项目的根目录下打开命令行, 输入以下指令即可安装nb plugin install nonebot-plugin-daily-oil-price
使用包管理器安装
在 nonebot2 项目的插件目录下, 打开命令行, 根据你使用的包管理器, 输入相应的安装命令pip install nonebot-plugin-daily-oil-price
打开 nonebot2 项目根目录下的 pyproject.toml
文件, 在 [tool.nonebot]
部分追加写入
plugins = ["nonebot-plugin-daily-oil-price"]
⚙️ 配置
在 nonebot2 项目的.env
文件中添加下表中的必填配置
配置项 | 必填 | 默认值 | 说明 |
---|---|---|---|
all_qq_groups | 否 | False | 开启全部群聊推送 |
qq_groups | 否 | [ ] | 列表形式,如[123,456] |
qq_friends | 否 | [ ] | 列表形式,如[123,456] |
provinces | 否 | [ ] | 列表形式,如["北京","上海"] |
send_time | 否 | 8 00 | 每日推送时间,以空格隔开 |
通过群聊/私聊添加的自定义配置优先于.env
配置
配置示例如下
all_qq_groups=False #开启全部群聊推送
qq_groups=[123,456] #设定要发送的QQ好友
qq_friends=[123,456] #设定要发送的群
provinces=["北京","上海"] #设定默认油价省份
history_inform_time="8 00" #设定每天发送时间,以空格间隔
🎉 使用
指令表
指令 | 说明 |
---|---|
今日油价+省份 | 获取今日该省的油价 |
油价推送+状态 | 查看油价推送时间和推送省份 |
油价推送+取消 | 取消当前推送指令 |
油价推送+设置 | 连续对话进行推送时间和省份设置 |
🖼️效果图
Project details
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_daily_oil_price-0.1.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 610dad1d3ba6fc17d7a1383161508808751037be24fac886497312c8484c1214 |
|
MD5 | c1a8051a0a204ed0eaf8854f48c0339d |
|
BLAKE2b-256 | ad3c3656c1c44f4efe66e394873d493cd8291ee2f70ca853a3c34db1a7bf1a28 |
Close
Hashes for nonebot_plugin_daily_oil_price-0.1.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ae1ea9bb887aa28465c841285db611415740071e62dc7409f85334def2a09a75 |
|
MD5 | c9c3cec09751cc32430ca1a29f3d391c |
|
BLAKE2b-256 | af7aca099fc76602b4bd7f81cff6b6f3febae76b02aa03d7258a70e66c5a9e5a |