This commit is contained in:
@ -1,10 +1,10 @@
|
||||
## 指令介绍
|
||||
**`ntfy`** - 配置使用 [ntfy](https://ntfy.sh/) 来更好地为你通知此方 BOT 的代办事项。
|
||||
**`ntfy`** - 配置使用 [ntfy](https://ntfy.sh/) 来更好地为你通知此方 BOT 的待办事项。
|
||||
|
||||
## 指令示例
|
||||
|
||||
- **`ntfy 创建`**
|
||||
创建一个随机的 ntfy 订阅主题来提醒代办。此方 Bot 将会给你使用指引。你可以前往 [https://ntfy.sh/](https://ntfy.sh/) 官网下载 ntfy APP,或者使用网页版 ntfy。
|
||||
创建一个随机的 ntfy 订阅主题来提醒待办。此方 Bot 将会给你使用指引。你可以前往 [https://ntfy.sh/](https://ntfy.sh/) 官网下载 ntfy APP,或者使用网页版 ntfy。
|
||||
|
||||
- **`ntfy 创建 kagami-notice`**
|
||||
创建一个名称包含 `kagami-notice` 的 ntfy 订阅主题。
|
||||
|
||||
@ -95,7 +95,7 @@ async def _(msg: UniMsg, mEvt: Event, target: DepLongTaskTarget):
|
||||
await target.send_message(
|
||||
UniMessage().text(f"了解啦!将会在 {target_time.strftime(FMT_STRING)} 提醒你哦~")
|
||||
)
|
||||
logger.info(f"创建了一条于 {target_time} 的代办提醒")
|
||||
logger.info(f"创建了一条于 {target_time} 的待办提醒")
|
||||
|
||||
|
||||
driver = nonebot.get_driver()
|
||||
@ -105,9 +105,9 @@ driver = nonebot.get_driver()
|
||||
async def _(task: LongTask):
|
||||
message = task.data["message"]
|
||||
await task.target.send_message(
|
||||
UniMessage().text(f"代办提醒:{message}")
|
||||
UniMessage().text(f"待办提醒:{message}")
|
||||
)
|
||||
notice_bytes = await NoticeUI.render_notice("代办提醒", message)
|
||||
notice_bytes = await NoticeUI.render_notice("待办提醒", message)
|
||||
await task.target.send_message(
|
||||
UniMessage().image(raw=notice_bytes),
|
||||
at=False
|
||||
@ -123,7 +123,7 @@ USER_CHECKOUT_TASK_CACHE: dict[str, dict[str, str]] = {}
|
||||
|
||||
|
||||
cmd_check_notify_list = on_alconna(Alconna(
|
||||
"re:(?:我有哪些|查询)(?:提醒|代办)",
|
||||
"re:(?:我有哪些|查询)(?:提醒|待办)",
|
||||
Args["page", int, 1]
|
||||
))
|
||||
|
||||
@ -141,7 +141,7 @@ async def _(page: int, target: DepLongTaskTarget):
|
||||
await target.send_message(UniMessage().text(f"最多也就 {pages} 页啦!"))
|
||||
tasks = tasks[(page - 1) * PAGE_SIZE: page * PAGE_SIZE]
|
||||
|
||||
message = "你可以输入「删除提醒 序号」来删除一个提醒\n====== 代办清单 ======\n\n"
|
||||
message = "你可以输入「删除提醒 序号」来删除一个提醒\n====== 待办清单 ======\n\n"
|
||||
|
||||
to_cache = {}
|
||||
if len(tasks) == 0:
|
||||
@ -158,7 +158,7 @@ async def _(page: int, target: DepLongTaskTarget):
|
||||
|
||||
|
||||
cmd_remove_task = on_alconna(Alconna(
|
||||
"re:删除(?:提醒|代办)",
|
||||
"re:删除(?:提醒|待办)",
|
||||
Args["checker", str],
|
||||
))
|
||||
|
||||
@ -235,7 +235,7 @@ async def _(target: DepLongTaskTarget, notify_id: str = ""):
|
||||
))
|
||||
|
||||
await send_notify_to_ntfy_instance(
|
||||
"如果你看到这条消息,说明你已经成功订阅主题!此方 BOT 将会在这里提醒你你的代办!",
|
||||
"如果你看到这条消息,说明你已经成功订阅主题!此方 BOT 将会在这里提醒你你的待办!",
|
||||
channel_name,
|
||||
)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user