Skip to main content

This plugin can remind you not to forget something

Project description

NoneBotPluginLogo

NoneBotPluginText

nonebot-plugin-reminder

✨ NoneBot 插件简单描述 ✨

license pypi python

这是一个 nonebot2 插件库, 主要用来提醒大家别忘记什么事情,可以看成定时提醒插件, 依赖于nonebot-plugin-send-anything-anywhere,理论上支持大部分平台,但目前只测试过onebot.v11。

指令

定时 [date]→ 设置定时提醒,date为时间,格式为HH:MM,如 23:59, 不设置默认为17点 定时请求[date]→ 设置定时请求某个URL,返回其内容,目前只能请求图片,date为时间,格式为HH:MM,如 23:59, 不设置默认为17点 定时列表 → 列出所有定时提醒 清空|清除定时 → 清空所有定时提醒 开启|关闭|查看|删除|执行定时提醒 [id] → 开启|关闭|查看|删除|执行指定id的定时提醒 修改|更新定时 [id] → 修改指定id的定时提醒

  • 定时提醒: 在默认时间定时提醒

    • 定时提醒 [时间]: 在指定时间定时提醒

      时间格式为 HH:MM , 例如 17:00

    之后 Bot 会询问提醒的时间间隔

    1.每天 回复1

    2.某天回复具体日期,格式为yyyy-mm-dd,如2023-01-03

    3.工作日 回复3

    回复数字即可

    再之后 Bot 会询问需要提醒的内容 默认为 打卡!!, 回复0即使默认内容

  • 定时请求:与上面用法类似

  • 定时列表 [page]: 列出设置的所有定时任务

  • 清空/清除定时 : 清除的所有定时任务

  • 查看/删除/开启/关闭/执行定时 [id] : 查看/删除/开启/关闭指定id的定时任务

  • 定时请求: 定时请求数据,目前支持图片

  • 定时jobs [page]: 列出底层任务情况(debug使用)

  • 备份定时/定时备份: 备份所有定时任务

  • 备份列表: 列出备份的文件名,用于还原时候指定文件

  • 备份恢复|恢复备份|还原备份|备份还原|使用备份|备份使用 [备份文件名]: 使用指定的文件还原定时任务

  • 查看备份 [备份文件名]: 以友好的列表的形式展示备份的内容

配置项

配置方式:直接在 NoneBot 全局配置文件中添加以下配置项即可。

NoneBot 配置相关教程详见 配置 | NoneBot

如果需要持久化定时任务(即nonebot2重启后任务还在),需要配置 nonebot-plugin-apscheduler 插件。

.env中加上 apscheduler_config={ "apscheduler.timezone": "Asia/Shanghai", "apscheduler.jobstores.default":{"type":"sqlalchemy","url":"sqlite:///jobs.sqlite"} }

进入到nonebot的安装目录,执行source .venv/bin/activate,进入虚拟环境

执行pip install sqlalchemy安装sqlalchemy。(不知道为什么nonebot-plugin-apscheduler 插件没有包含这个库) 重启nonebot2,即可持久化定时任务。

现在不需要配置nonebot-plugin-apscheduler插件的持久化了,插件已经实现了。

reminder_default_hour

  • 类型: int
  • 默认: 17
REMINDER_DEFAULT_HOUR=17

reminder_default_minute

  • 类型: int
  • 默认: 0
REMINDER_DEFAULT_MINUTE=0

reminder_id_len

  • 类型: int
  • 说明:底层任务id长度
  • 默认: 5
REMINDER_ID_LEN=5

reminder_id_prefix

  • 类型: str
  • 说明:底层任务id的前缀
  • 默认: 0
REMINDER_ID_PREFIX=reminder

reminder_page_size

  • 类型: str
  • 说明:列出任务时,每次列出的条目数
  • 默认: 0
REMINDER_PAGE_SIZE=5

reminder_bk_size

  • 类型: str
  • 说明:最多有几个备份
  • 默认: 0
REMINDER_BK__SIZE=5

依赖

致谢

代码基于 nonebot-plugin-everyday-en,感谢原作者的开源精神!

其他

修改定时的时候,私聊对象和群组只能二选一。

开源许可

  • 本插件使用 MIT 许可证开源

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_reminder-0.4.3.tar.gz (12.7 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_reminder-0.4.3-py3-none-any.whl (13.1 kB view details)

Uploaded Python 3

File details

Details for the file nonebot_plugin_reminder-0.4.3.tar.gz.

File metadata

  • Download URL: nonebot_plugin_reminder-0.4.3.tar.gz
  • Upload date:
  • Size: 12.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for nonebot_plugin_reminder-0.4.3.tar.gz
Algorithm Hash digest
SHA256 454fd89d434f1342913be14c29b2b09ea16ea260ce909871c1b90d6acb846a6b
MD5 384f825174fe5e7d4f010eec322ba600
BLAKE2b-256 477472b2710518c10adb17f0cfd233edf54e4598859191b4ea35d103711690e3

See more details on using hashes here.

File details

Details for the file nonebot_plugin_reminder-0.4.3-py3-none-any.whl.

File metadata

File hashes

Hashes for nonebot_plugin_reminder-0.4.3-py3-none-any.whl
Algorithm Hash digest
SHA256 1892adcc7fd7128046ac2fa7bd655cbbf2e2921e5a5f51aa43193d0a4b6ca21f
MD5 d5898a2a3f23c6300e7374b43c440898
BLAKE2b-256 1a0f252a42b49dc4f17abac1c3064e99ccedc0f8778a5d869bd2428daba1fe46

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