mirror of
https://github.com/TheFunny/TelegramTwitterMediaBot.git
synced 2026-09-23 23:32:05 +00:00
feat: add command descriptions and document commands in README
All bot commands now carry English descriptions, shown in the Telegram command menu and by /help (which prints Command::descriptions()). The README command table explains each command's arguments and behavior: forward channel (@channel or ID), edit-before-forward flow, template [] placeholder semantics and per-site caption format placeholders.
This commit is contained in:
@@ -34,23 +34,23 @@ pub static CONFIG: LazyLock<Config> = LazyLock::new(Config::load);
|
||||
static URL_TASKS: LazyLock<Semaphore> = LazyLock::new(|| Semaphore::new(8));
|
||||
|
||||
#[derive(BotCommands, Clone)]
|
||||
#[command(rename_rule = "snake_case", description = "")]
|
||||
#[command(rename_rule = "snake_case", description = "Turn X/Pixiv/Bluesky links into media messages")]
|
||||
enum Command {
|
||||
#[command(description = "")]
|
||||
#[command(description = "Get started")]
|
||||
Start,
|
||||
#[command(description = "")]
|
||||
#[command(description = "Show command help")]
|
||||
Help,
|
||||
#[command(description = "", parse_with = "split")]
|
||||
#[command(description = "Set forward channel (@channel or ID)", parse_with = "split")]
|
||||
SetForwardChannel(String),
|
||||
#[command(description = "")]
|
||||
#[command(description = "Remove forward channel")]
|
||||
RemoveForwardChannel,
|
||||
#[command(description = "")]
|
||||
#[command(description = "Toggle edit-before-forward")]
|
||||
EditBeforeForward,
|
||||
#[command(description = "", parse_with = "split")]
|
||||
#[command(description = "Reply with [] to save as template", parse_with = "split")]
|
||||
SetTemplate(String),
|
||||
#[command(description = "")]
|
||||
#[command(description = "Show chat state (debug)")]
|
||||
BotDict,
|
||||
#[command(description = "", parse_with = "split")]
|
||||
#[command(description = "Set site caption format", parse_with = "split")]
|
||||
SetFormat(String),
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user