mirror of
https://github.com/Sheldan/abstracto.git
synced 2026-04-04 00:36:26 +00:00
[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:
@@ -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>
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user