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 details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

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

Uploaded Python 3

File details

Details for the file nonebot_plugin_firexN-0.1.7.tar.gz.

File metadata

  • Download URL: nonebot_plugin_firexN-0.1.7.tar.gz
  • Upload date:
  • Size: 6.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.9.10

File hashes

Hashes for nonebot_plugin_firexN-0.1.7.tar.gz
Algorithm Hash digest
SHA256 2f3baa67bd60f933d05c5ff11672b7c93b8e6864f01d4ae7fd79f811b258f41e
MD5 74e106b6a5010fa55510ddba8b1ba1ba
BLAKE2b-256 2a56b348a78790a44709bde93f0b668c545e717b51c7af63b59263b34ee43476

See more details on using hashes here.

File details

Details for the file nonebot_plugin_firexN-0.1.7-py3-none-any.whl.

File metadata

File hashes

Hashes for nonebot_plugin_firexN-0.1.7-py3-none-any.whl
Algorithm Hash digest
SHA256 6b08e5b7b3d206cc4aee0cecf0dd8a1797f013c560b3fd816af3b2d40fef390c
MD5 e7254c65990895860d58c5e9d8183288
BLAKE2b-256 483887eb5fbd4f1cab3cbe1d6813389c97fdff7540c287a41403aca7f0752816

See more details on using hashes here.

Supported by

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