Skip to main content

nonebot-plugin-scheduled-message

定时消息插件:超级用户在私聊中管理定时任务,机器人按固定间隔向指定群聊发送自定义消息。

功能

  • 两步交互式添加定时消息:先给群号和间隔,再发送消息内容(支持多行、表情、图片等 CQ 码内容)
  • 任务持久化到本地 JSON,重启后自动恢复
  • 支持查看 / 删除 / 暂停 / 恢复任务
  • 仅超级用户私聊可用,防止群员滥用

安装

使用 nb-cli 安装

nb plugin install nonebot-plugin-scheduled-message

使用 pip 安装

pip install nonebot-plugin-scheduled-message

使用 poetry 安装

poetry add nonebot-plugin-scheduled-message

配置

在 NoneBot 项目的 .env 文件中添加(可选):

# 允许设置的最小定时间隔(分钟),默认 5
SCHEDULED_MESSAGE_MIN_INTERVAL=5

同时确保 .env 中配置了 SUPERUSERS,例如:

SUPERUSERS=["123456789"]

使用方法

私聊(仅超级用户,可管理任意群)

指令 说明
/定时发消息 <群号> <间隔分钟> 添加定时任务,随后发送的消息即为内容
/定时消息列表 查看所有定时任务
/删除定时消息 删除任务
/暂停定时消息 暂停任务
/恢复定时消息 恢复任务

群聊(群主/管理员/超级用户,仅管理本群)

指令 说明
/定时发消息 <间隔分钟> 添加本群定时任务,随后发送的消息即为内容
/定时发消息 <群号> <间隔分钟> (仅超级用户)在群内为指定群添加定时任务
/定时消息列表 查看本群定时任务
/删除定时消息 删除本群任务
/暂停定时消息 暂停本群任务
/恢复定时消息 恢复本群任务

示例

你:/定时发消息 123456 30
机器人:请发送要定时发送的消息内容(支持多行,回复"取消"可取消)
你:大家好,这是每 30 分钟一次的定时消息~
机器人:已添加定时任务 #1:群 123456,每 30 分钟发送一次

许可证

MIT

Metadata

Release files for nonebot-plugin-scheduled-message 0.1.0

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-scheduled-message 0.1.0
File Size Uploaded Provenance Actions
nonebot_plugin_scheduled_message-0.1.0.tar.gz 6.7 kB Without provenance Details for nonebot_plugin_scheduled_message-0.1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for nonebot-plugin-scheduled-message 0.1.0
File Interpreter ABI Platform Actions
nonebot_plugin_scheduled_message-0.1.0-py3-none-any.whl Python 3 none any Details for nonebot_plugin_scheduled_message-0.1.0-py3-none-any.whl

Total release size: 15.0 kB

Release files / nonebot_plugin_scheduled_message-0.1.0.tar.gz

Download URL nonebot_plugin_scheduled_message-0.1.0.tar.gz
Size 6.7 kB
Tags Source
SHA-256 checksum
How to use checksums
17b1f12e15cca402aaba206671f23c66735d30027f7e133658c0548298fa3557
BLAKE2b-256 checksum
How to use checksums
547fa5f18c99ecaa6191cb08224864660ae7c4380a7326d8f600658677488cc6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.9

Release files / nonebot_plugin_scheduled_message-0.1.0-py3-none-any.whl

Download URL nonebot_plugin_scheduled_message-0.1.0-py3-none-any.whl
Size 8.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
e9ff9c9db32b8119e39bf87fe583cf11cbd3e687898444182219c770e4919dbc
BLAKE2b-256 checksum
How to use checksums
3a5c62679a1ee393316302e3e53d63a4e66e6e45538f8b19e35a00efc437a512
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.9

Security for nonebot-plugin-scheduled-message 0.1.0

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.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files No provenance

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