mirror of
https://github.com/Sheldan/abstracto.git
synced 2026-04-14 19:56:29 +00:00
removed decay feature boolean from myWarnings, because only automatic decay is an additional feature
fixed post target for kicking fixed casing for mod mail post targets added initial version of the ascii doctor documentation
This commit is contained in:
@@ -43,8 +43,6 @@ public class MyWarnings extends AbstractConditionableCommand {
|
||||
Long currentWarnCount = warnManagementService.getActiveWarnsForUser(commandContext.getUserInitiatedContext().getAUserInAServer());
|
||||
model.setCurrentWarnCount(currentWarnCount);
|
||||
Long totalWarnCount = warnManagementService.getTotalWarnsForUser(commandContext.getUserInitiatedContext().getAUserInAServer());
|
||||
boolean userUsesDecay = featureFlagService.isFeatureEnabled(warningDecayFeature, commandContext.getUserInitiatedContext().getServer());
|
||||
model.setServerUsesDecays(userUsesDecay);
|
||||
model.setTotalWarnCount(totalWarnCount);
|
||||
channelService.sendTemplateInChannel("myWarnings_response", model, commandContext.getChannel());
|
||||
return CommandResult.fromSuccess();
|
||||
|
||||
@@ -18,7 +18,7 @@ import java.util.Optional;
|
||||
public class KickServiceBean implements KickService {
|
||||
|
||||
private static final String KICK_LOG_TEMPLATE = "kick_log";
|
||||
private static final String WARN_LOG_TARGET = "warnLog";
|
||||
private static final String KICK_LOG_TARGET = "kickLog";
|
||||
@Autowired
|
||||
private BotService botService;
|
||||
|
||||
@@ -43,6 +43,6 @@ public class KickServiceBean implements KickService {
|
||||
|
||||
private void sendKickLog(KickLogModel kickLogModel) {
|
||||
String warnLogMessage = templateService.renderTemplate(KICK_LOG_TEMPLATE, kickLogModel);
|
||||
postTargetService.sendTextInPostTarget(warnLogMessage, WARN_LOG_TARGET, kickLogModel.getServer().getId());
|
||||
postTargetService.sendTextInPostTarget(warnLogMessage, KICK_LOG_TARGET, kickLogModel.getServer().getId());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -9,9 +9,6 @@
|
||||
"b": 255
|
||||
}
|
||||
<#assign userMention>${member.effectiveName}</#assign>
|
||||
<#if serverUsesDecays>
|
||||
,"description" :"<#include "myWarnings_with_decay_embed_description">"
|
||||
<#else>
|
||||
,"description" :"<#include "myWarnings_embed_description">"
|
||||
</#if>
|
||||
}
|
||||
@@ -9,7 +9,6 @@ import lombok.experimental.SuperBuilder;
|
||||
@Setter
|
||||
@SuperBuilder
|
||||
public class MyWarningsModel extends UserInitiatedServerContext {
|
||||
private Boolean serverUsesDecays;
|
||||
private Long totalWarnCount;
|
||||
private Long currentWarnCount;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user