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 插件库, 主要用来提醒大家别忘记什么事情,可以看成定时提醒插件。

指令

定时提醒 [date]→ 设置定时提醒,date为时间,格式为HH:MM,如 23:59, 不设置默认为17点 定时提醒 列表 → 列出所有定时提醒 定时提醒 清空 → 清空所有定时提醒 删除/开启/关闭定时提醒 [id] → 删除指定id的定时提醒

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

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

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

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

    1.每天 回复1

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

    3.工作日 回复3

    回复数字即可

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

  • 定时提醒 列表: 列出设置的所有定时任务

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

  • 删除/开启/关闭定时提醒 [id] : 删除/开启/关闭指定id的定时任务

配置项

配置方式:直接在 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,即可持久化定时任务。

everyday_post_hour

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

everyday_post_minute

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

依赖

致谢

代码基于 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.1.1.post2.tar.gz (6.6 kB view hashes)

Uploaded Source

Built Distribution

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