Integrated the controller into the ChatCommand & the GroupCommand

This commit is contained in:
2021-10-02 20:17:32 +02:00
parent 79378c2b47
commit 1617540e0a
2 changed files with 19 additions and 8 deletions

View File

@ -0,0 +1,54 @@
package de.gnmyt.autoresponder.entities;
import de.gnmyt.autoresponder.http.controller.HttpResponseController;
public class GroupCommand extends Command {
private final String group;
private final String message;
private final String sender;
/**
* Constructor of the {@link GroupCommand}
*
* @param appPackageName The package name of the responder app
* @param messengerPackageName The package name of the messenger
* @param ruleId The id of the rule
* @param group The name of the group in which the message has been sent
* @param message The message itself
* @param sender The sender that sent the message
*/
public GroupCommand(HttpResponseController controller, String appPackageName, String messengerPackageName, int ruleId, String group, String message, String sender) {
super(controller, appPackageName, messengerPackageName, ruleId);
this.group = group;
this.message = message;
this.sender = sender;
}
/**
* Gets the name of the group
*
* @return the name of the group
*/
public String getGroup() {
return group;
}
/**
* Gets the message
*
* @return the message
*/
public String getMessage() {
return message;
}
/**
* Gets the sender of the message
*
* @return the sender of the message
*/
public String getSender() {
return sender;
}
}