This commit is contained in:
@@ -12,6 +12,10 @@ public abstract class AbstractActionCommand implements Command {
|
||||
|
||||
private RequestMatcher matcher;
|
||||
|
||||
public AbstractActionCommand(RequestMatcher matcher) {
|
||||
this.matcher = matcher;
|
||||
}
|
||||
|
||||
public AbstractActionCommand(Action action) {
|
||||
matcher = RequestMatchers.action(action);
|
||||
}
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
package ru.penkrat.stbf.common.command;
|
||||
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import ru.penkrat.stbf.api.Action;
|
||||
import ru.penkrat.stbf.api.BotRequest;
|
||||
import ru.penkrat.stbf.api.BotResponse;
|
||||
@@ -10,6 +11,7 @@ import ru.penkrat.stbf.api.Screen;
|
||||
import ru.penkrat.stbf.common.screen.TextScreen;
|
||||
import ru.penkrat.stbf.tools.RequestMatchers;
|
||||
|
||||
@RequiredArgsConstructor
|
||||
public class SimpleCommand implements Command {
|
||||
|
||||
private final RequestMatcher matcher;
|
||||
|
||||
Reference in New Issue
Block a user