2023-02-23 21:46:49 +00:00
|
|
|
|
using SharpChat.EventStorage;
|
2023-02-16 20:34:59 +00:00
|
|
|
|
using System;
|
|
|
|
|
using System.Linq;
|
|
|
|
|
|
2023-02-23 21:46:49 +00:00
|
|
|
|
namespace SharpChat.Commands
|
|
|
|
|
{
|
2023-02-16 20:34:59 +00:00
|
|
|
|
public class ActionCommand : IChatCommand {
|
|
|
|
|
public bool IsMatch(ChatCommandContext ctx) {
|
|
|
|
|
return ctx.NameEquals("action")
|
|
|
|
|
|| ctx.NameEquals("me");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public void Dispatch(ChatCommandContext ctx) {
|
|
|
|
|
throw new NotImplementedException();
|
|
|
|
|
}
|
|
|
|
|
|
2023-02-23 21:46:49 +00:00
|
|
|
|
public (string, bool)? ActionDispatch(ChatCommandContext ctx) {
|
|
|
|
|
return ctx.Args.Any() ? (string.Join(' ', ctx.Args), true) : null;
|
2023-02-16 20:34:59 +00:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|