nonebot-plugin-firexN


Namenonebot-plugin-firexN JSON
Version 0.1.7 PyPI version JSON
download
home_pagehttps://github.com/GC-ZF/nonebot_plugin_firexN
Summarynonebot plugin firexN
upload_time2022-12-24 13:46:29
maintainer
docs_urlNone
authorzhangshier
requires_python>=3.7.3,<4.0
license
keywords pip nonebot2 nonebot fire nonebot_plugin
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            <p align="center">
  <a href="https://v2.nonebot.dev/"><img src="https://v2.nonebot.dev/logo.png" width="200" height="200" alt="nonebot"></a>
</p>

<div align="center">
<h1 align="center">🔥 nonebot_plugin_firexN</h1>

✨ 定时发送QQ消息插件 ✨

</div>

<p align="center">
  <a href="https://github.com/GC-ZF/nonebot_plugin_firexN/blob/main/LICENSE">
    <img src="https://img.shields.io/github/license/GC-ZF/nonebot_plugin_firexN" alt="license">
  </a>
  <a href="https://pypi.python.org/pypi/nonebot_plugin_firexN">
    <img src="https://img.shields.io/pypi/v/nonebot_plugin_firexN" alt="pypi">
  </a>
  <img src="https://img.shields.io/badge/python-3.7.3+-blue" alt="python">
  <img  src="https://visitor-badge.glitch.me/badge?page_id=nonebot_plugin_firexN" /><br />
</p></br>

## 插件描述

一款基于[Nonebot2](https://github.com/nonebot/nonebot2)的插件

**避免尴尬,从我做起,一起燚xN吧**

<div align="center">
  <img height="300px" src="https://testingcf.jsdelivr.net/gh/GC-ZF/nonebot_plugin_firexN/example.png">
</div>



定时早晚各发一条信息(以防早上忘记回复,晚上还有第二次提醒),默认调用[API](https://v1.hitokoto.cn?c=a&c=b&c=c&c=d&c=h)随机发送一句,也可以自定义发送消息的内容及时间。当然如果你愿意花一些心思去读代码,此插件还可以改成你需要的定时提醒工具(再加几个定时器,喝水小助手不就有了么!)

本人未系统学习过py,靠仅有的cpp和py的一点点理解制作的,如果有任何问题、建议,欢迎[issues](https://github.com/GC-ZF/nonebot_plugin_firexN/issues)

## 依赖
本插件依赖[定时任务](https://github.com/nonebot/plugin-apscheduler),首先确保自己有`nonebot_plugin_apscheduler`(pip list查看),安装命令
```python
pip install nonebot_plugin_apscheduler
```
## 安装
```python
pip install nonebot_plugin_firexN
```
## 配置项
在`bot.py`中添加
```python
nonebot.load_plugin("nonebot_plugin_firexN")
```
在`.evn`中配置参数说明
```python
fire_users = ["xxx","xxx"]    # 必填 联系人QQ
fire_switch_morning = False   # 选填 True/False 默认开启 早上消息推送是否开启
fire_switch_night = False     # 选填 True/False 默认开启 晚上消息推送是否开启
fire_mode = 1                 # 选填 默认模式2 模式1发送自定义句子,模式2随机调用一句
fire_sentence_moring = ["句子1","句子2","..."]    # 如果是模式1 此项必填,早上随机发送该字段中的一句
fire_sentence_night = ["句子1","句子2","..."]     # 如果是模式1 此项必填,晚上随机发送该字段中的一句
fire_time_moring = "8 0"    # 选填 早上发送时间默认为7:00
fire_time_night = "23 0"    # 选填 晚上发送时间默认为22:00                   
```
## 配置示例
模式1
```python
fire_users = ["1310446718","2689438597"]    # 必填 联系人QQ
fire_switch_morning = True    # 选填 True/False 默认开启 早上消息推送是否开启
fire_switch_night = False     # 选填 True/False 默认开启 晚上消息推送是否开启
fire_mode = 1                 # 选填 默认模式2 模式1发送自定义句子,模式2随机调用一句
fire_sentence_moring = ["🌞早,又是元气满满的一天","句子2","..."]    # 如果是模式1 此项必填,早上随机发送该字段中的一句
fire_sentence_night = ["🌛今天续火花了么,晚安啦","句子2","..."]     # 如果是模式1 此项必填,晚上随机发送该字段中的一句
fire_time_moring = "8 0"    # 选填 早上发送时间默认为7:00
fire_time_night = "23 0"    # 选填 晚上发送时间默认为22:00 
```
模式2
```python
fire_users = ["xxx","xxx"]    # 必填 联系人QQ
fire_mode = 2                 # 必填 模式1发送自定义句子,模式2随机调用一句  
```
## 补充
本插件的初衷是续火花而不是群聊定时推送,所以pip安装并没有群聊功能,如果需要你可以将仓库中`group_msg.py`,保存到在`[nb根目录]/plugins/group/group_msg.py`中
在`.evn`中配置参数,之后重启bot.py。

```python
send_group_id = ["xxx","xxx"]    # 必填 群号
send_switch_morning = False      # 选填 True/False 默认开启 早上消息推送是否开启
send_switch_night = False        # 选填 True/False 默认开启 晚上消息推送是否开启
send_mode = 1                 # 选填 默认模式2 模式1发送自定义句子,模式2随机调用一句
send_sentence_moring = ["句子1","句子2","..."]    # 如果是模式1 此项必填,早上随机发送该字段中的一句
send_sentence_night = ["句子1","句子2","..."]     # 如果是模式1 此项必填,晚上随机发送该字段中的一句
send_time_moring = "8 0"    # 选填 早上发送时间默认为7:00
send_time_night = "23 0"    # 选填 晚上发送时间默认为22:00                   
```
因此功能不属于本插件,另外推荐一款群管插件[yzyyz1387/nonebot_plugin_admin](https://github.com/yzyyz1387/nonebot_plugin_admin),群聊定时推送功能已向作者提交合并申请。
## 更新记录
2022.8.15,新增消息推送开关,更改fire_mode为选填,默认模式2

```python
fire_switch_morning = True    # 选填 True/False 默认开启 早上消息推送是否开启
fire_switch_night = False     # 选填 True/False 默认开启 晚上消息推送是否开启
fire_mode = 1                 # 选填 默认模式2 模式1发送自定义句子,模式2随机调用一句
```

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/GC-ZF/nonebot_plugin_firexN",
    "name": "nonebot-plugin-firexN",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.7.3,<4.0",
    "maintainer_email": "",
    "keywords": "pip,nonebot2,nonebot,fire,nonebot_plugin",
    "author": "zhangshier",
    "author_email": "1310446718@qq.com",
    "download_url": "https://files.pythonhosted.org/packages/2a/56/b348a78790a44709bde93f0b668c545e717b51c7af63b59263b34ee43476/nonebot_plugin_firexN-0.1.7.tar.gz",
    "platform": "any",
    "description": "<p align=\"center\">\n  <a href=\"https://v2.nonebot.dev/\"><img src=\"https://v2.nonebot.dev/logo.png\" width=\"200\" height=\"200\" alt=\"nonebot\"></a>\n</p>\n\n<div align=\"center\">\n<h1 align=\"center\">\ud83d\udd25 nonebot_plugin_firexN</h1>\n\n\u2728 \u5b9a\u65f6\u53d1\u9001QQ\u6d88\u606f\u63d2\u4ef6 \u2728\n\n</div>\n\n<p align=\"center\">\n  <a href=\"https://github.com/GC-ZF/nonebot_plugin_firexN/blob/main/LICENSE\">\n    <img src=\"https://img.shields.io/github/license/GC-ZF/nonebot_plugin_firexN\" alt=\"license\">\n  </a>\n  <a href=\"https://pypi.python.org/pypi/nonebot_plugin_firexN\">\n    <img src=\"https://img.shields.io/pypi/v/nonebot_plugin_firexN\" alt=\"pypi\">\n  </a>\n  <img src=\"https://img.shields.io/badge/python-3.7.3+-blue\" alt=\"python\">\n  <img  src=\"https://visitor-badge.glitch.me/badge?page_id=nonebot_plugin_firexN\" /><br />\n</p></br>\n\n## \u63d2\u4ef6\u63cf\u8ff0\n\n\u4e00\u6b3e\u57fa\u4e8e[Nonebot2](https://github.com/nonebot/nonebot2)\u7684\u63d2\u4ef6\n\n**\u907f\u514d\u5c34\u5c2c\uff0c\u4ece\u6211\u505a\u8d77\uff0c\u4e00\u8d77\u71daxN\u5427**\n\n<div align=\"center\">\n  <img height=\"300px\" src=\"https://testingcf.jsdelivr.net/gh/GC-ZF/nonebot_plugin_firexN/example.png\">\n</div>\n\n\n\n\u5b9a\u65f6\u65e9\u665a\u5404\u53d1\u4e00\u6761\u4fe1\u606f(\u4ee5\u9632\u65e9\u4e0a\u5fd8\u8bb0\u56de\u590d,\u665a\u4e0a\u8fd8\u6709\u7b2c\u4e8c\u6b21\u63d0\u9192),\u9ed8\u8ba4\u8c03\u7528[API](https://v1.hitokoto.cn?c=a&c=b&c=c&c=d&c=h)\u968f\u673a\u53d1\u9001\u4e00\u53e5,\u4e5f\u53ef\u4ee5\u81ea\u5b9a\u4e49\u53d1\u9001\u6d88\u606f\u7684\u5185\u5bb9\u53ca\u65f6\u95f4\u3002\u5f53\u7136\u5982\u679c\u4f60\u613f\u610f\u82b1\u4e00\u4e9b\u5fc3\u601d\u53bb\u8bfb\u4ee3\u7801,\u6b64\u63d2\u4ef6\u8fd8\u53ef\u4ee5\u6539\u6210\u4f60\u9700\u8981\u7684\u5b9a\u65f6\u63d0\u9192\u5de5\u5177(\u518d\u52a0\u51e0\u4e2a\u5b9a\u65f6\u5668,\u559d\u6c34\u5c0f\u52a9\u624b\u4e0d\u5c31\u6709\u4e86\u4e48\uff01)\n\n\u672c\u4eba\u672a\u7cfb\u7edf\u5b66\u4e60\u8fc7py,\u9760\u4ec5\u6709\u7684cpp\u548cpy\u7684\u4e00\u70b9\u70b9\u7406\u89e3\u5236\u4f5c\u7684,\u5982\u679c\u6709\u4efb\u4f55\u95ee\u9898\u3001\u5efa\u8bae,\u6b22\u8fce[issues](https://github.com/GC-ZF/nonebot_plugin_firexN/issues)\n\n## \u4f9d\u8d56\n\u672c\u63d2\u4ef6\u4f9d\u8d56[\u5b9a\u65f6\u4efb\u52a1](https://github.com/nonebot/plugin-apscheduler),\u9996\u5148\u786e\u4fdd\u81ea\u5df1\u6709`nonebot_plugin_apscheduler`(pip list\u67e5\u770b),\u5b89\u88c5\u547d\u4ee4\n```python\npip install nonebot_plugin_apscheduler\n```\n## \u5b89\u88c5\n```python\npip install nonebot_plugin_firexN\n```\n## \u914d\u7f6e\u9879\n\u5728`bot.py`\u4e2d\u6dfb\u52a0\n```python\nnonebot.load_plugin(\"nonebot_plugin_firexN\")\n```\n\u5728`.evn`\u4e2d\u914d\u7f6e\u53c2\u6570\u8bf4\u660e\n```python\nfire_users = [\"xxx\",\"xxx\"]    # \u5fc5\u586b \u8054\u7cfb\u4ebaQQ\nfire_switch_morning = False   # \u9009\u586b True/False \u9ed8\u8ba4\u5f00\u542f \u65e9\u4e0a\u6d88\u606f\u63a8\u9001\u662f\u5426\u5f00\u542f\nfire_switch_night = False     # \u9009\u586b True/False \u9ed8\u8ba4\u5f00\u542f \u665a\u4e0a\u6d88\u606f\u63a8\u9001\u662f\u5426\u5f00\u542f\nfire_mode = 1                 # \u9009\u586b \u9ed8\u8ba4\u6a21\u5f0f2 \u6a21\u5f0f1\u53d1\u9001\u81ea\u5b9a\u4e49\u53e5\u5b50\uff0c\u6a21\u5f0f2\u968f\u673a\u8c03\u7528\u4e00\u53e5\nfire_sentence_moring = [\"\u53e5\u5b501\",\"\u53e5\u5b502\",\"...\"]    # \u5982\u679c\u662f\u6a21\u5f0f1 \u6b64\u9879\u5fc5\u586b\uff0c\u65e9\u4e0a\u968f\u673a\u53d1\u9001\u8be5\u5b57\u6bb5\u4e2d\u7684\u4e00\u53e5\nfire_sentence_night = [\"\u53e5\u5b501\",\"\u53e5\u5b502\",\"...\"]     # \u5982\u679c\u662f\u6a21\u5f0f1 \u6b64\u9879\u5fc5\u586b\uff0c\u665a\u4e0a\u968f\u673a\u53d1\u9001\u8be5\u5b57\u6bb5\u4e2d\u7684\u4e00\u53e5\nfire_time_moring = \"8 0\"    # \u9009\u586b \u65e9\u4e0a\u53d1\u9001\u65f6\u95f4\u9ed8\u8ba4\u4e3a7:00\nfire_time_night = \"23 0\"    # \u9009\u586b \u665a\u4e0a\u53d1\u9001\u65f6\u95f4\u9ed8\u8ba4\u4e3a22:00                   \n```\n## \u914d\u7f6e\u793a\u4f8b\n\u6a21\u5f0f1\n```python\nfire_users = [\"1310446718\",\"2689438597\"]    # \u5fc5\u586b \u8054\u7cfb\u4ebaQQ\nfire_switch_morning = True    # \u9009\u586b True/False \u9ed8\u8ba4\u5f00\u542f \u65e9\u4e0a\u6d88\u606f\u63a8\u9001\u662f\u5426\u5f00\u542f\nfire_switch_night = False     # \u9009\u586b True/False \u9ed8\u8ba4\u5f00\u542f \u665a\u4e0a\u6d88\u606f\u63a8\u9001\u662f\u5426\u5f00\u542f\nfire_mode = 1                 # \u9009\u586b \u9ed8\u8ba4\u6a21\u5f0f2 \u6a21\u5f0f1\u53d1\u9001\u81ea\u5b9a\u4e49\u53e5\u5b50\uff0c\u6a21\u5f0f2\u968f\u673a\u8c03\u7528\u4e00\u53e5\nfire_sentence_moring = [\"\ud83c\udf1e\u65e9\uff0c\u53c8\u662f\u5143\u6c14\u6ee1\u6ee1\u7684\u4e00\u5929\",\"\u53e5\u5b502\",\"...\"]    # \u5982\u679c\u662f\u6a21\u5f0f1 \u6b64\u9879\u5fc5\u586b\uff0c\u65e9\u4e0a\u968f\u673a\u53d1\u9001\u8be5\u5b57\u6bb5\u4e2d\u7684\u4e00\u53e5\nfire_sentence_night = [\"\ud83c\udf1b\u4eca\u5929\u7eed\u706b\u82b1\u4e86\u4e48\uff0c\u665a\u5b89\u5566\",\"\u53e5\u5b502\",\"...\"]     # \u5982\u679c\u662f\u6a21\u5f0f1 \u6b64\u9879\u5fc5\u586b\uff0c\u665a\u4e0a\u968f\u673a\u53d1\u9001\u8be5\u5b57\u6bb5\u4e2d\u7684\u4e00\u53e5\nfire_time_moring = \"8 0\"    # \u9009\u586b \u65e9\u4e0a\u53d1\u9001\u65f6\u95f4\u9ed8\u8ba4\u4e3a7:00\nfire_time_night = \"23 0\"    # \u9009\u586b \u665a\u4e0a\u53d1\u9001\u65f6\u95f4\u9ed8\u8ba4\u4e3a22:00 \n```\n\u6a21\u5f0f2\n```python\nfire_users = [\"xxx\",\"xxx\"]    # \u5fc5\u586b \u8054\u7cfb\u4ebaQQ\nfire_mode = 2                 # \u5fc5\u586b \u6a21\u5f0f1\u53d1\u9001\u81ea\u5b9a\u4e49\u53e5\u5b50\uff0c\u6a21\u5f0f2\u968f\u673a\u8c03\u7528\u4e00\u53e5  \n```\n## \u8865\u5145\n\u672c\u63d2\u4ef6\u7684\u521d\u8877\u662f\u7eed\u706b\u82b1\u800c\u4e0d\u662f\u7fa4\u804a\u5b9a\u65f6\u63a8\u9001\uff0c\u6240\u4ee5pip\u5b89\u88c5\u5e76\u6ca1\u6709\u7fa4\u804a\u529f\u80fd\uff0c\u5982\u679c\u9700\u8981\u4f60\u53ef\u4ee5\u5c06\u4ed3\u5e93\u4e2d`group_msg.py`\uff0c\u4fdd\u5b58\u5230\u5728`[nb\u6839\u76ee\u5f55]/plugins/group/group_msg.py`\u4e2d\n\u5728`.evn`\u4e2d\u914d\u7f6e\u53c2\u6570\uff0c\u4e4b\u540e\u91cd\u542fbot.py\u3002\n\n```python\nsend_group_id = [\"xxx\",\"xxx\"]    # \u5fc5\u586b \u7fa4\u53f7\nsend_switch_morning = False      # \u9009\u586b True/False \u9ed8\u8ba4\u5f00\u542f \u65e9\u4e0a\u6d88\u606f\u63a8\u9001\u662f\u5426\u5f00\u542f\nsend_switch_night = False        # \u9009\u586b True/False \u9ed8\u8ba4\u5f00\u542f \u665a\u4e0a\u6d88\u606f\u63a8\u9001\u662f\u5426\u5f00\u542f\nsend_mode = 1                 # \u9009\u586b \u9ed8\u8ba4\u6a21\u5f0f2 \u6a21\u5f0f1\u53d1\u9001\u81ea\u5b9a\u4e49\u53e5\u5b50\uff0c\u6a21\u5f0f2\u968f\u673a\u8c03\u7528\u4e00\u53e5\nsend_sentence_moring = [\"\u53e5\u5b501\",\"\u53e5\u5b502\",\"...\"]    # \u5982\u679c\u662f\u6a21\u5f0f1 \u6b64\u9879\u5fc5\u586b\uff0c\u65e9\u4e0a\u968f\u673a\u53d1\u9001\u8be5\u5b57\u6bb5\u4e2d\u7684\u4e00\u53e5\nsend_sentence_night = [\"\u53e5\u5b501\",\"\u53e5\u5b502\",\"...\"]     # \u5982\u679c\u662f\u6a21\u5f0f1 \u6b64\u9879\u5fc5\u586b\uff0c\u665a\u4e0a\u968f\u673a\u53d1\u9001\u8be5\u5b57\u6bb5\u4e2d\u7684\u4e00\u53e5\nsend_time_moring = \"8 0\"    # \u9009\u586b \u65e9\u4e0a\u53d1\u9001\u65f6\u95f4\u9ed8\u8ba4\u4e3a7:00\nsend_time_night = \"23 0\"    # \u9009\u586b \u665a\u4e0a\u53d1\u9001\u65f6\u95f4\u9ed8\u8ba4\u4e3a22:00                   \n```\n\u56e0\u6b64\u529f\u80fd\u4e0d\u5c5e\u4e8e\u672c\u63d2\u4ef6\uff0c\u53e6\u5916\u63a8\u8350\u4e00\u6b3e\u7fa4\u7ba1\u63d2\u4ef6[yzyyz1387/nonebot_plugin_admin](https://github.com/yzyyz1387/nonebot_plugin_admin)\uff0c\u7fa4\u804a\u5b9a\u65f6\u63a8\u9001\u529f\u80fd\u5df2\u5411\u4f5c\u8005\u63d0\u4ea4\u5408\u5e76\u7533\u8bf7\u3002\n## \u66f4\u65b0\u8bb0\u5f55\n2022.8.15\uff0c\u65b0\u589e\u6d88\u606f\u63a8\u9001\u5f00\u5173\uff0c\u66f4\u6539fire_mode\u4e3a\u9009\u586b\uff0c\u9ed8\u8ba4\u6a21\u5f0f2\n\n```python\nfire_switch_morning = True    # \u9009\u586b True/False \u9ed8\u8ba4\u5f00\u542f \u65e9\u4e0a\u6d88\u606f\u63a8\u9001\u662f\u5426\u5f00\u542f\nfire_switch_night = False     # \u9009\u586b True/False \u9ed8\u8ba4\u5f00\u542f \u665a\u4e0a\u6d88\u606f\u63a8\u9001\u662f\u5426\u5f00\u542f\nfire_mode = 1                 # \u9009\u586b \u9ed8\u8ba4\u6a21\u5f0f2 \u6a21\u5f0f1\u53d1\u9001\u81ea\u5b9a\u4e49\u53e5\u5b50\uff0c\u6a21\u5f0f2\u968f\u673a\u8c03\u7528\u4e00\u53e5\n```\n",
    "bugtrack_url": null,
    "license": "",
    "summary": "nonebot plugin firexN",
    "version": "0.1.7",
    "split_keywords": [
        "pip",
        "nonebot2",
        "nonebot",
        "fire",
        "nonebot_plugin"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "md5": "e7254c65990895860d58c5e9d8183288",
                "sha256": "6b08e5b7b3d206cc4aee0cecf0dd8a1797f013c560b3fd816af3b2d40fef390c"
            },
            "downloads": -1,
            "filename": "nonebot_plugin_firexN-0.1.7-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "e7254c65990895860d58c5e9d8183288",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.7.3,<4.0",
            "size": 6292,
            "upload_time": "2022-12-24T13:46:27",
            "upload_time_iso_8601": "2022-12-24T13:46:27.472585Z",
            "url": "https://files.pythonhosted.org/packages/48/38/87eb5fbd4f1cab3cbe1d6813389c97fdff7540c287a41403aca7f0752816/nonebot_plugin_firexN-0.1.7-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "md5": "74e106b6a5010fa55510ddba8b1ba1ba",
                "sha256": "2f3baa67bd60f933d05c5ff11672b7c93b8e6864f01d4ae7fd79f811b258f41e"
            },
            "downloads": -1,
            "filename": "nonebot_plugin_firexN-0.1.7.tar.gz",
            "has_sig": false,
            "md5_digest": "74e106b6a5010fa55510ddba8b1ba1ba",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.7.3,<4.0",
            "size": 6111,
            "upload_time": "2022-12-24T13:46:29",
            "upload_time_iso_8601": "2022-12-24T13:46:29.311103Z",
            "url": "https://files.pythonhosted.org/packages/2a/56/b348a78790a44709bde93f0b668c545e717b51c7af63b59263b34ee43476/nonebot_plugin_firexN-0.1.7.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2022-12-24 13:46:29",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "github_user": "GC-ZF",
    "github_project": "nonebot_plugin_firexN",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "lcname": "nonebot-plugin-firexn"
}
        
Elapsed time: 0.02241s