3 using System.Threading.Tasks;
13 public string Name {
get;
set; }
16 public string HelpText {
get;
set; }
19 public bool AdminOnly {
get;
set; }
32 if (this.handler != null)
33 throw new InvalidOperationException(
"SetHandler() already called!");
34 this.handler = handler ??
throw new ArgumentNullException(nameof(handler));
38 public Task<string>
Invoke(
string arguments,
ChatUser user, CancellationToken cancellationToken)
41 throw new InvalidOperationException(
"SetHandler() has not been called!");
void SetHandler(ICustomCommandHandler handler)
Set a new handler
Use server authentication
Task< string > HandleChatCommand(string commandName, string arguments, ChatUser sender, CancellationToken cancellationToken)
Handle a chat command
Task< string > Invoke(string arguments, ChatUser user, CancellationToken cancellationToken)
Invoke the ICommand
Represents a tgs_chat_user datum
Represents a command made from DM code
ICustomCommandHandler handler
The ICustomCommandHandler for the CustomCommand
Handles Commands.ICommands that map to those defined in a IChatTrackingContext
Represents a command that can be invoked by talking to chat bots