Skip to main content

NoneBot 闹钟插件使用指南

📖 简介

本插件为QQ机器人提供智能闹钟管理功能,适用于群聊与私聊场景,支持图片发送。用户可以通过简单指令设置重复/单次提醒,并管理个人提醒事项。

✨ 核心功能

  • 多场景适配 - 群聊@提醒/私聊消息提醒
  • 智能识别 - 支持自然语言输入(示例:"每天21点提醒喝水")
  • 多样化时间格式
    • 精确时间 21:00
    • 日期时间 3.7 12:30 (3月7日12:30)
    • 相对时间 +3h (3小时后)
    • 高级cron表达式
  • 可视化管理
    • 查看提醒列表
    • 启用/禁用提醒
    • 删除指定提醒

📦 安装流程

pip

  1. 安装插件到环境
pip install nonebot-plugin-clock
  1. 添加到 pyproject.toml
plugins = ["nonebot_plugin_clock"]

使用仓库

  1. 安装基础依赖
pip install nonebot2 nonebot-adapter-onebot
pip install nonebot-plugin-apscheduler
  1. 项目clone到NoneBot插件目录
cd src
git@github.com:Zeta-qixi/nonebot-plugin-clock.git

🎲 .env.dev配置

.env.dev

group_at_me = True
use_llm = False
  • group_at_me
    [bool] 群聊是否@发起者,默认True
  • use_llm
    [bool] 是否使用llm,默认False (无效设置,该版本不使用LLM)

🎮 使用手册

⏰ 设置提醒

方式一:自然语言

直接发送: 每天上午8点叫我起床 每周五16:00提醒我提交周报

该方法默认使用正则表达式,对于复杂指令无法识别;llm测试复杂指令检查成功率>95%, 至少要使用32b模型

方式二:快捷命令

添加闹钟 添加提醒 添加临时闹钟 添加临时提醒 + TIME

/添加闹钟 21:00
↓ 机器人响应
请设置闹钟内容(可以发送图片)
> 记得喝水哦~
↓ 结果
添加成功~

使用临时字段为一次性设置

时间参数格式:

  • 基准时间 12:00
  • 日期时间 12.25 9:30 (12月25日9:30)
  • 倒计时 +30m (30分钟后)
  • cron表达式 * * * * * (5位)

📋 查看提醒

查看闹钟 提醒事项 闹钟 ⏰

返回格式:

1. [每日] 21:00 记得喝水哦~ 
2. [单次] 2023-12-25 09:30 圣诞聚会 (仅一次)

🗑 删除提醒

删除闹钟 删除提醒

/删除闹钟 2
↓ 结果
操作完成

⚙ 管理提醒状态

功能 命令示例 说明
启用提醒 /打开闹钟 2 重启暂停的提醒
禁用提醒 /关闭闹钟 2 保留数据暂停提醒

💡 使用示例

场景一:健康提醒

用户:/添加闹钟 +1h
机器人:请设置闹钟内容
用户:该起来活动啦!
机器人:添加成功~

场景二:会议提醒

用户:每周三14:30提醒技术部开会
机器人:明白啦,到时会准时提醒大家

Metadata

Release files for nonebot-plugin-clock 1.1.9.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for nonebot-plugin-clock 1.1.9.1
File Size Uploaded Provenance
nonebot_plugin_clock-1.1.9.1.tar.gz 10.2 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for nonebot-plugin-clock 1.1.9.1
File Interpreter ABI Platform
nonebot_plugin_clock-1.1.9.1-py3-none-any.whl Python 3 none any Details

Total release size: 26.1 kB

Release files / nonebot_plugin_clock-1.1.9.1.tar.gz

Download URL nonebot_plugin_clock-1.1.9.1.tar.gz
Size 10.2 kB
Tags Source
SHA-256 checksum
How to use checksums
0855cfc19d1e208f69ca8e8fde98d5cd53454a850946c51c2f7d1942542468c6
BLAKE2b-256 checksum
How to use checksums
6dda114f9f7a92bf7f53f6bf8d67d1c2cf35775a0ea6bf577647ed76c7a65ec5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.5

Release files / nonebot_plugin_clock-1.1.9.1-py3-none-any.whl

Download URL nonebot_plugin_clock-1.1.9.1-py3-none-any.whl
Size 15.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
461fb5b32580d5fc98a6e97ba3707fba642d2a4af2169009bdf2d5cbe3d78084
BLAKE2b-256 checksum
How to use checksums
d4b60f3fcd30d409fdecc170f4a9e83002abe3809650ac57af466c3b461f5b63
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.5

Security for nonebot-plugin-clock 1.1.9.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page