API improvements
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
2021-09-10 19:19:50 +03:00
parent 24b15ca4fe
commit c5806b6b45
4 changed files with 13 additions and 3 deletions

View File

@@ -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);
}

View File

@@ -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;