mirror of
https://github.com/Sheldan/abstracto.git
synced 2026-04-18 04:50:38 +00:00
[AB-150] creating repost detection feature including configuration and documentation
adding http and hash service adding ability to add default emotes to a message to message service adding message embedded listener to wrap the embedded event adding custom channel groups which can be defined by modules, in case a change on a channel group (only created and updated) happens a listener is available in order to sync the state in dependant areas changing command receiver re-throwing abstracto runtime exceptions in order to display them better changing channel group parameter handler to throw an exception in case the channel group was not found adding User in a server parameter handler split channel not found exception to be able to differentiate between not found in database and not found in guild changing exception handling in command received handler to handle the case for only one parameter handler future which failed (the whole single future failed, which was not reported) changing parameter type of `removeFromChannelGroup` to AChannel in order to be able to delete channels in the database via ID moving method to mock utils for mocking consumer removing parameter validation from commands, as it should be done in the command received handler and parameter handlers anyway
This commit is contained in:
@@ -32,7 +32,6 @@ public class DeleteTrackedEmote extends AbstractConditionableCommand {
|
||||
|
||||
@Override
|
||||
public CommandResult execute(CommandContext commandContext) {
|
||||
checkParameters(commandContext);
|
||||
List<Object> parameters = commandContext.getParameters().getParameters();
|
||||
TrackedEmote fakeTrackedEmote = (TrackedEmote) parameters.get(0);
|
||||
// need to actually load the TrackedEmote
|
||||
|
||||
@@ -43,7 +43,6 @@ public class DeletedEmoteStats extends AbstractConditionableCommand {
|
||||
|
||||
@Override
|
||||
public CompletableFuture<CommandResult> executeAsync(CommandContext commandContext) {
|
||||
checkParameters(commandContext);
|
||||
List<Object> parameters = commandContext.getParameters().getParameters();
|
||||
// default is 1.1.1970
|
||||
Instant statsSince = Instant.EPOCH;
|
||||
|
||||
@@ -32,7 +32,6 @@ public class DisableEmoteTracking extends AbstractConditionableCommand {
|
||||
|
||||
@Override
|
||||
public CommandResult execute(CommandContext commandContext) {
|
||||
checkParameters(commandContext);
|
||||
List<Object> parameters = commandContext.getParameters().getParameters();
|
||||
if(!parameters.isEmpty()) {
|
||||
TrackedEmote fakeTrackedEmote = (TrackedEmote) parameters.get(0);
|
||||
|
||||
@@ -44,7 +44,6 @@ public class EmoteStats extends AbstractConditionableCommand {
|
||||
|
||||
@Override
|
||||
public CompletableFuture<CommandResult> executeAsync(CommandContext commandContext) {
|
||||
checkParameters(commandContext);
|
||||
List<Object> parameters = commandContext.getParameters().getParameters();
|
||||
// default is 1.1.1970
|
||||
Instant statsSince = Instant.EPOCH;
|
||||
|
||||
@@ -65,7 +65,6 @@ public class ExportEmoteStats extends AbstractConditionableCommand {
|
||||
|
||||
@Override
|
||||
public CompletableFuture<CommandResult> executeAsync(CommandContext commandContext) {
|
||||
checkParameters(commandContext);
|
||||
List<Object> parameters = commandContext.getParameters().getParameters();
|
||||
Instant statsSince = Instant.EPOCH;
|
||||
// default is 1.1.1970
|
||||
|
||||
@@ -46,7 +46,6 @@ public class ExternalEmoteStats extends AbstractConditionableCommand {
|
||||
|
||||
@Override
|
||||
public CompletableFuture<CommandResult> executeAsync(CommandContext commandContext) {
|
||||
checkParameters(commandContext);
|
||||
List<Object> parameters = commandContext.getParameters().getParameters();
|
||||
// default is 1.1.1970
|
||||
Instant statsSince = Instant.EPOCH;
|
||||
|
||||
@@ -35,7 +35,6 @@ public class PurgeEmoteStats extends AbstractConditionableCommand {
|
||||
|
||||
@Override
|
||||
public CommandResult execute(CommandContext commandContext) {
|
||||
checkParameters(commandContext);
|
||||
List<Object> parameters = commandContext.getParameters().getParameters();
|
||||
TrackedEmote fakeTrackedEmote = (TrackedEmote) parameters.get(0);
|
||||
TrackedEmote trackedEmote = trackedEmoteManagementService.loadByTrackedEmoteServer(fakeTrackedEmote.getTrackedEmoteId());
|
||||
|
||||
@@ -40,7 +40,6 @@ public class ShowExternalTrackedEmote extends AbstractConditionableCommand {
|
||||
|
||||
@Override
|
||||
public CompletableFuture<CommandResult> executeAsync(CommandContext commandContext) {
|
||||
checkParameters(commandContext);
|
||||
List<Object> parameters = commandContext.getParameters().getParameters();
|
||||
TrackedEmote fakeTrackedEmote = (TrackedEmote) parameters.get(0);
|
||||
// load the actual TrackedEmote instance
|
||||
|
||||
@@ -50,7 +50,6 @@ public class ShowTrackedEmotes extends AbstractConditionableCommand {
|
||||
|
||||
@Override
|
||||
public CompletableFuture<CommandResult> executeAsync(CommandContext commandContext) {
|
||||
checkParameters(commandContext);
|
||||
|
||||
// per default, do not show TrackedEmote for which tracking has been disabled
|
||||
Boolean showTrackingDisabled = false;
|
||||
|
||||
@@ -44,7 +44,6 @@ public class TrackEmote extends AbstractConditionableCommand {
|
||||
|
||||
@Override
|
||||
public CommandResult execute(CommandContext commandContext) {
|
||||
checkParameters(commandContext);
|
||||
TrackEmoteParameter emoteToTrack = (TrackEmoteParameter) commandContext.getParameters().getParameters().get(0);
|
||||
Long emoteId = emoteToTrack.getTrackedEmote().getTrackedEmoteId().getId();
|
||||
long serverId = commandContext.getGuild().getIdLong();
|
||||
|
||||
Reference in New Issue
Block a user