Table of Contents

Class CommandOptions

Namespace
Signal.Application.Configuration
Assembly
Signal.Application.dll

Command system settings.

public sealed class CommandOptions
Inheritance
CommandOptions
Inherited Members

Fields

DefaultPrefix

The prefix used when Prefixes is empty.

public const string DefaultPrefix = "/"

Field Value

string

Properties

Admins

Phone numbers or UUIDs allowed to run [RequireAdmin] commands.

public List<string> Admins { get; set; }

Property Value

List<string>

CaseSensitive

Whether command names and aliases are matched case-sensitively. Default false.

public bool CaseSensitive { get; set; }

Property Value

bool

DisabledCommandMessage

Reply when a command is disabled in the conversation (ConversationSettings.DisabledCommands); empty for no reply.

public string DisabledCommandMessage { get; set; }

Property Value

string

EffectivePrefixes

Prefixes, or DefaultPrefix when none are configured.

public IReadOnlyList<string> EffectivePrefixes { get; }

Property Value

IReadOnlyList<string>

EnableHelp

Register the built-in help command. Default true.

public bool EnableHelp { get; set; }

Property Value

bool

ErrorMessage

Reply when a command throws an exception (details are only logged).

public string ErrorMessage { get; set; }

Property Value

string

HelpPageSize

Commands per /help page; /help 2 shows the second page. 0 disables paging. Default 20.

public int HelpPageSize { get; set; }

Property Value

int

Prefixes

Command prefixes, e.g. ["/", "!"]. The longest matching prefix wins. Defaults to /.

public List<string> Prefixes { get; set; }

Property Value

List<string>

QuoteReplies

Quote the triggering message in command replies. Default false.

public bool QuoteReplies { get; set; }

Property Value

bool

RespondToUnknown

Reply when a prefixed message does not match any command. Default true.

public bool RespondToUnknown { get; set; }

Property Value

bool

Roles

Role members for [RequireRole]: role name → phone numbers or UUIDs, e.g. { "moderator": ["+4915112345678"] }. Role names are case-insensitive.

public Dictionary<string, List<string>> Roles { get; set; }

Property Value

Dictionary<string, List<string>>

SuggestSimilarCommands

Append "Did you mean /help?" to unknown-command replies when a visible command name is one or two typos away. Default true.

public bool SuggestSimilarCommands { get; set; }

Property Value

bool

UnknownCommandMessage

Reply for unknown commands. Format placeholders: {0} = command name, {1} = used prefix.

public string UnknownCommandMessage { get; set; }

Property Value

string