|
# retoor <retoor@molodetz.nl>
|
|
|
|
from __future__ import annotations
|
|
|
|
from .spec import Action, Param
|
|
|
|
TELEGRAM_ACTIONS: tuple[Action, ...] = (
|
|
Action(
|
|
name="telegram_send",
|
|
method="LOCAL",
|
|
path="",
|
|
summary="Send a message to the user's connected Telegram chat",
|
|
description=(
|
|
"Delivers a markdown message to the signed-in user's paired Telegram account. Use this "
|
|
"to push notifications, reminders, or results to the user on Telegram, including from a "
|
|
"scheduled task. Requires the user to have paired Telegram from their profile and the "
|
|
"Telegram bot service to be running. Markdown is rendered to Telegram formatting and "
|
|
"long messages are split automatically."
|
|
),
|
|
handler="telegram",
|
|
requires_auth=True,
|
|
params=(
|
|
Param(
|
|
name="text",
|
|
location="body",
|
|
description="The markdown message to deliver to the user's Telegram chat.",
|
|
required=True,
|
|
),
|
|
),
|
|
),
|
|
)
|