mirror of
https://github.com/Sheldan/Sissi.git
synced 2026-01-26 19:21:43 +00:00
Compare commits
62 Commits
sissi-1.3.
...
sissi-1.3.
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
6de38d3bea | ||
|
|
9de6eb4b8b | ||
|
|
df1392bf84 | ||
|
|
6e065de915 | ||
|
|
a1820aea67 | ||
|
|
09c113c6bc | ||
|
|
d080292e85 | ||
|
|
0e9ea8cf1a | ||
|
|
5d1037f66d | ||
|
|
eb6251aae0 | ||
|
|
caccf8b405 | ||
|
|
5390c0e53e | ||
|
|
8732064764 | ||
|
|
46833e024f | ||
|
|
e459ef77f3 | ||
|
|
a827d7e946 | ||
|
|
85da8684a4 | ||
|
|
52c3c5bcc8 | ||
|
|
a3c1b0537e | ||
|
|
127ff821d1 | ||
|
|
7e3b23aec0 | ||
|
|
c0ced48ff2 | ||
|
|
b5dfb59458 | ||
|
|
c89e8591f0 | ||
|
|
507ac7b043 | ||
|
|
d64abb4cce | ||
|
|
e56999da19 | ||
|
|
06dc90a51e | ||
|
|
1842094036 | ||
|
|
b2d55c3236 | ||
|
|
b88ed34ed2 | ||
|
|
939ea35f39 | ||
|
|
5c718bfa5e | ||
|
|
0efee9e7aa | ||
|
|
f1f56b03d4 | ||
|
|
725afbd115 | ||
|
|
015ff303b7 | ||
|
|
55d25697ce | ||
|
|
cdcfd5c8f8 | ||
|
|
42c307d962 | ||
|
|
3fbb635b4a | ||
|
|
53761fba98 | ||
|
|
d0280ea116 | ||
|
|
bb605133bd | ||
|
|
194f18ee22 | ||
|
|
4e1196a405 | ||
|
|
672ad9b9e4 | ||
|
|
fd548b7bfe | ||
|
|
888246cbbc | ||
|
|
a26114331f | ||
|
|
2ae472ae94 | ||
|
|
4cf1e0c1f1 | ||
|
|
6d1d70e664 | ||
|
|
2c9f38952c | ||
|
|
b801fc82c6 | ||
|
|
10255daa29 | ||
|
|
f0d7e98f70 | ||
|
|
dfcfdd53c3 | ||
|
|
4a75447b7e | ||
|
|
bce5c89ad1 | ||
|
|
686afb88f6 | ||
|
|
1abce06e2f |
2
.github/workflows/release.yml
vendored
2
.github/workflows/release.yml
vendored
@@ -34,5 +34,5 @@ jobs:
|
|||||||
env:
|
env:
|
||||||
REGISTRY_PREFIX: docker.pkg.github.com/sheldan/sissi/
|
REGISTRY_PREFIX: docker.pkg.github.com/sheldan/sissi/
|
||||||
VERSION: ${{ env.version }}
|
VERSION: ${{ env.version }}
|
||||||
ABSTRACTO_VERSION: 1.4.3
|
ABSTRACTO_VERSION: 1.4.17
|
||||||
ABSTRACTO_REGISTRY_PREFIX: docker.pkg.github.com/sheldan/abstracto/
|
ABSTRACTO_REGISTRY_PREFIX: docker.pkg.github.com/sheldan/abstracto/
|
||||||
4
README
Normal file
4
README
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
|
||||||
|
|
||||||
|
Attributions:
|
||||||
|
Code for debra module has been inspired with approval of zinnsoldat91 by: https://github.com/zinnsoldat91/spendenbot. The code has been adapted to fit into the structure.
|
||||||
@@ -3,7 +3,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>dev.sheldan.sissi.application</groupId>
|
<groupId>dev.sheldan.sissi.application</groupId>
|
||||||
<artifactId>application</artifactId>
|
<artifactId>application</artifactId>
|
||||||
<version>1.3.2</version>
|
<version>1.3.19</version>
|
||||||
</parent>
|
</parent>
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
<artifactId>executable</artifactId>
|
<artifactId>executable</artifactId>
|
||||||
@@ -120,6 +120,16 @@
|
|||||||
<artifactId>modmail-impl</artifactId>
|
<artifactId>modmail-impl</artifactId>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>dev.sheldan.abstracto.modules</groupId>
|
||||||
|
<artifactId>experience-tracking-impl</artifactId>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>dev.sheldan.abstracto.modules</groupId>
|
||||||
|
<artifactId>logging-impl</artifactId>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
<!-- sissi modules -->
|
<!-- sissi modules -->
|
||||||
|
|
||||||
<dependency>
|
<dependency>
|
||||||
@@ -134,6 +144,12 @@
|
|||||||
<version>${project.version}</version>
|
<version>${project.version}</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>dev.sheldan.sissi.application.module</groupId>
|
||||||
|
<artifactId>debra</artifactId>
|
||||||
|
<version>${project.version}</version>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
<!-- sissi customizations -->
|
<!-- sissi customizations -->
|
||||||
|
|
||||||
<dependency>
|
<dependency>
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>dev.sheldan.sissi</groupId>
|
<groupId>dev.sheldan.sissi</groupId>
|
||||||
<artifactId>sissi</artifactId>
|
<artifactId>sissi</artifactId>
|
||||||
<version>1.3.2</version>
|
<version>1.3.19</version>
|
||||||
</parent>
|
</parent>
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>dev.sheldan.sissi.application.module.custom</groupId>
|
<groupId>dev.sheldan.sissi.application.module.custom</groupId>
|
||||||
<artifactId>sissi-customizations</artifactId>
|
<artifactId>sissi-customizations</artifactId>
|
||||||
<version>1.3.2</version>
|
<version>1.3.19</version>
|
||||||
</parent>
|
</parent>
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<artifactId>application</artifactId>
|
<artifactId>application</artifactId>
|
||||||
<groupId>dev.sheldan.sissi.application</groupId>
|
<groupId>dev.sheldan.sissi.application</groupId>
|
||||||
<version>1.3.2</version>
|
<version>1.3.19</version>
|
||||||
</parent>
|
</parent>
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
|
||||||
|
|||||||
42
application/sissi-modules/debra/pom.xml
Normal file
42
application/sissi-modules/debra/pom.xml
Normal file
@@ -0,0 +1,42 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project xmlns="http://maven.apache.org/POM/4.0.0" 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.sissi.application</groupId>
|
||||||
|
<artifactId>sissi-modules</artifactId>
|
||||||
|
<version>1.3.19</version>
|
||||||
|
</parent>
|
||||||
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
|
||||||
|
<groupId>dev.sheldan.sissi.application.module</groupId>
|
||||||
|
<artifactId>debra</artifactId>
|
||||||
|
|
||||||
|
<dependencies>
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.google.code.gson</groupId>
|
||||||
|
<artifactId>gson</artifactId>
|
||||||
|
</dependency>
|
||||||
|
</dependencies>
|
||||||
|
|
||||||
|
<build>
|
||||||
|
<plugins>
|
||||||
|
<plugin>
|
||||||
|
<artifactId>maven-assembly-plugin</artifactId>
|
||||||
|
<configuration>
|
||||||
|
<descriptors>
|
||||||
|
<descriptor>src/main/assembly/liquibase.xml</descriptor>
|
||||||
|
</descriptors>
|
||||||
|
</configuration>
|
||||||
|
<executions>
|
||||||
|
<execution>
|
||||||
|
<id>make-assembly</id>
|
||||||
|
<phase>package</phase>
|
||||||
|
<goals>
|
||||||
|
<goal>single</goal>
|
||||||
|
</goals>
|
||||||
|
</execution>
|
||||||
|
</executions>
|
||||||
|
</plugin>
|
||||||
|
</plugins>
|
||||||
|
</build>
|
||||||
|
|
||||||
|
</project>
|
||||||
@@ -0,0 +1,18 @@
|
|||||||
|
<assembly xmlns="http://maven.apache.org/ASSEMBLY/2.1.0"
|
||||||
|
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||||
|
xsi:schemaLocation="http://maven.apache.org/ASSEMBLY/2.1.0 http://maven.apache.org/xsd/assembly-2.1.0.xsd">
|
||||||
|
<id>liquibase</id>
|
||||||
|
<formats>
|
||||||
|
<format>zip</format>
|
||||||
|
</formats>
|
||||||
|
<includeBaseDirectory>false</includeBaseDirectory>
|
||||||
|
<fileSets>
|
||||||
|
<fileSet>
|
||||||
|
<outputDirectory>.</outputDirectory>
|
||||||
|
<directory>${project.basedir}/src/main/resources/migrations</directory>
|
||||||
|
<includes>
|
||||||
|
<include>**/*</include>
|
||||||
|
</includes>
|
||||||
|
</fileSet>
|
||||||
|
</fileSets>
|
||||||
|
</assembly>
|
||||||
@@ -0,0 +1,15 @@
|
|||||||
|
package dev.sheldan.sissi.module.debra;
|
||||||
|
|
||||||
|
import dev.sheldan.abstracto.core.exception.AbstractoTemplatableException;
|
||||||
|
|
||||||
|
public class DonationAmountNotFoundException extends AbstractoTemplatableException {
|
||||||
|
@Override
|
||||||
|
public String getTemplateName() {
|
||||||
|
return "donation_amount_not_found_exception";
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Object getTemplateModel() {
|
||||||
|
return new Object();
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,184 @@
|
|||||||
|
package dev.sheldan.sissi.module.debra.commands;
|
||||||
|
|
||||||
|
import dev.sheldan.abstracto.core.command.UtilityModuleDefinition;
|
||||||
|
import dev.sheldan.abstracto.core.command.condition.AbstractConditionableCommand;
|
||||||
|
import dev.sheldan.abstracto.core.command.config.CommandConfiguration;
|
||||||
|
import dev.sheldan.abstracto.core.command.config.HelpInfo;
|
||||||
|
import dev.sheldan.abstracto.core.command.config.Parameter;
|
||||||
|
import dev.sheldan.abstracto.core.command.execution.CommandContext;
|
||||||
|
import dev.sheldan.abstracto.core.command.execution.CommandResult;
|
||||||
|
import dev.sheldan.abstracto.core.config.FeatureDefinition;
|
||||||
|
import dev.sheldan.abstracto.core.exception.AbstractoRunTimeException;
|
||||||
|
import dev.sheldan.abstracto.core.interaction.InteractionService;
|
||||||
|
import dev.sheldan.abstracto.core.interaction.slash.SlashCommandConfig;
|
||||||
|
import dev.sheldan.abstracto.core.interaction.slash.parameter.SlashCommandParameterService;
|
||||||
|
import dev.sheldan.abstracto.core.service.ChannelService;
|
||||||
|
import dev.sheldan.abstracto.core.templating.model.MessageToSend;
|
||||||
|
import dev.sheldan.abstracto.core.templating.service.TemplateService;
|
||||||
|
import dev.sheldan.abstracto.core.utils.FutureUtils;
|
||||||
|
import dev.sheldan.sissi.module.debra.config.DebraFeatureDefinition;
|
||||||
|
import dev.sheldan.sissi.module.debra.config.DebraSlashCommandNames;
|
||||||
|
import dev.sheldan.sissi.module.debra.converter.DonationConverter;
|
||||||
|
import dev.sheldan.sissi.module.debra.model.api.DonationsResponse;
|
||||||
|
import dev.sheldan.sissi.module.debra.model.commands.DonationsModel;
|
||||||
|
import dev.sheldan.sissi.module.debra.service.DonationService;
|
||||||
|
import net.dv8tion.jda.api.events.interaction.command.SlashCommandInteractionEvent;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.stereotype.Component;
|
||||||
|
|
||||||
|
import java.io.IOException;
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.Arrays;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.concurrent.CompletableFuture;
|
||||||
|
|
||||||
|
|
||||||
|
@Component
|
||||||
|
public class Donations extends AbstractConditionableCommand {
|
||||||
|
|
||||||
|
private static final String DONATIONS_COMMAND_NAME = "donations";
|
||||||
|
private static final String DONATIONS_RESPONSE_TEMPLATE_KEY = "donations_response";
|
||||||
|
private static final String SELECTION_PARAMETER = "type";
|
||||||
|
private static final String SELECTION_VALUE_PARAMETER = "parametervalue";
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private ChannelService channelService;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private InteractionService interactionService;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private DonationService donationService;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private TemplateService templateService;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private DonationConverter donationConverter;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private SlashCommandParameterService slashCommandParameterService;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public CompletableFuture<CommandResult> executeAsync(CommandContext commandContext) {
|
||||||
|
List<Object> parameters = commandContext.getParameters().getParameters();
|
||||||
|
MessageToSend messageToSend;
|
||||||
|
if(parameters.isEmpty()) {
|
||||||
|
messageToSend = getDonationMessageToSend(commandContext.getGuild().getIdLong(), null, null);
|
||||||
|
} else {
|
||||||
|
String type = (String) parameters.get(0);
|
||||||
|
Integer selectionValue = (Integer) parameters.get(1);
|
||||||
|
Integer top = null;
|
||||||
|
Integer latest = null;
|
||||||
|
switch (type) {
|
||||||
|
case "top": top = selectionValue; break;
|
||||||
|
default:
|
||||||
|
case "latest" :
|
||||||
|
latest = selectionValue; break;
|
||||||
|
}
|
||||||
|
messageToSend = getDonationMessageToSend(commandContext.getGuild().getIdLong(), top, latest);
|
||||||
|
}
|
||||||
|
return FutureUtils.toSingleFutureGeneric(channelService.sendMessageToSendToChannel(messageToSend, commandContext.getChannel()))
|
||||||
|
.thenApply(unused -> CommandResult.fromSuccess());
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public CompletableFuture<CommandResult> executeSlash(SlashCommandInteractionEvent event) {
|
||||||
|
String selectionType = null;
|
||||||
|
if(slashCommandParameterService.hasCommandOption(SELECTION_PARAMETER, event)) {
|
||||||
|
selectionType = slashCommandParameterService.getCommandOption(SELECTION_PARAMETER, event, String.class);
|
||||||
|
}
|
||||||
|
Integer selectionValue = 5;
|
||||||
|
if(slashCommandParameterService.hasCommandOption(SELECTION_VALUE_PARAMETER, event)) {
|
||||||
|
selectionValue = slashCommandParameterService.getCommandOption(SELECTION_VALUE_PARAMETER, event, Integer.class);
|
||||||
|
}
|
||||||
|
if(selectionValue > 20) {
|
||||||
|
selectionValue = 5;
|
||||||
|
}
|
||||||
|
Integer top = null;
|
||||||
|
Integer latest = null;
|
||||||
|
if(selectionType != null) {
|
||||||
|
switch (selectionType) {
|
||||||
|
case "top": top = selectionValue; break;
|
||||||
|
default:
|
||||||
|
case "latest" :
|
||||||
|
latest = selectionValue; break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
MessageToSend messageToSend = getDonationMessageToSend(event.getGuild().getIdLong(), top, latest);
|
||||||
|
return interactionService.replyMessageToSend(messageToSend, event)
|
||||||
|
.thenApply(interactionHook -> CommandResult.fromSuccess());
|
||||||
|
}
|
||||||
|
|
||||||
|
private MessageToSend getDonationMessageToSend(Long serverId, Integer top, Integer latest) {
|
||||||
|
DonationsModel donationModel;
|
||||||
|
try {
|
||||||
|
DonationsResponse donationResponse = donationService.fetchCurrentDonationAmount(serverId);
|
||||||
|
donationModel = donationConverter.convertDonationResponse(donationResponse);
|
||||||
|
if(top != null) {
|
||||||
|
donationModel.setDonations(donationService.getHighestDonations(donationResponse, top));
|
||||||
|
donationModel.setType(DonationsModel.DonationType.TOP);
|
||||||
|
} else if(latest != null) {
|
||||||
|
donationModel.setType(DonationsModel.DonationType.LATEST);
|
||||||
|
donationModel.setDonations(donationService.getLatestDonations(donationResponse, latest));
|
||||||
|
} else {
|
||||||
|
donationModel.setDonations(new ArrayList<>());
|
||||||
|
}
|
||||||
|
} catch (IOException e) {
|
||||||
|
throw new AbstractoRunTimeException("Failed to load donation amount.", e);
|
||||||
|
}
|
||||||
|
return templateService.renderEmbedTemplate(DONATIONS_RESPONSE_TEMPLATE_KEY, donationModel);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public CommandConfiguration getConfiguration() {
|
||||||
|
HelpInfo helpInfo = HelpInfo
|
||||||
|
.builder()
|
||||||
|
.templated(true)
|
||||||
|
.build();
|
||||||
|
|
||||||
|
SlashCommandConfig slashCommandConfig = SlashCommandConfig
|
||||||
|
.builder()
|
||||||
|
.enabled(true)
|
||||||
|
.rootCommandName(DebraSlashCommandNames.DEBRA)
|
||||||
|
.commandName(DONATIONS_COMMAND_NAME)
|
||||||
|
.build();
|
||||||
|
|
||||||
|
Parameter selectionParameter = Parameter
|
||||||
|
.builder()
|
||||||
|
.templated(true)
|
||||||
|
.name(SELECTION_PARAMETER)
|
||||||
|
.optional(true)
|
||||||
|
.type(String.class)
|
||||||
|
.build();
|
||||||
|
|
||||||
|
|
||||||
|
Parameter selectionValueParameter = Parameter
|
||||||
|
.builder()
|
||||||
|
.templated(true)
|
||||||
|
.name(SELECTION_VALUE_PARAMETER)
|
||||||
|
.optional(true)
|
||||||
|
.type(Integer.class)
|
||||||
|
.build();
|
||||||
|
|
||||||
|
List<Parameter> parameters = Arrays.asList(selectionParameter, selectionValueParameter);
|
||||||
|
|
||||||
|
return CommandConfiguration.builder()
|
||||||
|
.name(DONATIONS_COMMAND_NAME)
|
||||||
|
.module(UtilityModuleDefinition.UTILITY)
|
||||||
|
.templated(true)
|
||||||
|
.slashCommandConfig(slashCommandConfig)
|
||||||
|
.async(true)
|
||||||
|
.parameters(parameters)
|
||||||
|
.supportsEmbedException(true)
|
||||||
|
.causesReaction(false)
|
||||||
|
.help(helpInfo)
|
||||||
|
.build();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public FeatureDefinition getFeature() {
|
||||||
|
return DebraFeatureDefinition.DEBRA;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,31 @@
|
|||||||
|
package dev.sheldan.sissi.module.debra.config;
|
||||||
|
|
||||||
|
import dev.sheldan.abstracto.core.config.FeatureConfig;
|
||||||
|
import dev.sheldan.abstracto.core.config.FeatureDefinition;
|
||||||
|
import dev.sheldan.abstracto.core.config.PostTargetEnum;
|
||||||
|
import org.springframework.stereotype.Component;
|
||||||
|
|
||||||
|
import java.util.Arrays;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
@Component
|
||||||
|
public class DebraFeatureConfig implements FeatureConfig {
|
||||||
|
|
||||||
|
public static final String DEBRA_DONATION_NOTIFICATION_DELAY_CONFIG_KEY = "debraDonationNotificationDelayMillis";
|
||||||
|
public static final String DEBRA_DONATION_API_FETCH_SIZE_KEY = "debraDonationApiFetchSize";
|
||||||
|
public static final String DEBRA_DONATION_NOTIFICATION_SERVER_ID_ENV_NAME = "DEBRA_DONATION_NOTIFICATION_SERVER_ID";
|
||||||
|
@Override
|
||||||
|
public FeatureDefinition getFeature() {
|
||||||
|
return DebraFeatureDefinition.DEBRA;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<PostTargetEnum> getRequiredPostTargets() {
|
||||||
|
return Arrays.asList(DebraPostTarget.DEBRA_DONATION_NOTIFICATION, DebraPostTarget.DEBRA_DONATION_NOTIFICATION2);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<String> getRequiredSystemConfigKeys() {
|
||||||
|
return Arrays.asList(DEBRA_DONATION_NOTIFICATION_DELAY_CONFIG_KEY, DEBRA_DONATION_API_FETCH_SIZE_KEY);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,15 @@
|
|||||||
|
package dev.sheldan.sissi.module.debra.config;
|
||||||
|
|
||||||
|
import dev.sheldan.abstracto.core.config.FeatureDefinition;
|
||||||
|
import lombok.Getter;
|
||||||
|
|
||||||
|
@Getter
|
||||||
|
public enum DebraFeatureDefinition implements FeatureDefinition {
|
||||||
|
DEBRA("debra");
|
||||||
|
|
||||||
|
private String key;
|
||||||
|
|
||||||
|
DebraFeatureDefinition(String key) {
|
||||||
|
this.key = key;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,15 @@
|
|||||||
|
package dev.sheldan.sissi.module.debra.config;
|
||||||
|
|
||||||
|
import dev.sheldan.abstracto.core.config.PostTargetEnum;
|
||||||
|
import lombok.Getter;
|
||||||
|
|
||||||
|
@Getter
|
||||||
|
public enum DebraPostTarget implements PostTargetEnum {
|
||||||
|
DEBRA_DONATION_NOTIFICATION("debraDonationNotification"), DEBRA_DONATION_NOTIFICATION2("debraDonationNotification2");
|
||||||
|
|
||||||
|
private String key;
|
||||||
|
|
||||||
|
DebraPostTarget(String key) {
|
||||||
|
this.key = key;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,9 @@
|
|||||||
|
package dev.sheldan.sissi.module.debra.config;
|
||||||
|
|
||||||
|
import org.springframework.context.annotation.Configuration;
|
||||||
|
import org.springframework.context.annotation.PropertySource;
|
||||||
|
|
||||||
|
@Configuration
|
||||||
|
@PropertySource("classpath:debra.properties")
|
||||||
|
public class DebraPropertieSource {
|
||||||
|
}
|
||||||
@@ -0,0 +1,15 @@
|
|||||||
|
package dev.sheldan.sissi.module.debra.config;
|
||||||
|
|
||||||
|
import lombok.Getter;
|
||||||
|
import lombok.Setter;
|
||||||
|
import org.springframework.boot.context.properties.ConfigurationProperties;
|
||||||
|
import org.springframework.context.annotation.Configuration;
|
||||||
|
|
||||||
|
@Configuration
|
||||||
|
@Getter
|
||||||
|
@Setter
|
||||||
|
@ConfigurationProperties(prefix = "sissi.debra")
|
||||||
|
public class DebraProperties {
|
||||||
|
private String websocketURL;
|
||||||
|
private String donationAPIUrl;
|
||||||
|
}
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
package dev.sheldan.sissi.module.debra.config;
|
||||||
|
|
||||||
|
public class DebraSlashCommandNames {
|
||||||
|
public static final String DEBRA = "debra";
|
||||||
|
}
|
||||||
@@ -0,0 +1,28 @@
|
|||||||
|
package dev.sheldan.sissi.module.debra.converter;
|
||||||
|
|
||||||
|
import dev.sheldan.sissi.module.debra.model.api.Donation;
|
||||||
|
import dev.sheldan.sissi.module.debra.model.api.DonationsResponse;
|
||||||
|
import dev.sheldan.sissi.module.debra.model.commands.DonationItemModel;
|
||||||
|
import dev.sheldan.sissi.module.debra.model.commands.DonationsModel;
|
||||||
|
import org.apache.commons.lang3.BooleanUtils;
|
||||||
|
import org.springframework.stereotype.Component;
|
||||||
|
|
||||||
|
@Component
|
||||||
|
public class DonationConverter {
|
||||||
|
public DonationItemModel convertDonation(Donation donation) {
|
||||||
|
return DonationItemModel
|
||||||
|
.builder()
|
||||||
|
.donationAmount(donation.getAmount())
|
||||||
|
.firstName(donation.getFirstname())
|
||||||
|
.lastName(donation.getLastname())
|
||||||
|
.anonymous(BooleanUtils.toBoolean(donation.getAnonym()))
|
||||||
|
.build();
|
||||||
|
}
|
||||||
|
|
||||||
|
public DonationsModel convertDonationResponse(DonationsResponse response) {
|
||||||
|
return DonationsModel
|
||||||
|
.builder()
|
||||||
|
.totalAmount(response.getPage().getCollected())
|
||||||
|
.build();
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,96 @@
|
|||||||
|
package dev.sheldan.sissi.module.debra.listener;
|
||||||
|
|
||||||
|
import dev.sheldan.abstracto.core.listener.AsyncStartupListener;
|
||||||
|
import dev.sheldan.abstracto.core.service.ConfigService;
|
||||||
|
import dev.sheldan.sissi.module.debra.config.DebraProperties;
|
||||||
|
import dev.sheldan.sissi.module.debra.model.listener.DonationResponseModel;
|
||||||
|
import dev.sheldan.sissi.module.debra.service.DonationService;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import okhttp3.*;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.stereotype.Component;
|
||||||
|
|
||||||
|
import javax.annotation.Nullable;
|
||||||
|
import java.util.concurrent.CompletableFuture;
|
||||||
|
import java.util.concurrent.TimeUnit;
|
||||||
|
|
||||||
|
import static dev.sheldan.sissi.module.debra.config.DebraFeatureConfig.DEBRA_DONATION_NOTIFICATION_DELAY_CONFIG_KEY;
|
||||||
|
import static dev.sheldan.sissi.module.debra.config.DebraFeatureConfig.DEBRA_DONATION_NOTIFICATION_SERVER_ID_ENV_NAME;
|
||||||
|
|
||||||
|
@Component
|
||||||
|
@Slf4j
|
||||||
|
public class WebsocketListener extends WebSocketListener implements AsyncStartupListener {
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private DonationService donationService;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private DebraProperties debraProperties;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private ConfigService configService;
|
||||||
|
|
||||||
|
private WebSocket webSocketObj;
|
||||||
|
private OkHttpClient clientObj;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onOpen(WebSocket webSocket, Response response) {
|
||||||
|
log.info("Connected to donation websocket.");
|
||||||
|
super.onOpen(webSocket, response);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onMessage(WebSocket webSocket, String text) {
|
||||||
|
CompletableFuture.runAsync(() -> {
|
||||||
|
log.info("Handling received message on websocket.");
|
||||||
|
try {
|
||||||
|
Long targetServerId = Long.parseLong(System.getenv(DEBRA_DONATION_NOTIFICATION_SERVER_ID_ENV_NAME));
|
||||||
|
Long delayMillis = configService.getLongValueOrConfigDefault(DEBRA_DONATION_NOTIFICATION_DELAY_CONFIG_KEY, targetServerId);
|
||||||
|
log.info("Waiting {} milli seconds to send notification.", delayMillis);
|
||||||
|
Thread.sleep(delayMillis);
|
||||||
|
log.info("Loading new donation amount and sending notification.");
|
||||||
|
DonationResponseModel donation = donationService.parseDonationFromMessage(text);
|
||||||
|
donationService.sendDonationNotification(donation).thenAccept(unused -> {
|
||||||
|
log.info("Successfully notified about donation.");
|
||||||
|
}).exceptionally(throwable -> {
|
||||||
|
log.error("Failed to notify about donation.", throwable);
|
||||||
|
return null;
|
||||||
|
});
|
||||||
|
} catch (Exception exception) {
|
||||||
|
log.error("Failed to handle websocket message.", exception);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onFailure(WebSocket webSocket, Throwable t, @Nullable Response response) {
|
||||||
|
log.warn("Websocket connection failed...", t);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onClosing(WebSocket webSocket, int code, String reason) {
|
||||||
|
log.info("Closing websocket connection. It was closed with code {} and reason {}.", code, reason);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void execute() {
|
||||||
|
if(clientObj != null) {
|
||||||
|
clientObj.connectionPool().evictAll();
|
||||||
|
clientObj.dispatcher().executorService().shutdownNow();
|
||||||
|
}
|
||||||
|
clientObj = new OkHttpClient.Builder()
|
||||||
|
.readTimeout(0, TimeUnit.MILLISECONDS)
|
||||||
|
.retryOnConnectionFailure(true)
|
||||||
|
.build();
|
||||||
|
startConnection(clientObj);
|
||||||
|
clientObj.dispatcher().executorService().shutdown();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void startConnection(OkHttpClient client) {
|
||||||
|
log.info("Starting websocket connection.");
|
||||||
|
Request request = new Request.Builder()
|
||||||
|
.url(debraProperties.getWebsocketURL())
|
||||||
|
.build();
|
||||||
|
this.webSocketObj = client.newWebSocket(request, this);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,20 @@
|
|||||||
|
package dev.sheldan.sissi.module.debra.model.api;
|
||||||
|
|
||||||
|
import lombok.Builder;
|
||||||
|
import lombok.Getter;
|
||||||
|
import lombok.Setter;
|
||||||
|
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
|
||||||
|
@Getter
|
||||||
|
@Setter
|
||||||
|
@Builder
|
||||||
|
public class Description {
|
||||||
|
private BigDecimal collected;
|
||||||
|
private BigDecimal target;
|
||||||
|
private String currency;
|
||||||
|
private String slug;
|
||||||
|
private String displayName;
|
||||||
|
private BigDecimal collectedNet;
|
||||||
|
private BigDecimal percent;
|
||||||
|
}
|
||||||
@@ -0,0 +1,19 @@
|
|||||||
|
package dev.sheldan.sissi.module.debra.model.api;
|
||||||
|
|
||||||
|
import lombok.Builder;
|
||||||
|
import lombok.Getter;
|
||||||
|
import lombok.Setter;
|
||||||
|
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
|
||||||
|
@Getter
|
||||||
|
@Setter
|
||||||
|
@Builder
|
||||||
|
public class Donation {
|
||||||
|
private BigDecimal amount;
|
||||||
|
private String currency;
|
||||||
|
private String text;
|
||||||
|
private Integer anonym;
|
||||||
|
private String firstname;
|
||||||
|
private String lastname;
|
||||||
|
}
|
||||||
@@ -0,0 +1,17 @@
|
|||||||
|
package dev.sheldan.sissi.module.debra.model.api;
|
||||||
|
|
||||||
|
import lombok.Builder;
|
||||||
|
import lombok.Getter;
|
||||||
|
import lombok.Setter;
|
||||||
|
|
||||||
|
import java.math.BigInteger;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
@Getter
|
||||||
|
@Setter
|
||||||
|
@Builder
|
||||||
|
public class DonationsResponse {
|
||||||
|
private Description page;
|
||||||
|
private BigInteger donationCount;
|
||||||
|
private List<Donation> donations;
|
||||||
|
}
|
||||||
@@ -0,0 +1,15 @@
|
|||||||
|
package dev.sheldan.sissi.module.debra.model.commands;
|
||||||
|
|
||||||
|
import lombok.Builder;
|
||||||
|
import lombok.Getter;
|
||||||
|
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
|
||||||
|
@Getter
|
||||||
|
@Builder
|
||||||
|
public class DonationItemModel {
|
||||||
|
private String firstName;
|
||||||
|
private String lastName;
|
||||||
|
private BigDecimal donationAmount;
|
||||||
|
private Boolean anonymous;
|
||||||
|
}
|
||||||
@@ -0,0 +1,22 @@
|
|||||||
|
package dev.sheldan.sissi.module.debra.model.commands;
|
||||||
|
|
||||||
|
import lombok.Builder;
|
||||||
|
import lombok.Getter;
|
||||||
|
import lombok.Setter;
|
||||||
|
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
@Getter
|
||||||
|
@Builder
|
||||||
|
@Setter
|
||||||
|
public class DonationsModel {
|
||||||
|
private BigDecimal totalAmount;
|
||||||
|
private DonationType type;
|
||||||
|
private List<DonationItemModel> donations;
|
||||||
|
|
||||||
|
public enum DonationType {
|
||||||
|
LATEST, TOP
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,13 @@
|
|||||||
|
package dev.sheldan.sissi.module.debra.model.listener;
|
||||||
|
|
||||||
|
import lombok.Builder;
|
||||||
|
import lombok.Getter;
|
||||||
|
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
|
||||||
|
@Getter
|
||||||
|
@Builder
|
||||||
|
public class DonationNotificationModel {
|
||||||
|
private DonationResponseModel donation;
|
||||||
|
private BigDecimal totalDonationAmount;
|
||||||
|
}
|
||||||
@@ -0,0 +1,16 @@
|
|||||||
|
package dev.sheldan.sissi.module.debra.model.listener;
|
||||||
|
|
||||||
|
import lombok.Builder;
|
||||||
|
import lombok.Getter;
|
||||||
|
import lombok.ToString;
|
||||||
|
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
|
||||||
|
@Getter
|
||||||
|
@Builder
|
||||||
|
@ToString
|
||||||
|
public class DonationResponseModel {
|
||||||
|
private String donatorName;
|
||||||
|
private BigDecimal amount;
|
||||||
|
private String message;
|
||||||
|
}
|
||||||
@@ -0,0 +1,22 @@
|
|||||||
|
package dev.sheldan.sissi.module.debra.service;
|
||||||
|
|
||||||
|
import com.google.gson.JsonDeserializationContext;
|
||||||
|
import com.google.gson.JsonDeserializer;
|
||||||
|
import com.google.gson.JsonElement;
|
||||||
|
import com.google.gson.JsonParseException;
|
||||||
|
|
||||||
|
import java.lang.reflect.Type;
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
|
||||||
|
public class BigDecimalGsonAdapter implements JsonDeserializer<BigDecimal> {
|
||||||
|
@Override
|
||||||
|
public BigDecimal deserialize(JsonElement json, Type typeOfT, JsonDeserializationContext context) throws JsonParseException {
|
||||||
|
try {
|
||||||
|
return new BigDecimal(json.getAsString()
|
||||||
|
.replace(".", "")
|
||||||
|
.replace(',', '.'));
|
||||||
|
} catch (NumberFormatException e) {
|
||||||
|
throw new JsonParseException(e);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,151 @@
|
|||||||
|
package dev.sheldan.sissi.module.debra.service;
|
||||||
|
|
||||||
|
import com.google.gson.Gson;
|
||||||
|
import com.google.gson.GsonBuilder;
|
||||||
|
import dev.sheldan.abstracto.core.service.ConfigService;
|
||||||
|
import dev.sheldan.abstracto.core.service.PostTargetService;
|
||||||
|
import dev.sheldan.abstracto.core.templating.model.MessageToSend;
|
||||||
|
import dev.sheldan.abstracto.core.templating.service.TemplateService;
|
||||||
|
import dev.sheldan.abstracto.core.utils.FutureUtils;
|
||||||
|
import dev.sheldan.sissi.module.debra.DonationAmountNotFoundException;
|
||||||
|
import dev.sheldan.sissi.module.debra.config.DebraPostTarget;
|
||||||
|
import dev.sheldan.sissi.module.debra.config.DebraProperties;
|
||||||
|
import dev.sheldan.sissi.module.debra.converter.DonationConverter;
|
||||||
|
import dev.sheldan.sissi.module.debra.model.api.Donation;
|
||||||
|
import dev.sheldan.sissi.module.debra.model.api.DonationsResponse;
|
||||||
|
import dev.sheldan.sissi.module.debra.model.commands.DonationItemModel;
|
||||||
|
import dev.sheldan.sissi.module.debra.model.commands.DonationsModel;
|
||||||
|
import dev.sheldan.sissi.module.debra.model.listener.DonationResponseModel;
|
||||||
|
import dev.sheldan.sissi.module.debra.model.listener.DonationNotificationModel;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import net.dv8tion.jda.api.entities.Message;
|
||||||
|
import okhttp3.OkHttpClient;
|
||||||
|
import okhttp3.Request;
|
||||||
|
import okhttp3.Response;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.stereotype.Component;
|
||||||
|
|
||||||
|
import java.io.IOException;
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
import java.util.Comparator;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Optional;
|
||||||
|
import java.util.concurrent.CompletableFuture;
|
||||||
|
import java.util.regex.Matcher;
|
||||||
|
import java.util.regex.Pattern;
|
||||||
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
|
import static dev.sheldan.sissi.module.debra.config.DebraFeatureConfig.DEBRA_DONATION_API_FETCH_SIZE_KEY;
|
||||||
|
import static dev.sheldan.sissi.module.debra.config.DebraFeatureConfig.DEBRA_DONATION_NOTIFICATION_SERVER_ID_ENV_NAME;
|
||||||
|
|
||||||
|
@Component
|
||||||
|
@Slf4j
|
||||||
|
public class DonationService {
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private PostTargetService postTargetService;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private DebraProperties debraProperties;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private TemplateService templateService;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private OkHttpClient okHttpClient;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private DonationConverter donationConverter;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private ConfigService configService;
|
||||||
|
|
||||||
|
private static final String DEBRA_DONATION_NOTIFICATION_TEMPLATE_KEY = "debra_donation_notification";
|
||||||
|
|
||||||
|
private static final Pattern MESSAGE_PATTERN = Pattern.compile("(.*) hat (\\d{1,9},\\d{2}) Euro gespendet!<br \\/>Vielen Dank!<br \\/>Nachricht:<br \\/>(.*)");
|
||||||
|
|
||||||
|
public DonationResponseModel parseDonationFromMessage(String message) {
|
||||||
|
Matcher matcher = MESSAGE_PATTERN.matcher(message);
|
||||||
|
if (matcher.find()) {
|
||||||
|
String donatorName = matcher.group(1);
|
||||||
|
String amountString = matcher.group(2);
|
||||||
|
BigDecimal amount = new BigDecimal(amountString.replace(',', '.'));
|
||||||
|
String donationMessage = Optional.ofNullable(matcher.group(3)).map(msg -> msg.replaceAll("(<br>)+", " ")).map(String::trim).orElse("");
|
||||||
|
return DonationResponseModel
|
||||||
|
.builder()
|
||||||
|
.message(donationMessage)
|
||||||
|
.donatorName(donatorName)
|
||||||
|
.amount(amount)
|
||||||
|
.build();
|
||||||
|
} else {
|
||||||
|
throw new IllegalArgumentException("String in wrong format");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public List<DonationItemModel> getHighestDonations(DonationsResponse response, Integer maxCount) {
|
||||||
|
List<Donation> topDonations = response
|
||||||
|
.getDonations()
|
||||||
|
.stream()
|
||||||
|
.sorted(Comparator.comparing(Donation::getAmount)
|
||||||
|
.reversed())
|
||||||
|
.collect(Collectors.toList());
|
||||||
|
return topDonations
|
||||||
|
.stream()
|
||||||
|
.limit(maxCount)
|
||||||
|
.map(donation -> donationConverter.convertDonation(donation))
|
||||||
|
.collect(Collectors.toList());
|
||||||
|
}
|
||||||
|
|
||||||
|
public List<DonationItemModel> getLatestDonations(DonationsResponse response, Integer maxCount) {
|
||||||
|
return response
|
||||||
|
.getDonations()
|
||||||
|
.stream()
|
||||||
|
.limit(maxCount)
|
||||||
|
.map(donation -> donationConverter.convertDonation(donation))
|
||||||
|
.collect(Collectors.toList());
|
||||||
|
}
|
||||||
|
|
||||||
|
public DonationsResponse fetchCurrentDonationAmount(Long serverId) throws IOException {
|
||||||
|
Long fetchSize = configService.getLongValueOrConfigDefault(DEBRA_DONATION_API_FETCH_SIZE_KEY, serverId);
|
||||||
|
Request request = new Request.Builder()
|
||||||
|
.url(String.format(debraProperties.getDonationAPIUrl(), fetchSize))
|
||||||
|
.get()
|
||||||
|
.build();
|
||||||
|
Response response = okHttpClient.newCall(request).execute();
|
||||||
|
if(!response.isSuccessful()) {
|
||||||
|
if (log.isDebugEnabled()) {
|
||||||
|
log.error("Failed to retrieve urban dictionary definition. Response had code {} with body {}.",
|
||||||
|
response.code(), response.body());
|
||||||
|
}
|
||||||
|
throw new DonationAmountNotFoundException();
|
||||||
|
}
|
||||||
|
Gson gson = getGson();
|
||||||
|
|
||||||
|
return gson.fromJson(response.body().string(), DonationsResponse.class);
|
||||||
|
}
|
||||||
|
|
||||||
|
private Gson getGson() {
|
||||||
|
return new GsonBuilder()
|
||||||
|
.registerTypeAdapter(BigDecimal.class, new BigDecimalGsonAdapter())
|
||||||
|
.create();
|
||||||
|
}
|
||||||
|
|
||||||
|
private DonationsModel getDonationInfoModel(Long serverId) throws IOException {
|
||||||
|
return donationConverter.convertDonationResponse(fetchCurrentDonationAmount(serverId));
|
||||||
|
}
|
||||||
|
|
||||||
|
public CompletableFuture<Void> sendDonationNotification(DonationResponseModel donation) throws IOException {
|
||||||
|
Long targetServerId = Long.parseLong(System.getenv(DEBRA_DONATION_NOTIFICATION_SERVER_ID_ENV_NAME));
|
||||||
|
DonationsModel donationInfoModel = getDonationInfoModel(targetServerId);
|
||||||
|
DonationNotificationModel model = DonationNotificationModel
|
||||||
|
.builder()
|
||||||
|
.donation(donation)
|
||||||
|
.totalDonationAmount(donationInfoModel.getTotalAmount())
|
||||||
|
.build();
|
||||||
|
MessageToSend messageToSend = templateService.renderEmbedTemplate(DEBRA_DONATION_NOTIFICATION_TEMPLATE_KEY, model);
|
||||||
|
List<CompletableFuture<Message>> firstMessage = postTargetService.sendEmbedInPostTarget(messageToSend, DebraPostTarget.DEBRA_DONATION_NOTIFICATION, targetServerId);
|
||||||
|
List<CompletableFuture<Message>> secondMessage = postTargetService.sendEmbedInPostTarget(messageToSend, DebraPostTarget.DEBRA_DONATION_NOTIFICATION2, targetServerId);
|
||||||
|
firstMessage.addAll(secondMessage);
|
||||||
|
return FutureUtils.toSingleFutureGeneric(firstMessage);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,14 @@
|
|||||||
|
abstracto.featureFlags.debra.featureName=debra
|
||||||
|
abstracto.featureFlags.debra.enabled=false
|
||||||
|
|
||||||
|
abstracto.postTargets.debraDonationNotification.name=debraDonationNotification
|
||||||
|
abstracto.postTargets.debraDonationNotification2.name=debraDonationNotification2
|
||||||
|
|
||||||
|
sissi.debra.websocketURL=ws://spenden.baba.fm:8765/
|
||||||
|
sissi.debra.donationAPIUrl=https://www.altruja.de/api/page/discord-fuer-debra-2022?details=1&num=%s&ort=0
|
||||||
|
|
||||||
|
abstracto.systemConfigs.debraDonationNotificationDelayMillis.name=debraDonationNotificationDelayMillis
|
||||||
|
abstracto.systemConfigs.debraDonationNotificationDelayMillis.longValue=60000
|
||||||
|
|
||||||
|
abstracto.systemConfigs.debraDonationApiFetchSize.name=debraDonationApiFetchSize
|
||||||
|
abstracto.systemConfigs.debraDonationApiFetchSize.longValue=1000
|
||||||
@@ -0,0 +1,10 @@
|
|||||||
|
<?xml version="1.1" encoding="UTF-8" standalone="no"?>
|
||||||
|
<databaseChangeLog xmlns="http://www.liquibase.org/xml/ns/dbchangelog"
|
||||||
|
xmlns:ext="http://www.liquibase.org/xml/ns/dbchangelog-ext"
|
||||||
|
xmlns:pro="http://www.liquibase.org/xml/ns/pro"
|
||||||
|
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||||
|
xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog dbchangelog.xsd
|
||||||
|
http://www.liquibase.org/xml/ns/dbchangelog-ext dbchangelog.xsd
|
||||||
|
http://www.liquibase.org/xml/ns/pro dbchangelog.xsd" >
|
||||||
|
<include file="seedData/data.xml" relativeToChangelogFile="true"/>
|
||||||
|
</databaseChangeLog>
|
||||||
@@ -0,0 +1,20 @@
|
|||||||
|
<?xml version="1.1" encoding="UTF-8" standalone="no"?>
|
||||||
|
<databaseChangeLog xmlns="http://www.liquibase.org/xml/ns/dbchangelog"
|
||||||
|
xmlns:ext="http://www.liquibase.org/xml/ns/dbchangelog-ext"
|
||||||
|
xmlns:pro="http://www.liquibase.org/xml/ns/pro"
|
||||||
|
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||||
|
xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog dbchangelog.xsd
|
||||||
|
http://www.liquibase.org/xml/ns/dbchangelog-ext dbchangelog.xsd
|
||||||
|
http://www.liquibase.org/xml/ns/pro dbchangelog.xsd" >
|
||||||
|
<property name="utilityModule" value="(SELECT id FROM module WHERE name = 'utility')"/>
|
||||||
|
<property name="debraFeature" value="(SELECT id FROM feature WHERE key = 'debra')"/>
|
||||||
|
|
||||||
|
<changeSet author="Sheldan" id="debra-commands">
|
||||||
|
<insert tableName="command">
|
||||||
|
<column name="name" value="donations"/>
|
||||||
|
<column name="module_id" valueComputed="${utilityModule}"/>
|
||||||
|
<column name="feature_id" valueComputed="${debraFeature}"/>
|
||||||
|
</insert>
|
||||||
|
</changeSet>
|
||||||
|
|
||||||
|
</databaseChangeLog>
|
||||||
@@ -0,0 +1,11 @@
|
|||||||
|
<?xml version="1.1" encoding="UTF-8" standalone="no"?>
|
||||||
|
<databaseChangeLog xmlns="http://www.liquibase.org/xml/ns/dbchangelog"
|
||||||
|
xmlns:ext="http://www.liquibase.org/xml/ns/dbchangelog-ext"
|
||||||
|
xmlns:pro="http://www.liquibase.org/xml/ns/pro"
|
||||||
|
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||||
|
xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog dbchangelog.xsd
|
||||||
|
http://www.liquibase.org/xml/ns/dbchangelog-ext dbchangelog.xsd
|
||||||
|
http://www.liquibase.org/xml/ns/pro dbchangelog.xsd" >
|
||||||
|
<include file="feature.xml" relativeToChangelogFile="true"/>
|
||||||
|
<include file="command.xml" relativeToChangelogFile="true"/>
|
||||||
|
</databaseChangeLog>
|
||||||
@@ -0,0 +1,14 @@
|
|||||||
|
<?xml version="1.1" encoding="UTF-8" standalone="no"?>
|
||||||
|
<databaseChangeLog xmlns="http://www.liquibase.org/xml/ns/dbchangelog"
|
||||||
|
xmlns:ext="http://www.liquibase.org/xml/ns/dbchangelog-ext"
|
||||||
|
xmlns:pro="http://www.liquibase.org/xml/ns/pro"
|
||||||
|
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||||
|
xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog dbchangelog.xsd
|
||||||
|
http://www.liquibase.org/xml/ns/dbchangelog-ext dbchangelog.xsd
|
||||||
|
http://www.liquibase.org/xml/ns/pro dbchangelog.xsd" >
|
||||||
|
<changeSet author="Sheldan" id="debra_feature-insertion">
|
||||||
|
<insert tableName="feature">
|
||||||
|
<column name="key" value="debra"/>
|
||||||
|
</insert>
|
||||||
|
</changeSet>
|
||||||
|
</databaseChangeLog>
|
||||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,10 @@
|
|||||||
|
<?xml version="1.1" encoding="UTF-8" standalone="no"?>
|
||||||
|
<databaseChangeLog xmlns="http://www.liquibase.org/xml/ns/dbchangelog"
|
||||||
|
xmlns:ext="http://www.liquibase.org/xml/ns/dbchangelog-ext"
|
||||||
|
xmlns:pro="http://www.liquibase.org/xml/ns/pro"
|
||||||
|
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||||
|
xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog dbchangelog.xsd
|
||||||
|
http://www.liquibase.org/xml/ns/dbchangelog-ext dbchangelog.xsd
|
||||||
|
http://www.liquibase.org/xml/ns/pro dbchangelog.xsd" >
|
||||||
|
<include file="1.3.6/collection.xml" relativeToChangelogFile="true"/>
|
||||||
|
</databaseChangeLog>
|
||||||
@@ -3,7 +3,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>dev.sheldan.sissi.application</groupId>
|
<groupId>dev.sheldan.sissi.application</groupId>
|
||||||
<artifactId>sissi-modules</artifactId>
|
<artifactId>sissi-modules</artifactId>
|
||||||
<version>1.3.2</version>
|
<version>1.3.19</version>
|
||||||
</parent>
|
</parent>
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,158 @@
|
|||||||
|
package dev.sheldan.sissi.module.meetup.commands;
|
||||||
|
|
||||||
|
import dev.sheldan.abstracto.core.command.UtilityModuleDefinition;
|
||||||
|
import dev.sheldan.abstracto.core.command.condition.AbstractConditionableCommand;
|
||||||
|
import dev.sheldan.abstracto.core.command.config.CommandConfiguration;
|
||||||
|
import dev.sheldan.abstracto.core.command.config.HelpInfo;
|
||||||
|
import dev.sheldan.abstracto.core.command.config.Parameter;
|
||||||
|
import dev.sheldan.abstracto.core.command.execution.CommandContext;
|
||||||
|
import dev.sheldan.abstracto.core.command.execution.CommandResult;
|
||||||
|
import dev.sheldan.abstracto.core.config.FeatureDefinition;
|
||||||
|
import dev.sheldan.abstracto.core.interaction.InteractionService;
|
||||||
|
import dev.sheldan.abstracto.core.interaction.slash.SlashCommandConfig;
|
||||||
|
import dev.sheldan.abstracto.core.interaction.slash.parameter.SlashCommandParameterService;
|
||||||
|
import dev.sheldan.sissi.module.meetup.config.MeetupFeatureDefinition;
|
||||||
|
import dev.sheldan.sissi.module.meetup.config.MeetupSlashCommandNames;
|
||||||
|
import dev.sheldan.sissi.module.meetup.exception.NotMeetupOrganizerException;
|
||||||
|
import dev.sheldan.sissi.module.meetup.model.database.Meetup;
|
||||||
|
import dev.sheldan.sissi.module.meetup.service.MeetupServiceBean;
|
||||||
|
import dev.sheldan.sissi.module.meetup.service.management.MeetupManagementServiceBean;
|
||||||
|
import net.dv8tion.jda.api.events.interaction.command.SlashCommandInteractionEvent;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.stereotype.Component;
|
||||||
|
|
||||||
|
import java.util.Arrays;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.concurrent.CompletableFuture;
|
||||||
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
|
@Component
|
||||||
|
public class ChangeMeetup extends AbstractConditionableCommand {
|
||||||
|
|
||||||
|
private static final String CHANGE_MEETUP_COMMAND = "changeMeetup";
|
||||||
|
private static final String MEETUP_ID_PARAMETER = "meetupId";
|
||||||
|
private static final String MEETUP_NEW_VALUE_PARAMETER = "newValue";
|
||||||
|
private static final String MEETUP_PROPERTY_PARAMETER = "property";
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private SlashCommandParameterService slashCommandParameterService;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private MeetupManagementServiceBean meetupManagementServiceBean;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private MeetupServiceBean meetupServiceBean;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private InteractionService interactionService;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public CompletableFuture<CommandResult> executeAsync(CommandContext commandContext) {
|
||||||
|
List<Object> parameters = commandContext.getParameters().getParameters();
|
||||||
|
Long meetupId = (Long) parameters.get(0);
|
||||||
|
Meetup meetup = meetupManagementServiceBean.getMeetup(meetupId, commandContext.getGuild().getIdLong());
|
||||||
|
if(!meetup.getOrganizer().getUserReference().getId().equals(commandContext.getAuthor().getIdLong())) {
|
||||||
|
throw new NotMeetupOrganizerException();
|
||||||
|
}
|
||||||
|
String property = (String) parameters.get(1);
|
||||||
|
MeetupProperty propertyEnum = MeetupProperty.valueOf(property);
|
||||||
|
String newValue = (String) parameters.get(2);
|
||||||
|
return updateMeetup(meetup, propertyEnum, newValue).thenApply(unused -> CommandResult.fromSuccess());
|
||||||
|
}
|
||||||
|
|
||||||
|
private CompletableFuture<Void> updateMeetup(Meetup meetup, MeetupProperty propertyEnum, String newValue) {
|
||||||
|
CompletableFuture<Void> future;
|
||||||
|
switch (propertyEnum) {
|
||||||
|
case TOPIC:
|
||||||
|
future = meetupServiceBean.changeMeetupTopic(meetup, newValue);
|
||||||
|
break;
|
||||||
|
case LOCATION:
|
||||||
|
future = meetupServiceBean.changeMeetupLocation(meetup, newValue);
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
case DESCRIPTION:
|
||||||
|
future = meetupServiceBean.changeMeetupDescription(meetup, newValue);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
return future;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public CompletableFuture<CommandResult> executeSlash(SlashCommandInteractionEvent event) {
|
||||||
|
Long meetupId = slashCommandParameterService.getCommandOption(MEETUP_ID_PARAMETER, event, Integer.class).longValue();
|
||||||
|
Meetup meetup = meetupManagementServiceBean.getMeetup(meetupId, event.getGuild().getIdLong());
|
||||||
|
if(!meetup.getOrganizer().getUserReference().getId().equals(event.getMember().getIdLong())) {
|
||||||
|
throw new NotMeetupOrganizerException();
|
||||||
|
}
|
||||||
|
String newValue = slashCommandParameterService.getCommandOption(MEETUP_NEW_VALUE_PARAMETER, event, String.class);
|
||||||
|
String property = slashCommandParameterService.getCommandOption(MEETUP_PROPERTY_PARAMETER, event, String.class);
|
||||||
|
MeetupProperty propertyEnum = MeetupProperty.valueOf(property);
|
||||||
|
return updateMeetup(meetup, propertyEnum, newValue)
|
||||||
|
.thenCompose(commandResult -> interactionService.replyEmbed("changeMeetup_response", event))
|
||||||
|
.thenApply(unused -> CommandResult.fromSuccess());
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public CommandConfiguration getConfiguration() {
|
||||||
|
Parameter meetupIdParameter = Parameter
|
||||||
|
.builder()
|
||||||
|
.templated(true)
|
||||||
|
.name(MEETUP_ID_PARAMETER)
|
||||||
|
.type(Long.class)
|
||||||
|
.build();
|
||||||
|
|
||||||
|
List<String> meetupProperties = Arrays
|
||||||
|
.stream(MeetupProperty.values())
|
||||||
|
.map(Enum::name)
|
||||||
|
.collect(Collectors.toList());
|
||||||
|
|
||||||
|
Parameter meetupPropertyParameter = Parameter
|
||||||
|
.builder()
|
||||||
|
.templated(true)
|
||||||
|
.name(MEETUP_PROPERTY_PARAMETER)
|
||||||
|
.type(String.class)
|
||||||
|
.choices(meetupProperties)
|
||||||
|
.build();
|
||||||
|
|
||||||
|
Parameter newValueParameter = Parameter
|
||||||
|
.builder()
|
||||||
|
.templated(true)
|
||||||
|
.name(MEETUP_NEW_VALUE_PARAMETER)
|
||||||
|
.type(String.class)
|
||||||
|
.build();
|
||||||
|
|
||||||
|
List<Parameter> parameters = Arrays.asList(meetupIdParameter, meetupPropertyParameter, newValueParameter);
|
||||||
|
HelpInfo helpInfo = HelpInfo
|
||||||
|
.builder()
|
||||||
|
.templated(true)
|
||||||
|
.build();
|
||||||
|
|
||||||
|
SlashCommandConfig slashCommandConfig = SlashCommandConfig
|
||||||
|
.builder()
|
||||||
|
.enabled(true)
|
||||||
|
.rootCommandName(MeetupSlashCommandNames.MEETUP)
|
||||||
|
.commandName("changeMeetup")
|
||||||
|
.build();
|
||||||
|
|
||||||
|
return CommandConfiguration.builder()
|
||||||
|
.name(CHANGE_MEETUP_COMMAND)
|
||||||
|
.module(UtilityModuleDefinition.UTILITY)
|
||||||
|
.templated(true)
|
||||||
|
.async(true)
|
||||||
|
.slashCommandConfig(slashCommandConfig)
|
||||||
|
.supportsEmbedException(true)
|
||||||
|
.causesReaction(true)
|
||||||
|
.parameters(parameters)
|
||||||
|
.help(helpInfo)
|
||||||
|
.build();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public FeatureDefinition getFeature() {
|
||||||
|
return MeetupFeatureDefinition.MEETUP;
|
||||||
|
}
|
||||||
|
|
||||||
|
public enum MeetupProperty {
|
||||||
|
DESCRIPTION, TOPIC, LOCATION
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -71,6 +71,7 @@ public class CreateMeetup extends AbstractConditionableCommand {
|
|||||||
private static final String MEETUP_TIME_PARAMETER = "meetupTime";
|
private static final String MEETUP_TIME_PARAMETER = "meetupTime";
|
||||||
private static final String TOPIC_PARAMETER = "topic";
|
private static final String TOPIC_PARAMETER = "topic";
|
||||||
private static final String DESCRIPTION_PARAMETER = "description";
|
private static final String DESCRIPTION_PARAMETER = "description";
|
||||||
|
private static final String LOCATION_PARAMETER = "location";
|
||||||
private static final String CONFIRMATION_TEMPLATE = "createMeetup_confirmation";
|
private static final String CONFIRMATION_TEMPLATE = "createMeetup_confirmation";
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -86,7 +87,7 @@ public class CreateMeetup extends AbstractConditionableCommand {
|
|||||||
}
|
}
|
||||||
AUserInAServer organizer = userInServerManagementService.loadOrCreateUser(commandContext.getAuthor());
|
AUserInAServer organizer = userInServerManagementService.loadOrCreateUser(commandContext.getAuthor());
|
||||||
AChannel meetupChannel = channelManagementService.loadChannel(commandContext.getChannel().getIdLong());
|
AChannel meetupChannel = channelManagementService.loadChannel(commandContext.getChannel().getIdLong());
|
||||||
Meetup meetup = meetupManagementServiceBean.createMeetup(meetupTime, meetupTopic, description, organizer, meetupChannel);
|
Meetup meetup = meetupManagementServiceBean.createMeetup(meetupTime, meetupTopic, description, organizer, meetupChannel, null);
|
||||||
String confirmationId = componentService.generateComponentId();
|
String confirmationId = componentService.generateComponentId();
|
||||||
String cancelId = componentService.generateComponentId();
|
String cancelId = componentService.generateComponentId();
|
||||||
MeetupConfirmationModel model = MeetupConfirmationModel
|
MeetupConfirmationModel model = MeetupConfirmationModel
|
||||||
@@ -95,6 +96,7 @@ public class CreateMeetup extends AbstractConditionableCommand {
|
|||||||
.guildId(commandContext.getGuild().getIdLong())
|
.guildId(commandContext.getGuild().getIdLong())
|
||||||
.description(description)
|
.description(description)
|
||||||
.topic(meetupTopic)
|
.topic(meetupTopic)
|
||||||
|
.location(meetup.getLocation())
|
||||||
.confirmationId(confirmationId)
|
.confirmationId(confirmationId)
|
||||||
.cancelId(cancelId)
|
.cancelId(cancelId)
|
||||||
.meetupId(meetup.getId().getId())
|
.meetupId(meetup.getId().getId())
|
||||||
@@ -117,10 +119,17 @@ public class CreateMeetup extends AbstractConditionableCommand {
|
|||||||
} else {
|
} else {
|
||||||
description = "";
|
description = "";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
String location;
|
||||||
|
if(slashCommandParameterService.hasCommandOption(LOCATION_PARAMETER, event)) {
|
||||||
|
location = slashCommandParameterService.getCommandOption(LOCATION_PARAMETER, event, String.class);
|
||||||
|
} else {
|
||||||
|
location = null;
|
||||||
|
}
|
||||||
Instant meetupTime = Instant.ofEpochSecond(time);
|
Instant meetupTime = Instant.ofEpochSecond(time);
|
||||||
AUserInAServer organizer = userInServerManagementService.loadOrCreateUser(event.getMember());
|
AUserInAServer organizer = userInServerManagementService.loadOrCreateUser(event.getMember());
|
||||||
AChannel meetupChannel = channelManagementService.loadChannel(event.getChannel().getIdLong());
|
AChannel meetupChannel = channelManagementService.loadChannel(event.getChannel().getIdLong());
|
||||||
Meetup meetup = meetupManagementServiceBean.createMeetup(meetupTime, topic, description, organizer, meetupChannel);
|
Meetup meetup = meetupManagementServiceBean.createMeetup(meetupTime, topic, description, organizer, meetupChannel, location);
|
||||||
String confirmationId = componentService.generateComponentId();
|
String confirmationId = componentService.generateComponentId();
|
||||||
String cancelId = componentService.generateComponentId();
|
String cancelId = componentService.generateComponentId();
|
||||||
MeetupConfirmationModel model = MeetupConfirmationModel
|
MeetupConfirmationModel model = MeetupConfirmationModel
|
||||||
@@ -129,6 +138,7 @@ public class CreateMeetup extends AbstractConditionableCommand {
|
|||||||
.guildId(event.getGuild().getIdLong())
|
.guildId(event.getGuild().getIdLong())
|
||||||
.description(description)
|
.description(description)
|
||||||
.topic(topic)
|
.topic(topic)
|
||||||
|
.location(meetup.getLocation())
|
||||||
.confirmationId(confirmationId)
|
.confirmationId(confirmationId)
|
||||||
.cancelId(cancelId)
|
.cancelId(cancelId)
|
||||||
.meetupId(meetup.getId().getId())
|
.meetupId(meetup.getId().getId())
|
||||||
@@ -166,7 +176,17 @@ public class CreateMeetup extends AbstractConditionableCommand {
|
|||||||
.type(String.class)
|
.type(String.class)
|
||||||
.build();
|
.build();
|
||||||
|
|
||||||
List<Parameter> parameters = Arrays.asList(timeParameter, topicParameter, descriptionParameter);
|
Parameter locationParameter = Parameter
|
||||||
|
.builder()
|
||||||
|
.templated(true)
|
||||||
|
.name(LOCATION_PARAMETER)
|
||||||
|
.remainder(true)
|
||||||
|
.optional(true)
|
||||||
|
.slashCommandOnly(true)
|
||||||
|
.type(String.class)
|
||||||
|
.build();
|
||||||
|
|
||||||
|
List<Parameter> parameters = Arrays.asList(timeParameter, topicParameter, descriptionParameter, locationParameter);
|
||||||
HelpInfo helpInfo = HelpInfo
|
HelpInfo helpInfo = HelpInfo
|
||||||
.builder()
|
.builder()
|
||||||
.templated(true)
|
.templated(true)
|
||||||
|
|||||||
@@ -15,6 +15,7 @@ import dev.sheldan.sissi.module.meetup.config.MeetupFeatureDefinition;
|
|||||||
import dev.sheldan.sissi.module.meetup.config.MeetupSlashCommandNames;
|
import dev.sheldan.sissi.module.meetup.config.MeetupSlashCommandNames;
|
||||||
import dev.sheldan.sissi.module.meetup.exception.NotMeetupOrganizerException;
|
import dev.sheldan.sissi.module.meetup.exception.NotMeetupOrganizerException;
|
||||||
import dev.sheldan.sissi.module.meetup.model.database.Meetup;
|
import dev.sheldan.sissi.module.meetup.model.database.Meetup;
|
||||||
|
import dev.sheldan.sissi.module.meetup.model.database.MeetupDecision;
|
||||||
import dev.sheldan.sissi.module.meetup.service.MeetupServiceBean;
|
import dev.sheldan.sissi.module.meetup.service.MeetupServiceBean;
|
||||||
import dev.sheldan.sissi.module.meetup.service.management.MeetupManagementServiceBean;
|
import dev.sheldan.sissi.module.meetup.service.management.MeetupManagementServiceBean;
|
||||||
import net.dv8tion.jda.api.events.interaction.command.SlashCommandInteractionEvent;
|
import net.dv8tion.jda.api.events.interaction.command.SlashCommandInteractionEvent;
|
||||||
@@ -24,6 +25,7 @@ import org.springframework.stereotype.Component;
|
|||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.concurrent.CompletableFuture;
|
import java.util.concurrent.CompletableFuture;
|
||||||
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
@Component
|
@Component
|
||||||
public class NotifyMeetupParticipants extends AbstractConditionableCommand {
|
public class NotifyMeetupParticipants extends AbstractConditionableCommand {
|
||||||
@@ -42,6 +44,7 @@ public class NotifyMeetupParticipants extends AbstractConditionableCommand {
|
|||||||
|
|
||||||
private static final String MEETUP_ID_PARAMETER = "meetupId";
|
private static final String MEETUP_ID_PARAMETER = "meetupId";
|
||||||
private static final String NOTIFICATION_MESSAGE_PARAMETER = "notificationMessage";
|
private static final String NOTIFICATION_MESSAGE_PARAMETER = "notificationMessage";
|
||||||
|
private static final String NOTIFICATION_MEETUP_DECISION = "decision";
|
||||||
private static final String NOTIFY_MEETUP_PARTICIPANTS_COMMAND = "notifyMeetupParticipants";
|
private static final String NOTIFY_MEETUP_PARTICIPANTS_COMMAND = "notifyMeetupParticipants";
|
||||||
private static final String NOTIFY_MEETUP_PARTICIPANTS_RESPONSE = "notifyMeetupParticipants_response";
|
private static final String NOTIFY_MEETUP_PARTICIPANTS_RESPONSE = "notifyMeetupParticipants_response";
|
||||||
|
|
||||||
@@ -54,7 +57,7 @@ public class NotifyMeetupParticipants extends AbstractConditionableCommand {
|
|||||||
throw new NotMeetupOrganizerException();
|
throw new NotMeetupOrganizerException();
|
||||||
}
|
}
|
||||||
String notificationMessage = (String) parameters.get(1);
|
String notificationMessage = (String) parameters.get(1);
|
||||||
return meetupServiceBean.notifyMeetupParticipants(meetup, notificationMessage)
|
return meetupServiceBean.notifyMeetupParticipants(meetup, notificationMessage, null)
|
||||||
.thenApply(unused -> CommandResult.fromSuccess());
|
.thenApply(unused -> CommandResult.fromSuccess());
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -65,8 +68,12 @@ public class NotifyMeetupParticipants extends AbstractConditionableCommand {
|
|||||||
if(!meetup.getOrganizer().getUserReference().getId().equals(event.getMember().getIdLong())) {
|
if(!meetup.getOrganizer().getUserReference().getId().equals(event.getMember().getIdLong())) {
|
||||||
throw new NotMeetupOrganizerException();
|
throw new NotMeetupOrganizerException();
|
||||||
}
|
}
|
||||||
|
MeetupDecision toNotify = null;
|
||||||
|
if(slashCommandParameterService.hasCommandOption(NOTIFICATION_MEETUP_DECISION, event)) {
|
||||||
|
toNotify = MeetupDecision.valueOf(slashCommandParameterService.getCommandOption(NOTIFICATION_MEETUP_DECISION, event, String.class));
|
||||||
|
}
|
||||||
String notificationMessage = slashCommandParameterService.getCommandOption(NOTIFICATION_MESSAGE_PARAMETER, event, String.class);
|
String notificationMessage = slashCommandParameterService.getCommandOption(NOTIFICATION_MESSAGE_PARAMETER, event, String.class);
|
||||||
return meetupServiceBean.notifyMeetupParticipants(meetup, notificationMessage)
|
return meetupServiceBean.notifyMeetupParticipants(meetup, notificationMessage, toNotify)
|
||||||
.thenCompose(unused -> interactionService.replyEmbed(NOTIFY_MEETUP_PARTICIPANTS_RESPONSE, event))
|
.thenCompose(unused -> interactionService.replyEmbed(NOTIFY_MEETUP_PARTICIPANTS_RESPONSE, event))
|
||||||
.thenApply(unused -> CommandResult.fromSuccess());
|
.thenApply(unused -> CommandResult.fromSuccess());
|
||||||
}
|
}
|
||||||
@@ -88,7 +95,22 @@ public class NotifyMeetupParticipants extends AbstractConditionableCommand {
|
|||||||
.remainder(true)
|
.remainder(true)
|
||||||
.build();
|
.build();
|
||||||
|
|
||||||
List<Parameter> parameters = Arrays.asList(meetupIdParameter, notificationMessage);
|
List<String> meetupDecisions = Arrays
|
||||||
|
.stream(MeetupDecision.values())
|
||||||
|
.map(Enum::name)
|
||||||
|
.collect(Collectors.toList());
|
||||||
|
|
||||||
|
Parameter meetupDecisionChoice = Parameter
|
||||||
|
.builder()
|
||||||
|
.templated(true)
|
||||||
|
.name(NOTIFICATION_MEETUP_DECISION)
|
||||||
|
.type(String.class)
|
||||||
|
.optional(true)
|
||||||
|
.choices(meetupDecisions)
|
||||||
|
.slashCommandOnly(true)
|
||||||
|
.build();
|
||||||
|
|
||||||
|
List<Parameter> parameters = Arrays.asList(meetupIdParameter, notificationMessage, meetupDecisionChoice);
|
||||||
HelpInfo helpInfo = HelpInfo
|
HelpInfo helpInfo = HelpInfo
|
||||||
.builder()
|
.builder()
|
||||||
.templated(true)
|
.templated(true)
|
||||||
|
|||||||
@@ -104,6 +104,10 @@ public class MeetupConfirmationListener implements ButtonClickedListener {
|
|||||||
messageModel.setNoId(noButtonId);
|
messageModel.setNoId(noButtonId);
|
||||||
messageModel.setMaybeId(maybeButtonId);
|
messageModel.setMaybeId(maybeButtonId);
|
||||||
messageModel.setNoTimeId(noTimeButtonId);
|
messageModel.setNoTimeId(noTimeButtonId);
|
||||||
|
meetup.setYesButtonId(yesButtonId);
|
||||||
|
meetup.setMaybeButtonId(maybeButtonId);
|
||||||
|
meetup.setNoTimeButtonId(noTimeButtonId);
|
||||||
|
meetup.setNotInterestedButtonId(noButtonId);
|
||||||
messageModel.setCancelled(false);
|
messageModel.setCancelled(false);
|
||||||
Long meetupId = payload.getMeetupId();
|
Long meetupId = payload.getMeetupId();
|
||||||
Long serverId = payload.getGuildId();
|
Long serverId = payload.getGuildId();
|
||||||
|
|||||||
@@ -14,6 +14,7 @@ public class MeetupConfirmationModel {
|
|||||||
private MemberDisplay organizer;
|
private MemberDisplay organizer;
|
||||||
private Instant meetupTime;
|
private Instant meetupTime;
|
||||||
private Long meetupId;
|
private Long meetupId;
|
||||||
|
private String location;
|
||||||
private String topic;
|
private String topic;
|
||||||
private String description;
|
private String description;
|
||||||
private Long guildId;
|
private Long guildId;
|
||||||
|
|||||||
@@ -43,6 +43,26 @@ public class Meetup {
|
|||||||
@Column(name = "message_id")
|
@Column(name = "message_id")
|
||||||
private Long messageId;
|
private Long messageId;
|
||||||
|
|
||||||
|
@Getter
|
||||||
|
@Column(name = "location")
|
||||||
|
private String location;
|
||||||
|
|
||||||
|
@Getter
|
||||||
|
@Column(name = "yes_button_id")
|
||||||
|
private String yesButtonId;
|
||||||
|
|
||||||
|
@Getter
|
||||||
|
@Column(name = "maybe_button_id")
|
||||||
|
private String maybeButtonId;
|
||||||
|
|
||||||
|
@Getter
|
||||||
|
@Column(name = "no_time_button_id")
|
||||||
|
private String noTimeButtonId;
|
||||||
|
|
||||||
|
@Getter
|
||||||
|
@Column(name = "not_interested_button_id")
|
||||||
|
private String notInterestedButtonId;
|
||||||
|
|
||||||
@OneToMany(
|
@OneToMany(
|
||||||
fetch = FetchType.LAZY,
|
fetch = FetchType.LAZY,
|
||||||
orphanRemoval = true,
|
orphanRemoval = true,
|
||||||
|
|||||||
@@ -15,6 +15,7 @@ public class MeetupMessageModel {
|
|||||||
private String topic;
|
private String topic;
|
||||||
private String description;
|
private String description;
|
||||||
private Instant meetupTime;
|
private Instant meetupTime;
|
||||||
|
private String location;
|
||||||
private MemberDisplay organizer;
|
private MemberDisplay organizer;
|
||||||
private Long meetupId;
|
private Long meetupId;
|
||||||
private String yesId;
|
private String yesId;
|
||||||
|
|||||||
@@ -11,4 +11,7 @@ import java.util.List;
|
|||||||
public class MeetupNotificationModel {
|
public class MeetupNotificationModel {
|
||||||
private List<MemberDisplay> participants;
|
private List<MemberDisplay> participants;
|
||||||
private String notificationMessage;
|
private String notificationMessage;
|
||||||
|
private Long meetupMessageId;
|
||||||
|
private String meetupTopic;
|
||||||
|
private Long meetupId;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
package dev.sheldan.sissi.module.meetup.service;
|
package dev.sheldan.sissi.module.meetup.service;
|
||||||
|
|
||||||
|
import dev.sheldan.abstracto.core.exception.AbstractoRunTimeException;
|
||||||
import dev.sheldan.abstracto.core.interaction.ComponentPayloadManagementService;
|
import dev.sheldan.abstracto.core.interaction.ComponentPayloadManagementService;
|
||||||
import dev.sheldan.abstracto.core.interaction.ComponentPayloadService;
|
import dev.sheldan.abstracto.core.interaction.ComponentPayloadService;
|
||||||
import dev.sheldan.abstracto.core.models.ServerChannelMessage;
|
import dev.sheldan.abstracto.core.models.ServerChannelMessage;
|
||||||
@@ -27,12 +28,15 @@ import dev.sheldan.sissi.module.meetup.service.management.MeetupComponentManagem
|
|||||||
import dev.sheldan.sissi.module.meetup.service.management.MeetupManagementServiceBean;
|
import dev.sheldan.sissi.module.meetup.service.management.MeetupManagementServiceBean;
|
||||||
import dev.sheldan.sissi.module.meetup.service.management.MeetupParticipatorManagementServiceBean;
|
import dev.sheldan.sissi.module.meetup.service.management.MeetupParticipatorManagementServiceBean;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import net.dv8tion.jda.api.entities.GuildMessageChannel;
|
import net.dv8tion.jda.api.entities.channel.middleman.GuildMessageChannel;
|
||||||
import net.dv8tion.jda.api.entities.MessageChannel;
|
import net.dv8tion.jda.api.entities.channel.middleman.MessageChannel;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.stereotype.Component;
|
import org.springframework.stereotype.Component;
|
||||||
import org.springframework.transaction.annotation.Transactional;
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
|
||||||
|
import java.io.UnsupportedEncodingException;
|
||||||
|
import java.net.URLEncoder;
|
||||||
|
import java.nio.charset.StandardCharsets;
|
||||||
import java.time.Instant;
|
import java.time.Instant;
|
||||||
import java.time.temporal.ChronoUnit;
|
import java.time.temporal.ChronoUnit;
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
@@ -145,6 +149,11 @@ public class MeetupServiceBean {
|
|||||||
.builder()
|
.builder()
|
||||||
.description(meetup.getDescription())
|
.description(meetup.getDescription())
|
||||||
.topic(meetup.getTopic())
|
.topic(meetup.getTopic())
|
||||||
|
.location(meetup.getLocation())
|
||||||
|
.noTimeId(meetup.getNoTimeButtonId())
|
||||||
|
.yesId(meetup.getYesButtonId())
|
||||||
|
.maybeId(meetup.getMaybeButtonId())
|
||||||
|
.noId(meetup.getNotInterestedButtonId())
|
||||||
.meetupTime(meetup.getMeetupTime())
|
.meetupTime(meetup.getMeetupTime())
|
||||||
.meetupId(meetup.getId().getId())
|
.meetupId(meetup.getId().getId())
|
||||||
.participants(getMemberDisplays(participating))
|
.participants(getMemberDisplays(participating))
|
||||||
@@ -250,8 +259,8 @@ public class MeetupServiceBean {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public CompletableFuture<Void> notifyMeetupParticipants(Meetup meetup, String message) {
|
public CompletableFuture<Void> notifyMeetupParticipants(Meetup meetup, String message, MeetupDecision toNotify) {
|
||||||
List<MeetupDecision> decisionsToBeNotified = Arrays.asList(MeetupDecision.MAYBE, MeetupDecision.YES);
|
List<MeetupDecision> decisionsToBeNotified = toNotify == null ? Arrays.asList(MeetupDecision.MAYBE, MeetupDecision.YES) : Arrays.asList(toNotify);
|
||||||
List<MemberDisplay> participants = meetup
|
List<MemberDisplay> participants = meetup
|
||||||
.getParticipants()
|
.getParticipants()
|
||||||
.stream()
|
.stream()
|
||||||
@@ -262,6 +271,9 @@ public class MeetupServiceBean {
|
|||||||
MeetupNotificationModel model = MeetupNotificationModel
|
MeetupNotificationModel model = MeetupNotificationModel
|
||||||
.builder()
|
.builder()
|
||||||
.notificationMessage(message)
|
.notificationMessage(message)
|
||||||
|
.meetupId(meetup.getId().getId())
|
||||||
|
.meetupMessageId(meetup.getMessageId())
|
||||||
|
.meetupTopic(meetup.getTopic())
|
||||||
.participants(participants)
|
.participants(participants)
|
||||||
.build();
|
.build();
|
||||||
MessageChannel channel = channelService.getMessageChannelFromServer(meetup.getServer().getId(), meetup.getMeetupChannel().getId());
|
MessageChannel channel = channelService.getMessageChannelFromServer(meetup.getServer().getId(), meetup.getMeetupChannel().getId());
|
||||||
@@ -292,7 +304,7 @@ public class MeetupServiceBean {
|
|||||||
public void cleanupMeetups() {
|
public void cleanupMeetups() {
|
||||||
Instant time = Instant.now().minus(1, ChronoUnit.DAYS);
|
Instant time = Instant.now().minus(1, ChronoUnit.DAYS);
|
||||||
List<Meetup> oldMeetups = meetupManagementServiceBean.getMeetupsOlderThan(time);
|
List<Meetup> oldMeetups = meetupManagementServiceBean.getMeetupsOlderThan(time);
|
||||||
log.info("Deleting {} old meetup.s", oldMeetups.size());
|
log.info("Deleting {} old meetups.", oldMeetups.size());
|
||||||
deleteMeetups(oldMeetups);
|
deleteMeetups(oldMeetups);
|
||||||
List<Meetup> cancelledMeetups = meetupManagementServiceBean.findCancelledMeetups();
|
List<Meetup> cancelledMeetups = meetupManagementServiceBean.findCancelledMeetups();
|
||||||
log.info("Deleting {} cancelled meetups.", cancelledMeetups.size());
|
log.info("Deleting {} cancelled meetups.", cancelledMeetups.size());
|
||||||
@@ -386,4 +398,37 @@ public class MeetupServiceBean {
|
|||||||
return null;
|
return null;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public CompletableFuture<Void> changeMeetupDescription(Meetup meetup, String newDescription) {
|
||||||
|
meetup.setDescription(newDescription);
|
||||||
|
return updateMeetupMessage(meetup);
|
||||||
|
}
|
||||||
|
|
||||||
|
public CompletableFuture<Void> changeMeetupLocation(Meetup meetup, String newLocation) {
|
||||||
|
try {
|
||||||
|
meetup.setLocation(URLEncoder.encode(newLocation, StandardCharsets.UTF_8.toString()));
|
||||||
|
} catch (UnsupportedEncodingException e) {
|
||||||
|
throw new AbstractoRunTimeException(e);
|
||||||
|
}
|
||||||
|
return updateMeetupMessage(meetup);
|
||||||
|
}
|
||||||
|
|
||||||
|
public CompletableFuture<Void> changeMeetupTopic(Meetup meetup, String newTopic) {
|
||||||
|
meetup.setTopic(newTopic);
|
||||||
|
return updateMeetupMessage(meetup);
|
||||||
|
}
|
||||||
|
|
||||||
|
private CompletableFuture<Void> updateMeetupMessage(Meetup meetup) {
|
||||||
|
Long meetupId = meetup.getId().getId();
|
||||||
|
Long serverId = meetup.getId().getServerId();
|
||||||
|
MeetupMessageModel meetupMessageModel = getMeetupMessageModel(meetup);
|
||||||
|
MessageToSend updatedMeetupMessage = getMeetupMessage(meetupMessageModel);
|
||||||
|
GuildMessageChannel meetupChannel = channelService.getMessageChannelFromServer(serverId, meetup.getMeetupChannel().getId());
|
||||||
|
return channelService.editMessageInAChannelFuture(updatedMeetupMessage, meetupChannel, meetup.getMessageId())
|
||||||
|
.thenAccept(message -> log.info("Updated message of meetup {} in channel {} in server {}.", meetupId, meetup.getMeetupChannel().getId(), serverId))
|
||||||
|
.exceptionally(throwable -> {
|
||||||
|
log.info("Failed to update message of meetup {} in channel {} in server {}.", meetupId, meetup.getMeetupChannel().getId(), serverId, throwable);
|
||||||
|
return null;
|
||||||
|
});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
package dev.sheldan.sissi.module.meetup.service.management;
|
package dev.sheldan.sissi.module.meetup.service.management;
|
||||||
|
|
||||||
|
import dev.sheldan.abstracto.core.exception.AbstractoRunTimeException;
|
||||||
import dev.sheldan.abstracto.core.models.ServerSpecificId;
|
import dev.sheldan.abstracto.core.models.ServerSpecificId;
|
||||||
import dev.sheldan.abstracto.core.models.database.AChannel;
|
import dev.sheldan.abstracto.core.models.database.AChannel;
|
||||||
import dev.sheldan.abstracto.core.models.database.AUserInAServer;
|
import dev.sheldan.abstracto.core.models.database.AUserInAServer;
|
||||||
@@ -12,6 +13,9 @@ import dev.sheldan.sissi.module.meetup.repository.MeetupRepository;
|
|||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.stereotype.Component;
|
import org.springframework.stereotype.Component;
|
||||||
|
|
||||||
|
import java.io.UnsupportedEncodingException;
|
||||||
|
import java.net.URLEncoder;
|
||||||
|
import java.nio.charset.StandardCharsets;
|
||||||
import java.time.Instant;
|
import java.time.Instant;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
@@ -26,22 +30,28 @@ public class MeetupManagementServiceBean {
|
|||||||
|
|
||||||
public static final String MEETUP_COUNTER_KEY = "meetup";
|
public static final String MEETUP_COUNTER_KEY = "meetup";
|
||||||
|
|
||||||
public Meetup createMeetup(Instant timeStamp, String topic, String description, AUserInAServer organizer, AChannel meetupChannel) {
|
public Meetup createMeetup(Instant timeStamp, String topic, String description, AUserInAServer organizer, AChannel meetupChannel, String location) {
|
||||||
if(timeStamp.isBefore(Instant.now())) {
|
if(timeStamp.isBefore(Instant.now())) {
|
||||||
throw new MeetupPastTimeException();
|
throw new MeetupPastTimeException();
|
||||||
}
|
}
|
||||||
Long meetupId = counterService.getNextCounterValue(organizer.getServerReference(), MEETUP_COUNTER_KEY);
|
Long meetupId = counterService.getNextCounterValue(organizer.getServerReference(), MEETUP_COUNTER_KEY);
|
||||||
Meetup meetup = Meetup
|
Meetup meetup = null;
|
||||||
.builder()
|
try {
|
||||||
.meetupTime(timeStamp)
|
meetup = Meetup
|
||||||
.description(description)
|
.builder()
|
||||||
.topic(topic)
|
.meetupTime(timeStamp)
|
||||||
.organizer(organizer)
|
.description(description)
|
||||||
.server(organizer.getServerReference())
|
.topic(topic)
|
||||||
.meetupChannel(meetupChannel)
|
.location(URLEncoder.encode(location, StandardCharsets.UTF_8.toString()))
|
||||||
.state(MeetupState.NEW)
|
.organizer(organizer)
|
||||||
.id(new ServerSpecificId(organizer.getServerReference().getId(), meetupId))
|
.server(organizer.getServerReference())
|
||||||
.build();
|
.meetupChannel(meetupChannel)
|
||||||
|
.state(MeetupState.NEW)
|
||||||
|
.id(new ServerSpecificId(organizer.getServerReference().getId(), meetupId))
|
||||||
|
.build();
|
||||||
|
} catch (UnsupportedEncodingException e) {
|
||||||
|
throw new AbstractoRunTimeException(e);
|
||||||
|
}
|
||||||
return meetupRepository.save(meetup);
|
return meetupRepository.save(meetup);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,11 @@
|
|||||||
|
<?xml version="1.1" encoding="UTF-8" standalone="no"?>
|
||||||
|
<databaseChangeLog xmlns="http://www.liquibase.org/xml/ns/dbchangelog"
|
||||||
|
xmlns:ext="http://www.liquibase.org/xml/ns/dbchangelog-ext"
|
||||||
|
xmlns:pro="http://www.liquibase.org/xml/ns/pro"
|
||||||
|
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||||
|
xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog dbchangelog.xsd
|
||||||
|
http://www.liquibase.org/xml/ns/dbchangelog-ext dbchangelog.xsd
|
||||||
|
http://www.liquibase.org/xml/ns/pro dbchangelog.xsd" >
|
||||||
|
<include file="tables/tables.xml" relativeToChangelogFile="true"/>
|
||||||
|
<include file="seedData/data.xml" relativeToChangelogFile="true"/>
|
||||||
|
</databaseChangeLog>
|
||||||
@@ -0,0 +1,20 @@
|
|||||||
|
<?xml version="1.1" encoding="UTF-8" standalone="no"?>
|
||||||
|
<databaseChangeLog xmlns="http://www.liquibase.org/xml/ns/dbchangelog"
|
||||||
|
xmlns:ext="http://www.liquibase.org/xml/ns/dbchangelog-ext"
|
||||||
|
xmlns:pro="http://www.liquibase.org/xml/ns/pro"
|
||||||
|
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||||
|
xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog dbchangelog.xsd
|
||||||
|
http://www.liquibase.org/xml/ns/dbchangelog-ext dbchangelog.xsd
|
||||||
|
http://www.liquibase.org/xml/ns/pro dbchangelog.xsd" >
|
||||||
|
<property name="utilityModule" value="(SELECT id FROM module WHERE name = 'utility')"/>
|
||||||
|
<property name="meetupFeature" value="(SELECT id FROM feature WHERE key = 'meetup')"/>
|
||||||
|
|
||||||
|
<changeSet author="Sheldan" id="meetup-change_command">
|
||||||
|
<insert tableName="command">
|
||||||
|
<column name="name" value="changeMeetup"/>
|
||||||
|
<column name="module_id" valueComputed="${utilityModule}"/>
|
||||||
|
<column name="feature_id" valueComputed="${meetupFeature}"/>
|
||||||
|
</insert>
|
||||||
|
</changeSet>
|
||||||
|
|
||||||
|
</databaseChangeLog>
|
||||||
@@ -0,0 +1,10 @@
|
|||||||
|
<?xml version="1.1" encoding="UTF-8" standalone="no"?>
|
||||||
|
<databaseChangeLog xmlns="http://www.liquibase.org/xml/ns/dbchangelog"
|
||||||
|
xmlns:ext="http://www.liquibase.org/xml/ns/dbchangelog-ext"
|
||||||
|
xmlns:pro="http://www.liquibase.org/xml/ns/pro"
|
||||||
|
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||||
|
xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog dbchangelog.xsd
|
||||||
|
http://www.liquibase.org/xml/ns/dbchangelog-ext dbchangelog.xsd
|
||||||
|
http://www.liquibase.org/xml/ns/pro dbchangelog.xsd" >
|
||||||
|
<include file="command.xml" relativeToChangelogFile="true"/>
|
||||||
|
</databaseChangeLog>
|
||||||
@@ -0,0 +1,27 @@
|
|||||||
|
<?xml version="1.1" encoding="UTF-8" standalone="no"?>
|
||||||
|
<databaseChangeLog xmlns="http://www.liquibase.org/xml/ns/dbchangelog"
|
||||||
|
xmlns:ext="http://www.liquibase.org/xml/ns/dbchangelog-ext"
|
||||||
|
xmlns:pro="http://www.liquibase.org/xml/ns/pro"
|
||||||
|
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||||
|
xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog dbchangelog.xsd
|
||||||
|
http://www.liquibase.org/xml/ns/dbchangelog-ext dbchangelog.xsd
|
||||||
|
http://www.liquibase.org/xml/ns/pro dbchangelog.xsd" >
|
||||||
|
<changeSet author="Sheldan" id="meetup-add_info_columns">
|
||||||
|
<addColumn tableName="meetup">
|
||||||
|
<column name="location" type="VARCHAR(100)" />
|
||||||
|
</addColumn>
|
||||||
|
<addColumn tableName="meetup">
|
||||||
|
<column name="yes_button_id" type="VARCHAR(100)" />
|
||||||
|
</addColumn>
|
||||||
|
<addColumn tableName="meetup">
|
||||||
|
<column name="maybe_button_id" type="VARCHAR(100)" />
|
||||||
|
</addColumn>
|
||||||
|
<addColumn tableName="meetup">
|
||||||
|
<column name="no_time_button_id" type="VARCHAR(100)" />
|
||||||
|
</addColumn>
|
||||||
|
<addColumn tableName="meetup">
|
||||||
|
<column name="not_interested_button_id" type="VARCHAR(100)" />
|
||||||
|
</addColumn>
|
||||||
|
</changeSet>
|
||||||
|
|
||||||
|
</databaseChangeLog>
|
||||||
@@ -0,0 +1,10 @@
|
|||||||
|
<?xml version="1.1" encoding="UTF-8" standalone="no"?>
|
||||||
|
<databaseChangeLog xmlns="http://www.liquibase.org/xml/ns/dbchangelog"
|
||||||
|
xmlns:ext="http://www.liquibase.org/xml/ns/dbchangelog-ext"
|
||||||
|
xmlns:pro="http://www.liquibase.org/xml/ns/pro"
|
||||||
|
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||||
|
xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog dbchangelog.xsd
|
||||||
|
http://www.liquibase.org/xml/ns/dbchangelog-ext dbchangelog.xsd
|
||||||
|
http://www.liquibase.org/xml/ns/pro dbchangelog.xsd" >
|
||||||
|
<include file="meetup.xml" relativeToChangelogFile="true"/>
|
||||||
|
</databaseChangeLog>
|
||||||
@@ -8,4 +8,5 @@
|
|||||||
http://www.liquibase.org/xml/ns/pro dbchangelog.xsd" >
|
http://www.liquibase.org/xml/ns/pro dbchangelog.xsd" >
|
||||||
<include file="1.1.0/collection.xml" relativeToChangelogFile="true"/>
|
<include file="1.1.0/collection.xml" relativeToChangelogFile="true"/>
|
||||||
<include file="1.2.0/collection.xml" relativeToChangelogFile="true"/>
|
<include file="1.2.0/collection.xml" relativeToChangelogFile="true"/>
|
||||||
|
<include file="1.3.18/collection.xml" relativeToChangelogFile="true"/>
|
||||||
</databaseChangeLog>
|
</databaseChangeLog>
|
||||||
@@ -3,7 +3,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>dev.sheldan.sissi.application</groupId>
|
<groupId>dev.sheldan.sissi.application</groupId>
|
||||||
<artifactId>application</artifactId>
|
<artifactId>application</artifactId>
|
||||||
<version>1.3.2</version>
|
<version>1.3.19</version>
|
||||||
</parent>
|
</parent>
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
|
||||||
@@ -13,6 +13,7 @@
|
|||||||
<modules>
|
<modules>
|
||||||
<module>quotes</module>
|
<module>quotes</module>
|
||||||
<module>meetup</module>
|
<module>meetup</module>
|
||||||
|
<module>debra</module>
|
||||||
</modules>
|
</modules>
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>dev.sheldan.sissi.application</groupId>
|
<groupId>dev.sheldan.sissi.application</groupId>
|
||||||
<artifactId>sissi-modules</artifactId>
|
<artifactId>sissi-modules</artifactId>
|
||||||
<version>1.3.2</version>
|
<version>1.3.19</version>
|
||||||
</parent>
|
</parent>
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
|
||||||
|
|||||||
@@ -24,7 +24,7 @@ import dev.sheldan.sissi.module.quotes.exception.QuoteNotFoundException;
|
|||||||
import dev.sheldan.sissi.module.quotes.model.database.Quote;
|
import dev.sheldan.sissi.module.quotes.model.database.Quote;
|
||||||
import dev.sheldan.sissi.module.quotes.service.QuoteServiceBean;
|
import dev.sheldan.sissi.module.quotes.service.QuoteServiceBean;
|
||||||
import net.dv8tion.jda.api.entities.Member;
|
import net.dv8tion.jda.api.entities.Member;
|
||||||
import net.dv8tion.jda.api.entities.MessageChannel;
|
import net.dv8tion.jda.api.entities.channel.middleman.MessageChannel;
|
||||||
import net.dv8tion.jda.api.events.interaction.command.SlashCommandInteractionEvent;
|
import net.dv8tion.jda.api.events.interaction.command.SlashCommandInteractionEvent;
|
||||||
import net.dv8tion.jda.api.interactions.InteractionHook;
|
import net.dv8tion.jda.api.interactions.InteractionHook;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
|||||||
@@ -21,7 +21,7 @@ import dev.sheldan.sissi.module.quotes.config.QuotesModuleDefinition;
|
|||||||
import dev.sheldan.sissi.module.quotes.exception.QuoteNotFoundException;
|
import dev.sheldan.sissi.module.quotes.exception.QuoteNotFoundException;
|
||||||
import dev.sheldan.sissi.module.quotes.model.database.Quote;
|
import dev.sheldan.sissi.module.quotes.model.database.Quote;
|
||||||
import dev.sheldan.sissi.module.quotes.service.QuoteServiceBean;
|
import dev.sheldan.sissi.module.quotes.service.QuoteServiceBean;
|
||||||
import net.dv8tion.jda.api.entities.MessageChannel;
|
import net.dv8tion.jda.api.entities.channel.middleman.MessageChannel;
|
||||||
import net.dv8tion.jda.api.events.interaction.command.SlashCommandInteractionEvent;
|
import net.dv8tion.jda.api.events.interaction.command.SlashCommandInteractionEvent;
|
||||||
import net.dv8tion.jda.api.interactions.InteractionHook;
|
import net.dv8tion.jda.api.interactions.InteractionHook;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
|||||||
@@ -21,7 +21,7 @@ import dev.sheldan.sissi.module.quotes.config.QuotesModuleDefinition;
|
|||||||
import dev.sheldan.sissi.module.quotes.exception.QuoteNotFoundException;
|
import dev.sheldan.sissi.module.quotes.exception.QuoteNotFoundException;
|
||||||
import dev.sheldan.sissi.module.quotes.model.database.Quote;
|
import dev.sheldan.sissi.module.quotes.model.database.Quote;
|
||||||
import dev.sheldan.sissi.module.quotes.service.QuoteServiceBean;
|
import dev.sheldan.sissi.module.quotes.service.QuoteServiceBean;
|
||||||
import net.dv8tion.jda.api.entities.MessageChannel;
|
import net.dv8tion.jda.api.entities.channel.middleman.MessageChannel;
|
||||||
import net.dv8tion.jda.api.events.interaction.command.SlashCommandInteractionEvent;
|
import net.dv8tion.jda.api.events.interaction.command.SlashCommandInteractionEvent;
|
||||||
import net.dv8tion.jda.api.interactions.InteractionHook;
|
import net.dv8tion.jda.api.interactions.InteractionHook;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
|||||||
@@ -19,6 +19,8 @@ import dev.sheldan.sissi.module.quotes.model.database.QuoteAttachment;
|
|||||||
import dev.sheldan.sissi.module.quotes.repository.QuoteRepository;
|
import dev.sheldan.sissi.module.quotes.repository.QuoteRepository;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import net.dv8tion.jda.api.entities.*;
|
import net.dv8tion.jda.api.entities.*;
|
||||||
|
import net.dv8tion.jda.api.entities.channel.Channel;
|
||||||
|
import net.dv8tion.jda.api.entities.channel.middleman.GuildMessageChannel;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.stereotype.Component;
|
import org.springframework.stereotype.Component;
|
||||||
|
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>dev.sheldan.sissi</groupId>
|
<groupId>dev.sheldan.sissi</groupId>
|
||||||
<artifactId>deployment</artifactId>
|
<artifactId>deployment</artifactId>
|
||||||
<version>1.3.2</version>
|
<version>1.3.19</version>
|
||||||
</parent>
|
</parent>
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
|
||||||
|
|||||||
@@ -27,7 +27,8 @@ PROMETHEUS_PORT=9090
|
|||||||
PGADMIN_PORT=5050
|
PGADMIN_PORT=5050
|
||||||
# default authentication for pg admin
|
# default authentication for pg admin
|
||||||
PGADMIN_DEFAULT_EMAIL=sheldan@sheldan.dev
|
PGADMIN_DEFAULT_EMAIL=sheldan@sheldan.dev
|
||||||
|
DEBRA_DONATION_NOTIFICATION_SERVER_ID=0
|
||||||
PGADMIN_DEFAULT_PASSWORD=admin
|
PGADMIN_DEFAULT_PASSWORD=admin
|
||||||
TOKEN=<INSERT TOKEN>
|
TOKEN=<INSERT TOKEN>
|
||||||
YOUTUBE_API_KEY=<INSERT KEY>
|
YOUTUBE_API_KEY=<INSERT KEY>
|
||||||
SISSI_VERSION=1.3.2
|
SISSI_VERSION=1.3.19
|
||||||
@@ -3,7 +3,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>dev.sheldan.sissi</groupId>
|
<groupId>dev.sheldan.sissi</groupId>
|
||||||
<artifactId>deployment</artifactId>
|
<artifactId>deployment</artifactId>
|
||||||
<version>1.3.2</version>
|
<version>1.3.19</version>
|
||||||
</parent>
|
</parent>
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
|
||||||
@@ -63,6 +63,16 @@
|
|||||||
<destFileName>assignable-roles.zip</destFileName>
|
<destFileName>assignable-roles.zip</destFileName>
|
||||||
</artifactItem>
|
</artifactItem>
|
||||||
|
|
||||||
|
<artifactItem>
|
||||||
|
<groupId>dev.sheldan.abstracto-templates.templates</groupId>
|
||||||
|
<artifactId>experience-tracking</artifactId>
|
||||||
|
<version>${abstracto.templates.version}</version>
|
||||||
|
<type>zip</type>
|
||||||
|
<overWrite>true</overWrite>
|
||||||
|
<outputDirectory>${file.basedir}/deployment/template-artifacts/</outputDirectory>
|
||||||
|
<destFileName>experience-tracking.zip</destFileName>
|
||||||
|
</artifactItem>
|
||||||
|
|
||||||
<artifactItem>
|
<artifactItem>
|
||||||
<groupId>dev.sheldan.abstracto-templates.templates</groupId>
|
<groupId>dev.sheldan.abstracto-templates.templates</groupId>
|
||||||
<artifactId>modmail</artifactId>
|
<artifactId>modmail</artifactId>
|
||||||
@@ -83,6 +93,16 @@
|
|||||||
<destFileName>utility.zip</destFileName>
|
<destFileName>utility.zip</destFileName>
|
||||||
</artifactItem>
|
</artifactItem>
|
||||||
|
|
||||||
|
<artifactItem>
|
||||||
|
<groupId>dev.sheldan.abstracto-templates.templates</groupId>
|
||||||
|
<artifactId>logging</artifactId>
|
||||||
|
<version>${abstracto.templates.version}</version>
|
||||||
|
<type>zip</type>
|
||||||
|
<overWrite>true</overWrite>
|
||||||
|
<outputDirectory>${file.basedir}/deployment/template-artifacts/</outputDirectory>
|
||||||
|
<destFileName>logging.zip</destFileName>
|
||||||
|
</artifactItem>
|
||||||
|
|
||||||
<artifactItem>
|
<artifactItem>
|
||||||
<groupId>dev.sheldan.abstracto-templates.templates</groupId>
|
<groupId>dev.sheldan.abstracto-templates.templates</groupId>
|
||||||
<artifactId>webservices</artifactId>
|
<artifactId>webservices</artifactId>
|
||||||
@@ -184,6 +204,16 @@
|
|||||||
<destFileName>meetup.zip</destFileName>
|
<destFileName>meetup.zip</destFileName>
|
||||||
</artifactItem>
|
</artifactItem>
|
||||||
|
|
||||||
|
<artifactItem>
|
||||||
|
<groupId>dev.sheldan.sissi.templates</groupId>
|
||||||
|
<artifactId>debra-templates</artifactId>
|
||||||
|
<version>${project.version}</version>
|
||||||
|
<type>zip</type>
|
||||||
|
<overWrite>true</overWrite>
|
||||||
|
<outputDirectory>${file.basedir}/deployment/template-artifacts/</outputDirectory>
|
||||||
|
<destFileName>debra.zip</destFileName>
|
||||||
|
</artifactItem>
|
||||||
|
|
||||||
<!-- sissi template customizations -->
|
<!-- sissi template customizations -->
|
||||||
|
|
||||||
<artifactItem>
|
<artifactItem>
|
||||||
@@ -218,6 +248,16 @@
|
|||||||
<destFileName>link-embed.zip</destFileName>
|
<destFileName>link-embed.zip</destFileName>
|
||||||
</artifactItem>
|
</artifactItem>
|
||||||
|
|
||||||
|
<artifactItem>
|
||||||
|
<groupId>dev.sheldan.abstracto-templates.translations</groupId>
|
||||||
|
<artifactId>experience-tracking</artifactId>
|
||||||
|
<version>${abstracto.templates.version}</version>
|
||||||
|
<type>zip</type>
|
||||||
|
<overWrite>true</overWrite>
|
||||||
|
<outputDirectory>${file.basedir}/deployment/translation-artifacts/</outputDirectory>
|
||||||
|
<destFileName>experience-tracking.zip</destFileName>
|
||||||
|
</artifactItem>
|
||||||
|
|
||||||
<artifactItem>
|
<artifactItem>
|
||||||
<groupId>dev.sheldan.abstracto-templates.translations</groupId>
|
<groupId>dev.sheldan.abstracto-templates.translations</groupId>
|
||||||
<artifactId>modmail</artifactId>
|
<artifactId>modmail</artifactId>
|
||||||
@@ -308,6 +348,16 @@
|
|||||||
<destFileName>entertainment.zip</destFileName>
|
<destFileName>entertainment.zip</destFileName>
|
||||||
</artifactItem>
|
</artifactItem>
|
||||||
|
|
||||||
|
<artifactItem>
|
||||||
|
<groupId>dev.sheldan.abstracto-templates.translations</groupId>
|
||||||
|
<artifactId>logging</artifactId>
|
||||||
|
<version>${abstracto.templates.version}</version>
|
||||||
|
<type>zip</type>
|
||||||
|
<overWrite>true</overWrite>
|
||||||
|
<outputDirectory>${file.basedir}/deployment/translation-artifacts/</outputDirectory>
|
||||||
|
<destFileName>logging.zip</destFileName>
|
||||||
|
</artifactItem>
|
||||||
|
|
||||||
<artifactItem>
|
<artifactItem>
|
||||||
<groupId>dev.sheldan.abstracto-templates.translations</groupId>
|
<groupId>dev.sheldan.abstracto-templates.translations</groupId>
|
||||||
<artifactId>custom-command</artifactId>
|
<artifactId>custom-command</artifactId>
|
||||||
@@ -340,6 +390,16 @@
|
|||||||
<destFileName>meetup.zip</destFileName>
|
<destFileName>meetup.zip</destFileName>
|
||||||
</artifactItem>
|
</artifactItem>
|
||||||
|
|
||||||
|
<artifactItem>
|
||||||
|
<groupId>dev.sheldan.sissi.templates.translations</groupId>
|
||||||
|
<artifactId>debra-translations</artifactId>
|
||||||
|
<version>${project.version}</version>
|
||||||
|
<type>zip</type>
|
||||||
|
<overWrite>true</overWrite>
|
||||||
|
<outputDirectory>${file.basedir}/deployment/translation-artifacts/</outputDirectory>
|
||||||
|
<destFileName>debra.zip</destFileName>
|
||||||
|
</artifactItem>
|
||||||
|
|
||||||
<!-- custom -->
|
<!-- custom -->
|
||||||
|
|
||||||
<!-- abstracto liquibase artifacts -->
|
<!-- abstracto liquibase artifacts -->
|
||||||
@@ -376,6 +436,28 @@
|
|||||||
<destFileName>link-embed.zip</destFileName>
|
<destFileName>link-embed.zip</destFileName>
|
||||||
</artifactItem>
|
</artifactItem>
|
||||||
|
|
||||||
|
<artifactItem>
|
||||||
|
<groupId>dev.sheldan.abstracto.modules</groupId>
|
||||||
|
<artifactId>experience-tracking-impl</artifactId>
|
||||||
|
<version>${abstracto.version}</version>
|
||||||
|
<classifier>liquibase</classifier>
|
||||||
|
<type>zip</type>
|
||||||
|
<overWrite>true</overWrite>
|
||||||
|
<outputDirectory>${file.basedir}/deployment/liquibase-artifacts/</outputDirectory>
|
||||||
|
<destFileName>experience-tracking.zip</destFileName>
|
||||||
|
</artifactItem>
|
||||||
|
|
||||||
|
<artifactItem>
|
||||||
|
<groupId>dev.sheldan.abstracto.modules</groupId>
|
||||||
|
<artifactId>logging-impl</artifactId>
|
||||||
|
<version>${abstracto.version}</version>
|
||||||
|
<classifier>liquibase</classifier>
|
||||||
|
<type>zip</type>
|
||||||
|
<overWrite>true</overWrite>
|
||||||
|
<outputDirectory>${file.basedir}/deployment/liquibase-artifacts/</outputDirectory>
|
||||||
|
<destFileName>logging.zip</destFileName>
|
||||||
|
</artifactItem>
|
||||||
|
|
||||||
<artifactItem>
|
<artifactItem>
|
||||||
<groupId>dev.sheldan.abstracto.modules</groupId>
|
<groupId>dev.sheldan.abstracto.modules</groupId>
|
||||||
<artifactId>starboard-impl</artifactId>
|
<artifactId>starboard-impl</artifactId>
|
||||||
@@ -521,6 +603,17 @@
|
|||||||
<destFileName>meetup.zip</destFileName>
|
<destFileName>meetup.zip</destFileName>
|
||||||
</artifactItem>
|
</artifactItem>
|
||||||
|
|
||||||
|
<artifactItem>
|
||||||
|
<groupId>dev.sheldan.sissi.application.module</groupId>
|
||||||
|
<artifactId>debra</artifactId>
|
||||||
|
<version>${project.version}</version>
|
||||||
|
<classifier>liquibase</classifier>
|
||||||
|
<type>zip</type>
|
||||||
|
<overWrite>true</overWrite>
|
||||||
|
<outputDirectory>${file.basedir}/deployment/liquibase-artifacts/</outputDirectory>
|
||||||
|
<destFileName>debra.zip</destFileName>
|
||||||
|
</artifactItem>
|
||||||
|
|
||||||
<!-- customizations -->
|
<!-- customizations -->
|
||||||
|
|
||||||
<artifactItem>
|
<artifactItem>
|
||||||
@@ -556,6 +649,26 @@
|
|||||||
<destFileName>moderation-template-overrides.zip</destFileName>
|
<destFileName>moderation-template-overrides.zip</destFileName>
|
||||||
</artifactItem>
|
</artifactItem>
|
||||||
|
|
||||||
|
<artifactItem>
|
||||||
|
<groupId>dev.sheldan.sissi.templates</groupId>
|
||||||
|
<artifactId>experience-template-overrides</artifactId>
|
||||||
|
<version>${project.version}</version>
|
||||||
|
<type>zip</type>
|
||||||
|
<overWrite>true</overWrite>
|
||||||
|
<outputDirectory>${file.basedir}/deployment/template-artifacts/</outputDirectory>
|
||||||
|
<destFileName>experience-template-overrides.zip</destFileName>
|
||||||
|
</artifactItem>
|
||||||
|
|
||||||
|
<artifactItem>
|
||||||
|
<groupId>dev.sheldan.sissi.templates</groupId>
|
||||||
|
<artifactId>logging-template-overrides</artifactId>
|
||||||
|
<version>${project.version}</version>
|
||||||
|
<type>zip</type>
|
||||||
|
<overWrite>true</overWrite>
|
||||||
|
<outputDirectory>${file.basedir}/deployment/template-artifacts/</outputDirectory>
|
||||||
|
<destFileName>logging-template-overrides.zip</destFileName>
|
||||||
|
</artifactItem>
|
||||||
|
|
||||||
<!-- overrides translations -->
|
<!-- overrides translations -->
|
||||||
|
|
||||||
<artifactItem>
|
<artifactItem>
|
||||||
@@ -568,6 +681,26 @@
|
|||||||
<destFileName>moderation-translation-overrides.zip</destFileName>
|
<destFileName>moderation-translation-overrides.zip</destFileName>
|
||||||
</artifactItem>
|
</artifactItem>
|
||||||
|
|
||||||
|
<artifactItem>
|
||||||
|
<groupId>dev.sheldan.sissi.templates.translations.overrides</groupId>
|
||||||
|
<artifactId>experience-translation-overrides</artifactId>
|
||||||
|
<version>${project.version}</version>
|
||||||
|
<type>zip</type>
|
||||||
|
<overWrite>true</overWrite>
|
||||||
|
<outputDirectory>${file.basedir}/deployment/translation-artifacts/</outputDirectory>
|
||||||
|
<destFileName>experience-translation-overrides.zip</destFileName>
|
||||||
|
</artifactItem>
|
||||||
|
|
||||||
|
<artifactItem>
|
||||||
|
<groupId>dev.sheldan.sissi.templates.translations.overrides</groupId>
|
||||||
|
<artifactId>logging-translation-overrides</artifactId>
|
||||||
|
<version>${project.version}</version>
|
||||||
|
<type>zip</type>
|
||||||
|
<overWrite>true</overWrite>
|
||||||
|
<outputDirectory>${file.basedir}/deployment/translation-artifacts/</outputDirectory>
|
||||||
|
<destFileName>logging-translation-overrides.zip</destFileName>
|
||||||
|
</artifactItem>
|
||||||
|
|
||||||
</artifactItems>
|
</artifactItems>
|
||||||
</configuration>
|
</configuration>
|
||||||
</plugin>
|
</plugin>
|
||||||
|
|||||||
@@ -1,24 +1,27 @@
|
|||||||
{
|
{
|
||||||
"template_artifacts": [
|
"template_artifacts": [
|
||||||
"core","starboard", "link-embed", "moderation", "entertainment", "custom-command", "utility", "webservices", "remind", "suggestion", "modmail", "assignable-roles",
|
"core","starboard", "link-embed", "moderation", "entertainment", "custom-command", "utility", "webservices", "remind", "suggestion", "modmail", "assignable-roles", "experience-tracking", "logging",
|
||||||
"quotes", "meetup",
|
"quotes", "meetup", "debra",
|
||||||
"moderation-custom",
|
"moderation-custom",
|
||||||
"moderation-template-overrides"
|
"moderation-template-overrides", "experience-template-overrides", "logging-template-overrides"
|
||||||
],
|
],
|
||||||
"translation_artifacts": [
|
"translation_artifacts": [
|
||||||
"core",
|
"core",
|
||||||
"starboard", "link-embed", "moderation", "entertainment", "custom-command", "utility", "webservices", "suggestion", "remind", "modmail", "assignable-roles",
|
"starboard", "link-embed", "moderation", "entertainment", "custom-command", "utility", "webservices", "suggestion", "remind", "modmail", "assignable-roles", "experience-tracking", "logging",
|
||||||
"quotes", "meetup",
|
"quotes", "meetup", "debra",
|
||||||
"moderation-custom",
|
"moderation-custom",
|
||||||
"moderation-translation-overrides"
|
"moderation-translation-overrides", "experience-translation-overrides", "logging-translation-overrides"
|
||||||
],
|
],
|
||||||
"liquibase_artifacts": [
|
"liquibase_artifacts": [
|
||||||
{ "zip": "scheduling", "file": "scheduling-changeLog.xml" },
|
{ "zip": "scheduling", "file": "scheduling-changeLog.xml" },
|
||||||
{ "zip": "core", "file": "core-changeLog.xml" },
|
{ "zip": "core", "file": "core-changeLog.xml" },
|
||||||
{ "zip": "link-embed", "file": "link-embed-changeLog.xml"},
|
{ "zip": "link-embed", "file": "link-embed-changeLog.xml"},
|
||||||
|
{ "zip": "experience-tracking", "file": "experience-changeLog.xml"},
|
||||||
|
{ "zip": "logging", "file": "logging-changeLog.xml"},
|
||||||
{ "zip": "starboard", "file": "starboard-changeLog.xml"},
|
{ "zip": "starboard", "file": "starboard-changeLog.xml"},
|
||||||
{ "zip": "quotes", "file": "quotes-changeLog.xml"},
|
{ "zip": "quotes", "file": "quotes-changeLog.xml"},
|
||||||
{ "zip": "meetup", "file": "meetup-changeLog.xml"},
|
{ "zip": "meetup", "file": "meetup-changeLog.xml"},
|
||||||
|
{ "zip": "debra", "file": "debra-changeLog.xml"},
|
||||||
{ "zip": "moderation", "file": "moderation-changeLog.xml"},
|
{ "zip": "moderation", "file": "moderation-changeLog.xml"},
|
||||||
{ "zip": "entertainment", "file": "entertainment-changeLog.xml"},
|
{ "zip": "entertainment", "file": "entertainment-changeLog.xml"},
|
||||||
{ "zip": "custom-command", "file": "custom-command-changeLog.xml"},
|
{ "zip": "custom-command", "file": "custom-command-changeLog.xml"},
|
||||||
|
|||||||
@@ -788,99 +788,6 @@
|
|||||||
"alignLevel": null
|
"alignLevel": null
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"aliasColors": {},
|
|
||||||
"bars": false,
|
|
||||||
"dashLength": 10,
|
|
||||||
"dashes": false,
|
|
||||||
"datasource": "prometheus",
|
|
||||||
"fieldConfig": {
|
|
||||||
"defaults": {},
|
|
||||||
"overrides": []
|
|
||||||
},
|
|
||||||
"fill": 1,
|
|
||||||
"fillGradient": 0,
|
|
||||||
"gridPos": {
|
|
||||||
"h": 7,
|
|
||||||
"w": 6,
|
|
||||||
"x": 12,
|
|
||||||
"y": 23
|
|
||||||
},
|
|
||||||
"hiddenSeries": false,
|
|
||||||
"id": 28,
|
|
||||||
"legend": {
|
|
||||||
"avg": false,
|
|
||||||
"current": false,
|
|
||||||
"max": false,
|
|
||||||
"min": false,
|
|
||||||
"show": true,
|
|
||||||
"total": false,
|
|
||||||
"values": false
|
|
||||||
},
|
|
||||||
"lines": true,
|
|
||||||
"linewidth": 1,
|
|
||||||
"nullPointMode": "null",
|
|
||||||
"options": {
|
|
||||||
"alertThreshold": true
|
|
||||||
},
|
|
||||||
"percentage": false,
|
|
||||||
"pluginVersion": "7.5.7",
|
|
||||||
"pointradius": 2,
|
|
||||||
"points": false,
|
|
||||||
"renderer": "flot",
|
|
||||||
"seriesOverrides": [],
|
|
||||||
"spaceLength": 10,
|
|
||||||
"stack": false,
|
|
||||||
"steppedLine": false,
|
|
||||||
"targets": [
|
|
||||||
{
|
|
||||||
"expr": "increase(experience_runtime_storage[1m])",
|
|
||||||
"interval": "",
|
|
||||||
"legendFormat": "Amount of entries",
|
|
||||||
"refId": "A"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"thresholds": [],
|
|
||||||
"timeFrom": null,
|
|
||||||
"timeRegions": [],
|
|
||||||
"timeShift": null,
|
|
||||||
"title": "Experience storage",
|
|
||||||
"tooltip": {
|
|
||||||
"shared": true,
|
|
||||||
"sort": 0,
|
|
||||||
"value_type": "individual"
|
|
||||||
},
|
|
||||||
"type": "graph",
|
|
||||||
"xaxis": {
|
|
||||||
"buckets": null,
|
|
||||||
"mode": "time",
|
|
||||||
"name": null,
|
|
||||||
"show": true,
|
|
||||||
"values": []
|
|
||||||
},
|
|
||||||
"yaxes": [
|
|
||||||
{
|
|
||||||
"format": "short",
|
|
||||||
"label": null,
|
|
||||||
"logBase": 1,
|
|
||||||
"max": null,
|
|
||||||
"min": null,
|
|
||||||
"show": true
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"format": "short",
|
|
||||||
"label": null,
|
|
||||||
"logBase": 1,
|
|
||||||
"max": null,
|
|
||||||
"min": null,
|
|
||||||
"show": true
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"yaxis": {
|
|
||||||
"align": false,
|
|
||||||
"alignLevel": null
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"aliasColors": {},
|
"aliasColors": {},
|
||||||
"bars": false,
|
"bars": false,
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>dev.sheldan.sissi</groupId>
|
<groupId>dev.sheldan.sissi</groupId>
|
||||||
<artifactId>sissi</artifactId>
|
<artifactId>sissi</artifactId>
|
||||||
<version>1.3.2</version>
|
<version>1.3.19</version>
|
||||||
</parent>
|
</parent>
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
|
||||||
|
|||||||
8
pom.xml
8
pom.xml
@@ -13,15 +13,15 @@
|
|||||||
<groupId>dev.sheldan.sissi</groupId>
|
<groupId>dev.sheldan.sissi</groupId>
|
||||||
<artifactId>sissi</artifactId>
|
<artifactId>sissi</artifactId>
|
||||||
<name>Sissi</name>
|
<name>Sissi</name>
|
||||||
<version>1.3.2</version>
|
<version>1.3.19</version>
|
||||||
|
|
||||||
<properties>
|
<properties>
|
||||||
<maven.compiler.target>1.8</maven.compiler.target>
|
<maven.compiler.target>1.8</maven.compiler.target>
|
||||||
<maven.compiler.source>1.8</maven.compiler.source>
|
<maven.compiler.source>1.8</maven.compiler.source>
|
||||||
<!-- edit in release.yml as well -->
|
<!-- edit in release.yml as well -->
|
||||||
<!-- when releasing a new bot version, update the .env as well-->
|
<!-- when releasing a new bot version, update the .env as well-->
|
||||||
<abstracto.version>1.4.3</abstracto.version>
|
<abstracto.version>1.4.17</abstracto.version>
|
||||||
<abstracto.templates.version>1.4.3</abstracto.templates.version>
|
<abstracto.templates.version>1.4.13</abstracto.templates.version>
|
||||||
</properties>
|
</properties>
|
||||||
|
|
||||||
<modules>
|
<modules>
|
||||||
@@ -57,7 +57,7 @@
|
|||||||
<scm>
|
<scm>
|
||||||
<url>https://maven.pkg.github.com/Sheldan/Sissi</url>
|
<url>https://maven.pkg.github.com/Sheldan/Sissi</url>
|
||||||
<developerConnection>scm:git:git@github.com:Sheldan/Sissi.git</developerConnection>
|
<developerConnection>scm:git:git@github.com:Sheldan/Sissi.git</developerConnection>
|
||||||
<tag>sissi-1.3.2</tag>
|
<tag>sissi-1.3.19</tag>
|
||||||
</scm>
|
</scm>
|
||||||
|
|
||||||
</project>
|
</project>
|
||||||
@@ -3,7 +3,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>dev.sheldan.sissi</groupId>
|
<groupId>dev.sheldan.sissi</groupId>
|
||||||
<artifactId>sissi</artifactId>
|
<artifactId>sissi</artifactId>
|
||||||
<version>1.3.2</version>
|
<version>1.3.19</version>
|
||||||
</parent>
|
</parent>
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>dev.sheldan.sissi.templates</groupId>
|
<groupId>dev.sheldan.sissi.templates</groupId>
|
||||||
<artifactId>customization-templates</artifactId>
|
<artifactId>customization-templates</artifactId>
|
||||||
<version>1.3.2</version>
|
<version>1.3.19</version>
|
||||||
</parent>
|
</parent>
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<artifactId>sissi-templates</artifactId>
|
<artifactId>sissi-templates</artifactId>
|
||||||
<groupId>dev.sheldan.sissi.templates</groupId>
|
<groupId>dev.sheldan.sissi.templates</groupId>
|
||||||
<version>1.3.2</version>
|
<version>1.3.19</version>
|
||||||
</parent>
|
</parent>
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,36 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project xmlns="http://maven.apache.org/POM/4.0.0" 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>
|
||||||
|
<artifactId>module-templates</artifactId>
|
||||||
|
<groupId>dev.sheldan.sissi.templates</groupId>
|
||||||
|
<version>1.3.19</version>
|
||||||
|
</parent>
|
||||||
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
|
||||||
|
<artifactId>debra-templates</artifactId>
|
||||||
|
|
||||||
|
<build>
|
||||||
|
<plugins>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
|
<artifactId>maven-assembly-plugin</artifactId>
|
||||||
|
<executions>
|
||||||
|
<execution>
|
||||||
|
<phase>package</phase>
|
||||||
|
<goals>
|
||||||
|
<goal>single</goal>
|
||||||
|
</goals>
|
||||||
|
<configuration>
|
||||||
|
<finalName>debra-templates-${project.version}</finalName>
|
||||||
|
<appendAssemblyId>false</appendAssemblyId>
|
||||||
|
<descriptors>
|
||||||
|
<descriptor>src/main/assembly/assembly.xml</descriptor>
|
||||||
|
</descriptors>
|
||||||
|
</configuration>
|
||||||
|
</execution>
|
||||||
|
</executions>
|
||||||
|
</plugin>
|
||||||
|
</plugins>
|
||||||
|
</build>
|
||||||
|
|
||||||
|
</project>
|
||||||
@@ -0,0 +1,15 @@
|
|||||||
|
<assembly xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2"
|
||||||
|
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||||
|
xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2 http://maven.apache.org/xsd/assembly-1.1.2.xsd">
|
||||||
|
<id>zip</id>
|
||||||
|
<includeBaseDirectory>false</includeBaseDirectory>
|
||||||
|
<formats>
|
||||||
|
<format>zip</format>
|
||||||
|
</formats>
|
||||||
|
<fileSets>
|
||||||
|
<fileSet>
|
||||||
|
<outputDirectory>.</outputDirectory>
|
||||||
|
<directory>${project.basedir}/src/main/resources</directory>
|
||||||
|
</fileSet>
|
||||||
|
</fileSets>
|
||||||
|
</assembly>
|
||||||
@@ -0,0 +1,26 @@
|
|||||||
|
{
|
||||||
|
<#assign donationAmount=totalAmount>
|
||||||
|
<#setting locale="de_DE">
|
||||||
|
"additionalMessage": "<#include "donations_response_description">",
|
||||||
|
"embeds": [
|
||||||
|
{
|
||||||
|
"imageUrl": "https://cdn.discordapp.com/attachments/299115929206390784/1047306670319079474/dotpict-1.png"
|
||||||
|
<#if donations?size gt 0>
|
||||||
|
,<#if type.name() == "LATEST">
|
||||||
|
"description": "<#include "donations_response_latest_donations_description">"
|
||||||
|
<#else>
|
||||||
|
"description": "<#include "donations_response_top_donations_description">"
|
||||||
|
</#if>
|
||||||
|
,"fields": [
|
||||||
|
<#list donations as donation>
|
||||||
|
{
|
||||||
|
"name": "<#if donation.anonymous><#include "donations_response_anonymous"><#else>${donation.firstName}</#if>",
|
||||||
|
"value": "${donation.donationAmount}€",
|
||||||
|
"inline": true
|
||||||
|
}
|
||||||
|
<#sep>,</#list>
|
||||||
|
]
|
||||||
|
</#if>
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
<#include "donation_amount_not_found_exception_text">
|
||||||
@@ -0,0 +1,35 @@
|
|||||||
|
{
|
||||||
|
"embeds": [
|
||||||
|
{
|
||||||
|
"title": {
|
||||||
|
<#setting locale="de_DE">
|
||||||
|
<#assign donatorName=donation.donatorName>
|
||||||
|
<#assign donationAmount=donation.amount>
|
||||||
|
"title": "<@safe_include "debra_donation_notification_embed_title"/>"
|
||||||
|
},
|
||||||
|
<#assign donationMessage=donation.message>
|
||||||
|
"description": "${donationMessage?json_string}",
|
||||||
|
"fields": [
|
||||||
|
{
|
||||||
|
<#assign totalDonationAmount=totalDonationAmount>
|
||||||
|
"name": "<@safe_include "debra_donation_notification_embed_field_amount_title"/>",
|
||||||
|
"value": "<@safe_include "debra_donation_notification_embed_field_amount_value"/>"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"imageUrl": "https://cdn.discordapp.com/attachments/299115929206390784/1047306670319079474/dotpict-1.png",
|
||||||
|
"footer": {
|
||||||
|
"text": "<@safe_include "debra_donation_notification_embed_footer"/>"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"buttons": [
|
||||||
|
{
|
||||||
|
"label": "<@safe_include "debra_donation_notification_link_button_label"/>",
|
||||||
|
"url": "http://tiny.cc/schmetterling2022",
|
||||||
|
"buttonStyle": "link",
|
||||||
|
"metaConfig": {
|
||||||
|
"persistCallback": false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
@@ -3,7 +3,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<artifactId>module-templates</artifactId>
|
<artifactId>module-templates</artifactId>
|
||||||
<groupId>dev.sheldan.sissi.templates</groupId>
|
<groupId>dev.sheldan.sissi.templates</groupId>
|
||||||
<version>1.3.2</version>
|
<version>1.3.19</version>
|
||||||
</parent>
|
</parent>
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,6 @@
|
|||||||
|
{
|
||||||
|
"additionalMessage": "<@safe_include "changeMeetup_response_text"/>",
|
||||||
|
"messageConfig": {
|
||||||
|
"ephemeral": true
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -8,6 +8,14 @@
|
|||||||
},
|
},
|
||||||
"description": "<@format_instant_date_time instant=meetupTime/>
|
"description": "<@format_instant_date_time instant=meetupTime/>
|
||||||
${description?json_string}"
|
${description?json_string}"
|
||||||
|
<#if location?? && location != "%22%22">,
|
||||||
|
"fields": [
|
||||||
|
{
|
||||||
|
"name": "<@safe_include "createMeetup_confirmation_location_field_title"/>",
|
||||||
|
"value": "https://www.google.com/maps?q=${location?json_string}"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
</#if>
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"buttons": [
|
"buttons": [
|
||||||
|
|||||||
@@ -2,4 +2,7 @@
|
|||||||
<#assign userMentions><#list participants as user>${user.memberMention}<#sep>, </#list></#assign>
|
<#assign userMentions><#list participants as user>${user.memberMention}<#sep>, </#list></#assign>
|
||||||
"additionalMessage": "${userMentions?json_string}
|
"additionalMessage": "${userMentions?json_string}
|
||||||
${notificationMessage}"
|
${notificationMessage}"
|
||||||
|
<#if meetupMessageId??>,
|
||||||
|
"referencedMessageId": ${meetupMessageId?c}
|
||||||
|
</#if>
|
||||||
}
|
}
|
||||||
@@ -20,7 +20,6 @@
|
|||||||
"description": "<#if cancelled>~~</#if><@safe_include "meetup_display_description"/><#if cancelled>~~</#if>"
|
"description": "<#if cancelled>~~</#if><@safe_include "meetup_display_description"/><#if cancelled>~~</#if>"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
<#if yesId?has_content && noId?has_content && maybeId?has_content && !cancelled>
|
|
||||||
"buttons": [
|
"buttons": [
|
||||||
{
|
{
|
||||||
"label": "<@safe_include "meetup_message_yes_button_label"/>",
|
"label": "<@safe_include "meetup_message_yes_button_label"/>",
|
||||||
@@ -42,8 +41,14 @@
|
|||||||
"id": "${noId}",
|
"id": "${noId}",
|
||||||
"buttonStyle": "danger"
|
"buttonStyle": "danger"
|
||||||
}
|
}
|
||||||
|
<#if location?? && location != "%22%22">,
|
||||||
|
{
|
||||||
|
"label": "<@safe_include "meetup_message_location_button_label"/>",
|
||||||
|
"url": "https://www.google.com/maps?q=${location?json_string}",
|
||||||
|
"buttonStyle": "link"
|
||||||
|
}
|
||||||
|
</#if>
|
||||||
],
|
],
|
||||||
</#if>
|
|
||||||
"messageConfig": {
|
"messageConfig": {
|
||||||
"allowsRoleMention": true
|
"allowsRoleMention": true
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>dev.sheldan.sissi.templates</groupId>
|
<groupId>dev.sheldan.sissi.templates</groupId>
|
||||||
<artifactId>sissi-templates</artifactId>
|
<artifactId>sissi-templates</artifactId>
|
||||||
<version>1.3.2</version>
|
<version>1.3.19</version>
|
||||||
</parent>
|
</parent>
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
|
||||||
@@ -12,6 +12,7 @@
|
|||||||
<modules>
|
<modules>
|
||||||
<module>quotes-templates</module>
|
<module>quotes-templates</module>
|
||||||
<module>meetup-templates</module>
|
<module>meetup-templates</module>
|
||||||
|
<module>debra-templates</module>
|
||||||
</modules>
|
</modules>
|
||||||
|
|
||||||
</project>
|
</project>
|
||||||
@@ -3,7 +3,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>dev.sheldan.sissi.templates</groupId>
|
<groupId>dev.sheldan.sissi.templates</groupId>
|
||||||
<artifactId>module-templates</artifactId>
|
<artifactId>module-templates</artifactId>
|
||||||
<version>1.3.2</version>
|
<version>1.3.19</version>
|
||||||
</parent>
|
</parent>
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>dev.sheldan.sissi.templates</groupId>
|
<groupId>dev.sheldan.sissi.templates</groupId>
|
||||||
<artifactId>templates</artifactId>
|
<artifactId>templates</artifactId>
|
||||||
<version>1.3.2</version>
|
<version>1.3.19</version>
|
||||||
</parent>
|
</parent>
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,35 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project xmlns="http://maven.apache.org/POM/4.0.0" 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.sissi.templates</groupId>
|
||||||
|
<artifactId>template-overrides</artifactId>
|
||||||
|
<version>1.3.19</version>
|
||||||
|
</parent>
|
||||||
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
|
||||||
|
<artifactId>experience-template-overrides</artifactId>
|
||||||
|
|
||||||
|
<build>
|
||||||
|
<plugins>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
|
<artifactId>maven-assembly-plugin</artifactId>
|
||||||
|
<executions>
|
||||||
|
<execution>
|
||||||
|
<phase>package</phase>
|
||||||
|
<goals>
|
||||||
|
<goal>single</goal>
|
||||||
|
</goals>
|
||||||
|
<configuration>
|
||||||
|
<finalName>experience-template-overrides-${project.version}</finalName>
|
||||||
|
<appendAssemblyId>false</appendAssemblyId>
|
||||||
|
<descriptors>
|
||||||
|
<descriptor>src/main/assembly/assembly.xml</descriptor>
|
||||||
|
</descriptors>
|
||||||
|
</configuration>
|
||||||
|
</execution>
|
||||||
|
</executions>
|
||||||
|
</plugin>
|
||||||
|
</plugins>
|
||||||
|
</build>
|
||||||
|
</project>
|
||||||
@@ -0,0 +1,15 @@
|
|||||||
|
<assembly xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2"
|
||||||
|
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||||
|
xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2 http://maven.apache.org/xsd/assembly-1.1.2.xsd">
|
||||||
|
<id>zip</id>
|
||||||
|
<includeBaseDirectory>false</includeBaseDirectory>
|
||||||
|
<formats>
|
||||||
|
<format>zip</format>
|
||||||
|
</formats>
|
||||||
|
<fileSets>
|
||||||
|
<fileSet>
|
||||||
|
<outputDirectory>.</outputDirectory>
|
||||||
|
<directory>${project.basedir}/src/main/resources</directory>
|
||||||
|
</fileSet>
|
||||||
|
</fileSets>
|
||||||
|
</assembly>
|
||||||
@@ -0,0 +1,7 @@
|
|||||||
|
{
|
||||||
|
<#assign userMention=memberDisplay.memberMention>
|
||||||
|
<#assign pastLevel=oldLevel>
|
||||||
|
<#assign currentLevel=newLevel>
|
||||||
|
<#setting locale="de_DE">
|
||||||
|
"additionalMessage": "<@safe_include "experience_level_up_notification_text"/>"
|
||||||
|
}
|
||||||
@@ -0,0 +1,35 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project xmlns="http://maven.apache.org/POM/4.0.0" 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.sissi.templates</groupId>
|
||||||
|
<artifactId>template-overrides</artifactId>
|
||||||
|
<version>1.3.19</version>
|
||||||
|
</parent>
|
||||||
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
|
||||||
|
<artifactId>logging-template-overrides</artifactId>
|
||||||
|
|
||||||
|
<build>
|
||||||
|
<plugins>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
|
<artifactId>maven-assembly-plugin</artifactId>
|
||||||
|
<executions>
|
||||||
|
<execution>
|
||||||
|
<phase>package</phase>
|
||||||
|
<goals>
|
||||||
|
<goal>single</goal>
|
||||||
|
</goals>
|
||||||
|
<configuration>
|
||||||
|
<finalName>logging-template-overrides-${project.version}</finalName>
|
||||||
|
<appendAssemblyId>false</appendAssemblyId>
|
||||||
|
<descriptors>
|
||||||
|
<descriptor>src/main/assembly/assembly.xml</descriptor>
|
||||||
|
</descriptors>
|
||||||
|
</configuration>
|
||||||
|
</execution>
|
||||||
|
</executions>
|
||||||
|
</plugin>
|
||||||
|
</plugins>
|
||||||
|
</build>
|
||||||
|
</project>
|
||||||
@@ -0,0 +1,15 @@
|
|||||||
|
<assembly xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2"
|
||||||
|
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||||
|
xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2 http://maven.apache.org/xsd/assembly-1.1.2.xsd">
|
||||||
|
<id>zip</id>
|
||||||
|
<includeBaseDirectory>false</includeBaseDirectory>
|
||||||
|
<formats>
|
||||||
|
<format>zip</format>
|
||||||
|
</formats>
|
||||||
|
<fileSets>
|
||||||
|
<fileSet>
|
||||||
|
<outputDirectory>.</outputDirectory>
|
||||||
|
<directory>${project.basedir}/src/main/resources</directory>
|
||||||
|
</fileSet>
|
||||||
|
</fileSets>
|
||||||
|
</assembly>
|
||||||
@@ -0,0 +1,6 @@
|
|||||||
|
{
|
||||||
|
<#assign userMention>${member.asMention}</#assign>
|
||||||
|
<#assign user>${member.user.name}#${member.user.discriminator} (${member.asMention}: ${member.id})</#assign>
|
||||||
|
<#setting locale="de_DE">
|
||||||
|
"additionalMessage": "<@safe_include "user_joined_text"/>"
|
||||||
|
}
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
{
|
||||||
|
<#assign userName>${user.name}#${user.discriminator} (${user.id})</#assign>
|
||||||
|
<#setting locale="de_DE">
|
||||||
|
"additionalMessage": "<@safe_include "user_left_text"/>"
|
||||||
|
}
|
||||||
@@ -3,7 +3,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>dev.sheldan.sissi.templates</groupId>
|
<groupId>dev.sheldan.sissi.templates</groupId>
|
||||||
<artifactId>template-overrides</artifactId>
|
<artifactId>template-overrides</artifactId>
|
||||||
<version>1.3.2</version>
|
<version>1.3.19</version>
|
||||||
</parent>
|
</parent>
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<artifactId>sissi-templates</artifactId>
|
<artifactId>sissi-templates</artifactId>
|
||||||
<groupId>dev.sheldan.sissi.templates</groupId>
|
<groupId>dev.sheldan.sissi.templates</groupId>
|
||||||
<version>1.3.2</version>
|
<version>1.3.19</version>
|
||||||
</parent>
|
</parent>
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
|
||||||
@@ -11,6 +11,8 @@
|
|||||||
<packaging>pom</packaging>
|
<packaging>pom</packaging>
|
||||||
<modules>
|
<modules>
|
||||||
<module>moderation-template-overrides</module>
|
<module>moderation-template-overrides</module>
|
||||||
|
<module>experience-template-overrides</module>
|
||||||
|
<module>logging-template-overrides</module>
|
||||||
</modules>
|
</modules>
|
||||||
|
|
||||||
</project>
|
</project>
|
||||||
@@ -3,7 +3,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>dev.sheldan.sissi.templates.translations</groupId>
|
<groupId>dev.sheldan.sissi.templates.translations</groupId>
|
||||||
<artifactId>customization-translations</artifactId>
|
<artifactId>customization-translations</artifactId>
|
||||||
<version>1.3.2</version>
|
<version>1.3.19</version>
|
||||||
</parent>
|
</parent>
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<artifactId>sissi-translations</artifactId>
|
<artifactId>sissi-translations</artifactId>
|
||||||
<groupId>dev.sheldan.sissi.templates.translations</groupId>
|
<groupId>dev.sheldan.sissi.templates.translations</groupId>
|
||||||
<version>1.3.2</version>
|
<version>1.3.19</version>
|
||||||
</parent>
|
</parent>
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,36 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project xmlns="http://maven.apache.org/POM/4.0.0" 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>
|
||||||
|
<artifactId>module-translations</artifactId>
|
||||||
|
<groupId>dev.sheldan.sissi.templates.translations</groupId>
|
||||||
|
<version>1.3.19</version>
|
||||||
|
</parent>
|
||||||
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
|
||||||
|
<artifactId>debra-translations</artifactId>
|
||||||
|
|
||||||
|
<build>
|
||||||
|
<plugins>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
|
<artifactId>maven-assembly-plugin</artifactId>
|
||||||
|
<executions>
|
||||||
|
<execution>
|
||||||
|
<phase>package</phase>
|
||||||
|
<goals>
|
||||||
|
<goal>single</goal>
|
||||||
|
</goals>
|
||||||
|
<configuration>
|
||||||
|
<finalName>debra-translations-${project.version}</finalName>
|
||||||
|
<appendAssemblyId>false</appendAssemblyId>
|
||||||
|
<descriptors>
|
||||||
|
<descriptor>src/main/assembly/assembly.xml</descriptor>
|
||||||
|
</descriptors>
|
||||||
|
</configuration>
|
||||||
|
</execution>
|
||||||
|
</executions>
|
||||||
|
</plugin>
|
||||||
|
</plugins>
|
||||||
|
</build>
|
||||||
|
|
||||||
|
</project>
|
||||||
@@ -0,0 +1,15 @@
|
|||||||
|
<assembly xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2"
|
||||||
|
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||||
|
xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2 http://maven.apache.org/xsd/assembly-1.1.2.xsd">
|
||||||
|
<id>zip</id>
|
||||||
|
<includeBaseDirectory>false</includeBaseDirectory>
|
||||||
|
<formats>
|
||||||
|
<format>zip</format>
|
||||||
|
</formats>
|
||||||
|
<fileSets>
|
||||||
|
<fileSet>
|
||||||
|
<outputDirectory>.</outputDirectory>
|
||||||
|
<directory>${project.basedir}/src/main/resources</directory>
|
||||||
|
</fileSet>
|
||||||
|
</fileSets>
|
||||||
|
</assembly>
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
Anonym
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
Aktuell wurden **${donationAmount} Euro** für Debra Austria gespendet. Spende auch du unter https://tiny.cc/schmetterling2022.
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
Das hier sind die neuesten Spenden:
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
Das hier sind die höchsten Spenden:
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
Aktueller Spendenbetrag
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
${totalDonationAmount} Euro
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
Spende auch du für Debra Austria unter http://tiny.cc/schmetterling2022.
|
||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user