update command help

This commit is contained in:
Laura Hausmann 2019-12-13 18:34:56 +01:00
parent 493aa46ee4
commit 3d6d6f62d9
Signed by: zotan
GPG key ID: 5EC1D38FFC321311

View file

@ -75,7 +75,7 @@ namespace telegram
public class OpenCommand : Command
{
public OpenCommand() : base("o", "^O", "opens a chat", "<query> ", -1)
public OpenCommand() : base("o", "^O", "opens a chat. queries chat list", "<query>", -1)
{
}
@ -169,7 +169,7 @@ namespace telegram
public class NewSecretChatCommand : Command
{
public NewSecretChatCommand() : base("ns", "", "creates a new secret chat", "", -1)
public NewSecretChatCommand() : base("ns", "", "creates a new secret chat. queries contacts", "<query>", -1)
{
}
@ -188,7 +188,7 @@ namespace telegram
public class OpenSecretCommand : Command
{
public OpenSecretCommand() : base("os", "", "opens a secret chat", "", 1)
public OpenSecretCommand() : base("os", "", "opens a secret chat", "<chat_id>", 1)
{
}
@ -316,7 +316,7 @@ namespace telegram
public class HistoryCommand : Command
{
public HistoryCommand() : base("h", "", "shows chat history", "[1-50; default = 5] ", -1)
public HistoryCommand() : base("h", "", "shows chat history. default limit is 5", "[1-50]", -1)
{
}
@ -358,7 +358,7 @@ namespace telegram
public class UnreadsCommand : Command
{
public UnreadsCommand() : base("u", "^U", "displays unread chat", "[all] ", -1)
public UnreadsCommand() : base("u", "^U", "displays unread chat", "[all]", -1)
{
}
@ -417,14 +417,14 @@ namespace telegram
messageQueue.Add($"{Ansi.Yellow}[tgcli] Listing {CommandManager.Commands.Count} commands:");
CommandManager.Commands.ForEach(command =>
{
if (string.IsNullOrWhiteSpace(command.Shortcut))
{
messageQueue.Add($"{Ansi.Yellow}/{command.Trigger} {command.Syntax}: {command.Description}");
return;
}
var commandText = $"/{command.Trigger}";
if (!string.IsNullOrWhiteSpace(command.Syntax))
commandText += $" {command.Syntax}";
commandText += $": {command.Description}";
if (!string.IsNullOrWhiteSpace(command.Shortcut))
commandText += $" ({command.Shortcut})";
messageQueue.Add(
$"{Ansi.Yellow}/{command.Trigger} {command.Syntax}[{command.Shortcut}]: {command.Description}");
messageQueue.Add($"{Ansi.Yellow}{commandText}");
});
}
}
@ -444,7 +444,7 @@ namespace telegram
public class EditCommand : Command
{
public EditCommand() : base("e", "", "edits last message", "[message; if empty adds last message to input]", -1)
public EditCommand() : base("e", "", "edits last message. param empty adds last message to inputline", "[message]", -1)
{
}