Skip to main content

nonebot plugin firexN

Project description

nonebot

🔥 nonebot_plugin_firexN

✨ 定时发送QQ消息插件 ✨

license pypi python


插件描述

一款基于Nonebot2的插件

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

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

本人未系统学习过py,靠仅有的cpp和py的一点点理解制作的,如果有任何问题、建议,欢迎issues

依赖

本插件依赖定时任务,首先确保自己有nonebot_plugin_apscheduler(pip list查看),安装命令

pip install nonebot_plugin_apscheduler

安装

pip install nonebot_plugin_firexN

配置项

bot.py中添加

nonebot.load_plugin("nonebot_plugin_firexN")

.evn中配置参数说明

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

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

fire_users = ["xxx","xxx"]    # 必填 联系人QQ
fire_mode = 2                 # 必填 模式1发送自定义句子,模式2随机调用一句  

补充

本插件的初衷是续火花而不是群聊定时推送,所以pip安装并没有群聊功能,如果需要你可以将仓库中group_msg.py,保存到在[nb根目录]/plugins/group/group_msg.py中 在.evn中配置参数,之后重启bot.py。

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,群聊定时推送功能已向作者提交合并申请。

更新记录

2022.8.15,新增消息推送开关,更改fire_mode为选填,默认模式2

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

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

nonebot_plugin_firexN-0.1.7.tar.gz (6.1 kB view hashes)

Uploaded Source

Built Distribution

nonebot_plugin_firexN-0.1.7-py3-none-any.whl (6.3 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page