[AB-80] added tracking of emotes used by server members and configuration

updated sonar scanner version
changed some commands to be silent instead of adding a check reaction
This commit is contained in:
Sheldan
2020-11-11 17:11:30 +01:00
parent c60cdb9d98
commit 04f1db2408
202 changed files with 7989 additions and 131 deletions

View File

@@ -3,13 +3,12 @@
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<parent>
<groupId>dev.sheldan.abstracto</groupId>
<groupId>dev.sheldan.abstracto.modules</groupId>
<artifactId>abstracto-modules</artifactId>
<version>1.0-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<groupId>dev.sheldan.abstracto.modules</groupId>
<artifactId>utility</artifactId>
<packaging>pom</packaging>

View File

@@ -34,7 +34,7 @@ public class ServerInfo extends AbstractConditionableCommand {
model.setGuild(commandContext.getGuild());
log.info("Displaying serverinfo for server {}", commandContext.getGuild().getId());
return FutureUtils.toSingleFutureGeneric(channelService.sendEmbedTemplateInChannel("serverinfo_response", model, commandContext.getChannel()))
.thenApply(aVoid -> CommandResult.fromSuccess());
.thenApply(aVoid -> CommandResult.fromIgnored());
}
@Override

View File

@@ -40,7 +40,7 @@ public class ShowAvatar extends AbstractConditionableCommand {
memberToShow.getId(), commandContext.getAuthor().getId(), commandContext.getChannel().getId(), commandContext.getGuild().getId());
model.setMemberInfo(memberToShow);
return FutureUtils.toSingleFutureGeneric(channelService.sendEmbedTemplateInChannel(SHOW_AVATAR_RESPONSE_TEMPLATE, model, commandContext.getChannel()))
.thenApply(aVoid -> CommandResult.fromSuccess());
.thenApply(aVoid -> CommandResult.fromIgnored());
}
@Override

View File

@@ -35,7 +35,7 @@ public class ShowEmote extends AbstractConditionableCommand {
ShowEmoteLog emoteLog = (ShowEmoteLog) ContextConverter.fromCommandContext(commandContext, ShowEmoteLog.class);
emoteLog.setEmote(emoteParameter);
return FutureUtils.toSingleFutureGeneric(channelService.sendEmbedTemplateInChannel(SHOW_EMOTE_RESPONSE_TEMPLATE, emoteLog, commandContext.getChannel()))
.thenApply(aVoid -> CommandResult.fromSuccess());
.thenApply(aVoid -> CommandResult.fromIgnored());
}
@Override

View File

@@ -35,7 +35,7 @@ public class StarStats extends AbstractConditionableCommand {
return starboardService.retrieveStarStats(commandContext.getGuild().getIdLong())
.thenCompose(starStatsModel ->
FutureUtils.toSingleFutureGeneric(channelService.sendEmbedTemplateInChannel(STARSTATS_RESPONSE_TEMPLATE, starStatsModel, commandContext.getChannel()))
).thenApply(o -> CommandResult.fromSuccess());
).thenApply(o -> CommandResult.fromIgnored());
}
@Override

View File

@@ -48,12 +48,12 @@ public class UserInfo extends AbstractConditionableCommand {
return botService.forceReloadMember(memberToShow).thenCompose(member -> {
model.setMemberInfo(member);
return self.sendResponse(commandContext, model)
.thenApply(aVoid -> CommandResult.fromSuccess());
.thenApply(aVoid -> CommandResult.fromIgnored());
});
} else {
model.setMemberInfo(memberToShow);
return self.sendResponse(commandContext, model)
.thenApply(aVoid -> CommandResult.fromSuccess());
.thenApply(aVoid -> CommandResult.fromIgnored());
}
}

View File

@@ -42,7 +42,7 @@ public class Reminders extends AbstractConditionableCommand {
model.setReminders(activeReminders);
log.info("Showing {} reminders for user {} in server {}.", activeReminders.size(), commandContext.getAuthor().getId(), commandContext.getGuild().getId());
return FutureUtils.toSingleFutureGeneric(channelService.sendEmbedTemplateInChannel(REMINDERS_RESPONSE_TEMPLATE, model, commandContext.getChannel()))
.thenApply(aVoid -> CommandResult.fromSuccess());
.thenApply(aVoid -> CommandResult.fromIgnored());
}
@Override