Add support for creating, editing, closing, reopening, and deleting Telegram forum topics via the message tool and CLI. New actions: - thread-create: Create a new forum topic - thread-edit: Edit topic name/icon - thread-close: Close a topic - thread-reopen: Reopen a closed topic - thread-delete: Delete a topic and all messages CLI commands: - clawdbot message thread create --channel telegram --target <chat_id> --thread-name <name> - clawdbot message thread edit --channel telegram --target <chat_id> --thread-id <id> --thread-name <name> - clawdbot message thread close --channel telegram --target <chat_id> --thread-id <id> - clawdbot message thread reopen --channel telegram --target <chat_id> --thread-id <id> - clawdbot message thread delete --channel telegram --target <chat_id> --thread-id <id> Configuration: Enable with channels.telegram.actions.forumTopics: true The bot must be an administrator with can_manage_topics permission. Closes #XXXX
58 lines
993 B
TypeScript
58 lines
993 B
TypeScript
export const CHANNEL_MESSAGE_ACTION_NAMES = [
|
|
"send",
|
|
"broadcast",
|
|
"poll",
|
|
"react",
|
|
"reactions",
|
|
"read",
|
|
"edit",
|
|
"unsend",
|
|
"reply",
|
|
"sendWithEffect",
|
|
"renameGroup",
|
|
"setGroupIcon",
|
|
"addParticipant",
|
|
"removeParticipant",
|
|
"leaveGroup",
|
|
"sendAttachment",
|
|
"delete",
|
|
"pin",
|
|
"unpin",
|
|
"list-pins",
|
|
"permissions",
|
|
"thread-create",
|
|
"thread-edit",
|
|
"thread-close",
|
|
"thread-reopen",
|
|
"thread-delete",
|
|
"thread-list",
|
|
"thread-reply",
|
|
"search",
|
|
"sticker",
|
|
"sticker-search",
|
|
"member-info",
|
|
"role-info",
|
|
"emoji-list",
|
|
"emoji-upload",
|
|
"sticker-upload",
|
|
"role-add",
|
|
"role-remove",
|
|
"channel-info",
|
|
"channel-list",
|
|
"channel-create",
|
|
"channel-edit",
|
|
"channel-delete",
|
|
"channel-move",
|
|
"category-create",
|
|
"category-edit",
|
|
"category-delete",
|
|
"voice-status",
|
|
"event-list",
|
|
"event-create",
|
|
"timeout",
|
|
"kick",
|
|
"ban",
|
|
] as const;
|
|
|
|
export type ChannelMessageActionName = (typeof CHANNEL_MESSAGE_ACTION_NAMES)[number];
|