Files
cg_api_secure-webshare/docs/COMMANDS.md

4.7 KiB

Bot Commands

This document lists all commands and callback actions implemented in crates/cgcx-bot/src/main.rs.


Admin Commands (Group-only)

All admin commands require the caller to be an administrator or owner of the group.

Command Args Description
/reload none Reload moderation lists from disk.
/blacklist_uid <ID> Blacklist a user by Telegram ID globally and set their role to banned.
/whitelist_uid <ID> Remove a user from the global blacklist and restore their role to user.
/help none Show the admin help message listing all admin commands.
/get_id none Get the current group chat ID.
/get_id <@username> Search administrators in this chat by username.
/get_id <displayname> Search members in this chat by display name.
/create_submit_forward <dest_chat_id> <review_group_id> [forward_message] Create a submission forward link. Bot must be admin in both destination and review groups.
/show_c_forward [page] List active forward links for this chat with pagination.
/add_blacklist <user_id> Blacklist a user in all active forwards for this source chat.
/rm_blacklist <user_id> Remove a user from the blacklist in all active forwards for this source chat.
/sban @user <dur> <unit> [reason] Ban a user for a specified duration.
/smute @user <dur> <unit> [reason] Mute a user for a specified duration.
/mute @user [reason] Mute a user indefinitely.
/pban @user [reason] Permanently ban a user.
/kick @user [reason] Kick a user from the group.
/rmute @user Revoke an active mute and restore the user's chat permissions.
/rban @user Revoke an active ban and unban the user.

User Commands (DM)

Command Args Description
/start none Start the bot. Displays terms if not accepted, otherwise shows the main menu.
/start submitfwdid<code> Deep-link entry into Submission Mode for a forward.
/cancel none Cancel the current operation and return to the main menu.

Callback Actions

Callbacks use the format v1:<namespace>:<action>[:<id>].

Terms

Callback Description
v1:terms:accept Accept the terms of service.
v1:terms:reject Reject the terms of service.

Main Menu

Callback Description
v1:menu:upload_media Enter media upload staging.
v1:menu:upload_doc Enter document upload staging.
v1:menu:upload_text Enter text upload staging.
v1:menu:prev_uploads View previous uploads.
v1:menu:report Enter content reporting flow.
v1:menu:main Return to main menu.

Staging

Callback Description
v1:stage:confirm Confirm staged items and proceed to upload options.
v1:stage:cancel Cancel the upload and return to main menu.

Upload Options

Callback Description
v1:opt:toggle_destroy Cycle auto-destroy max views (Off → 1 → 3 → 5 → 10 → 50 → Off).
v1:opt:toggle_download Toggle the "allow download" flag.
v1:opt:set_password Prompt user to send a password (or /skip).
v1:opt:confirm_final Confirm options and finalize the upload.
v1:opt:back Go back to upload staging.

Previous Uploads

Callback Description
v1:prev:page:{page} Navigate to a specific page of previous uploads.

Submission Mode

Callback Description
v1:submit:continue Continue into submission upload flow.
v1:submit:exit Exit submission mode and return to main menu.

Admin / Moderation

Callback Description
v1:admin:delcontent:{cxid} Delete a content item by its CXID.
v1:admin:delblk:{report_id} Delete reported content and blacklist the uploader.
v1:admin:del:{report_id} Delete reported content only.
v1:admin:blk:{report_id} Blacklist the uploader of reported content only.
v1:admin:ign:{report_id} Ignore/dismiss the report.

Forward Submissions

Callback Description
v1:fwd:approve:{submission_id} Approve a forward submission and post it to the destination chat.
v1:fwd:ignore:{submission_id} Reject a forward submission.
v1:fwd:blk:{submission_id} Blacklist the submitting user from the forward.
v1:fwd:revoke:{forward_id} Revoke a forward link.
v1:fwd:page:{page} Navigate forward link list pages.