21 lines
580 B
C#
21 lines
580 B
C#
using SharpChat.EventStorage;
|
|
using System;
|
|
using System.Linq;
|
|
|
|
namespace SharpChat.Commands
|
|
{
|
|
public class ActionCommand : IChatCommand {
|
|
public bool IsMatch(ChatCommandContext ctx) {
|
|
return ctx.NameEquals("action")
|
|
|| ctx.NameEquals("me");
|
|
}
|
|
|
|
public void Dispatch(ChatCommandContext ctx) {
|
|
throw new NotImplementedException();
|
|
}
|
|
|
|
public (string, bool)? ActionDispatch(ChatCommandContext ctx) {
|
|
return ctx.Args.Any() ? (string.Join(' ', ctx.Args), true) : null;
|
|
}
|
|
}
|
|
}
|