1using System.Text.RegularExpressions;
2using System.Threading.Tasks;
15 : base(
@"^unsubscribe\s+(?'JID'[^\s]+)$")
22 public override string Name =>
"Unsubscribe";
32 public override async Task
Execute(
ChatState State,
string[] Arguments,
string OrgMessage, Match Details,
35 string JID = Arguments[0];
36 await IoTGateway.Gateway.XmppClient.RequestPresenceUnsubscription(JID);
38 await ResponseCallback(
"Unsubscribed from `" + JID +
"`.",
string.Empty);
49 new HelpItem(
"unsubscribe JID",
"Unsubscribes from a contact.")
An administrative command whose syntax is validated with a regular expression.
Contains an item of information about a command.
Unsubscribes from a contact.
Unsubscribe()
Unsubscribes from a contact.
override async Task Execute(ChatState State, string[] Arguments, string OrgMessage, Match Details, ResponseCallbackHandler ResponseCallback)
Executes the command.
override string Name
Command name
override HelpItem[] GetHelp()
Gets help about the command.
delegate Task< string > ResponseCallbackHandler(string Markdown, string MessageId)
Delegate for response callback handler methods.