Compare commits

...

59 Commits

Author SHA1 Message Date
Sheldan
c0ced48ff2 [maven-release-plugin] prepare release sissi-1.3.13 2022-12-10 17:25:25 +01:00
Sheldan
b5dfb59458 [SIS-14] adding a configurable delay for debra donation notifications
adding more websocket event logging
preparing for release
2022-12-10 16:43:29 +01:00
Sheldan
c89e8591f0 [SIS-xx] adding missing debra template 2022-12-05 16:54:26 +01:00
Sheldan
507ac7b043 [maven-release-plugin] prepare for next development iteration 2022-12-03 20:38:28 +01:00
Sheldan
d64abb4cce [maven-release-plugin] prepare release sissi-1.3.12 2022-12-03 20:38:24 +01:00
Sheldan
e56999da19 [SIS-xx] preparing for release 2022-12-03 20:36:07 +01:00
Sheldan
06dc90a51e [maven-release-plugin] prepare for next development iteration 2022-12-02 21:47:23 +01:00
Sheldan
1842094036 [maven-release-plugin] prepare release sissi-1.3.11 2022-12-02 21:47:19 +01:00
Sheldan
b2d55c3236 [SIS-xx] preparing for release 2022-12-02 21:41:58 +01:00
Sheldan
b88ed34ed2 [maven-release-plugin] prepare for next development iteration 2022-12-02 02:02:33 +01:00
Sheldan
939ea35f39 [maven-release-plugin] prepare release sissi-1.3.10 2022-12-02 02:02:29 +01:00
Sheldan
5c718bfa5e [SIS-xx] preparing for release 2022-12-02 01:59:07 +01:00
Sheldan
0efee9e7aa [SIS-13] adapting donation notifications 2022-12-01 20:08:42 +01:00
Sheldan
f1f56b03d4 [maven-release-plugin] prepare for next development iteration 2022-12-01 07:57:20 +01:00
Sheldan
725afbd115 [maven-release-plugin] prepare release sissi-1.3.9 2022-12-01 07:57:16 +01:00
Sheldan
015ff303b7 [SIS-13] changing debra links to new version
adding a second post target for debra donation notifications
2022-12-01 07:55:53 +01:00
Sheldan
55d25697ce [SIS-12] fixing template key for exp level up notification 2022-11-21 08:15:11 +01:00
Sheldan
cdcfd5c8f8 [maven-release-plugin] prepare for next development iteration 2022-11-20 23:42:49 +01:00
Sheldan
42c307d962 [maven-release-plugin] prepare release sissi-1.3.8 2022-11-20 23:42:44 +01:00
Sheldan
3fbb635b4a [SIS-xxx] preparing for release 2022-11-20 23:40:05 +01:00
Sheldan
53761fba98 [maven-release-plugin] prepare for next development iteration 2022-11-20 22:59:39 +01:00
Sheldan
d0280ea116 [maven-release-plugin] prepare release sissi-1.3.7 2022-11-20 22:59:35 +01:00
Sheldan
bb605133bd [SIS-xxx] preparing for release 2022-11-20 22:57:24 +01:00
Sheldan
194f18ee22 [maven-release-plugin] prepare for next development iteration 2022-11-20 20:16:33 +01:00
Sheldan
4e1196a405 [maven-release-plugin] prepare release sissi-1.3.6 2022-11-20 20:16:29 +01:00
Sheldan
672ad9b9e4 [SIS-xxx] preparing for release 2022-11-20 20:13:16 +01:00
Sheldan
fd548b7bfe [SIS-12] removing experience storage dashboard
adding missing logging modules to images
2022-11-20 19:49:04 +01:00
Sheldan
888246cbbc [SIS-12] adding experience and logging module
customizing with appropriate templates
2022-11-20 17:25:04 +01:00
Sheldan
a26114331f [SIS-11] adding debra donation notification support 2022-11-05 23:45:52 +01:00
Sheldan
2ae472ae94 [maven-release-plugin] prepare for next development iteration 2022-10-27 21:29:32 +02:00
Sheldan
4cf1e0c1f1 [maven-release-plugin] prepare release sissi-1.3.5 2022-10-27 21:29:23 +02:00
Sheldan
6d1d70e664 [SIS-xxx] upgrading abstracto version to version 1.4.7
upgrading abstracto template version to version 1.4.5
2022-10-27 21:20:55 +02:00
Sheldan
2c9f38952c [SIS-xxx] changing emote for reaction report reaction 2022-10-21 19:17:02 +02:00
Sheldan
b801fc82c6 [maven-release-plugin] prepare for next development iteration 2022-10-16 14:37:50 +02:00
Sheldan
10255daa29 [maven-release-plugin] prepare release sissi-1.3.4 2022-10-16 14:37:45 +02:00
Sheldan
f0d7e98f70 [SIS-xxx] upgrading to new abstracto version
prepare for release
2022-10-16 14:35:41 +02:00
Sheldan
dfcfdd53c3 [SIS-xxx] upgrading to new JDA alpha 2022-09-18 15:53:19 +02:00
Sheldan
4a75447b7e [maven-release-plugin] prepare for next development iteration 2022-09-02 16:16:10 +02:00
Sheldan
bce5c89ad1 [maven-release-plugin] prepare release sissi-1.3.3 2022-09-02 16:16:06 +02:00
Sheldan
686afb88f6 [SIS-xxx] upgrading to abstracto 1.4.4 and preparing for new version 2022-09-02 15:54:44 +02:00
Sheldan
1abce06e2f [maven-release-plugin] prepare for next development iteration 2022-08-28 23:53:45 +02:00
Sheldan
69011ddac7 [maven-release-plugin] prepare release sissi-1.3.2 2022-08-28 23:53:41 +02:00
Sheldan
177934d1c9 [SIS-xxx] upgrading to abstracto 1.4.3 and preparing for new version 2022-08-28 23:30:58 +02:00
Sheldan
44e38ca1de [maven-release-plugin] prepare for next development iteration 2022-07-27 22:42:02 +02:00
Sheldan
cc23eaf2d6 [maven-release-plugin] prepare release sissi-1.3.1 2022-07-27 22:41:59 +02:00
Sheldan
d7f9a62a62 [SIS-xxx] prepare for new version 2022-07-27 22:20:26 +02:00
Sheldan
af8f2c10ff [SIS-xxx] aligning templates with a fix 2022-07-25 22:30:54 +02:00
Sheldan
a2818241f6 [SIS-xxx] adapting dashboard to show better command information 2022-07-25 19:14:07 +02:00
Sheldan
af8bf920c0 [SIS-xxx] fixing application name in grafana dashboard 2022-07-23 17:47:16 +02:00
Sheldan
b4d3aaac15 [maven-release-plugin] prepare for next development iteration 2022-07-23 11:16:40 +02:00
Sheldan
01c86558cd [maven-release-plugin] prepare release sissi-1.3.0 2022-07-23 11:16:35 +02:00
Sheldan
08bab02451 [SIS-xxx] preparing for release 2022-07-23 11:12:17 +02:00
Sheldan
84359fcdac [SIS-10] also enabling modmail 2022-07-22 15:39:59 +02:00
Sheldan
c006665a0c [SIS-10] also enabling assignable role place 2022-07-22 01:28:37 +02:00
Sheldan
4e29134fa5 [SIS-10] enabling additional modules 2022-07-22 01:14:54 +02:00
Sheldan
249a3e3d19 [SIS-9] adding migration scripts for custom commands and economy 2022-07-22 00:27:59 +02:00
Sheldan
7f8c429a04 [SIS-8] creating modmode customization
enabling entertainment and custom command module
2022-07-21 23:09:07 +02:00
Sheldan
d74c10c618 [SIS-5] enabling and customizing moderation 2022-07-18 20:10:33 +02:00
Sheldan
0ec7d83191 [maven-release-plugin] prepare for next development iteration 2022-07-17 21:58:54 +02:00
158 changed files with 5611 additions and 170 deletions

View File

@@ -34,5 +34,5 @@ jobs:
env:
REGISTRY_PREFIX: docker.pkg.github.com/sheldan/sissi/
VERSION: ${{ env.version }}
ABSTRACTO_VERSION: 1.4.0.RC2
ABSTRACTO_VERSION: 1.4.14
ABSTRACTO_REGISTRY_PREFIX: docker.pkg.github.com/sheldan/abstracto/

4
README Normal file
View 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.

View File

@@ -3,7 +3,7 @@
<parent>
<groupId>dev.sheldan.sissi.application</groupId>
<artifactId>application</artifactId>
<version>1.2.0</version>
<version>1.3.13</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>executable</artifactId>
@@ -70,11 +70,68 @@
<artifactId>link-embed-impl</artifactId>
</dependency>
<dependency>
<groupId>dev.sheldan.abstracto.modules</groupId>
<artifactId>webservices-impl</artifactId>
</dependency>
<dependency>
<groupId>dev.sheldan.abstracto.modules</groupId>
<artifactId>utility-impl</artifactId>
</dependency>
<dependency>
<groupId>dev.sheldan.abstracto.modules</groupId>
<artifactId>remind-impl</artifactId>
</dependency>
<dependency>
<groupId>dev.sheldan.abstracto.modules</groupId>
<artifactId>suggestion-impl</artifactId>
</dependency>
<dependency>
<groupId>dev.sheldan.abstracto.modules</groupId>
<artifactId>starboard-impl</artifactId>
</dependency>
<dependency>
<groupId>dev.sheldan.abstracto.modules</groupId>
<artifactId>moderation-impl</artifactId>
</dependency>
<dependency>
<groupId>dev.sheldan.abstracto.modules</groupId>
<artifactId>entertainment-impl</artifactId>
</dependency>
<dependency>
<groupId>dev.sheldan.abstracto.modules</groupId>
<artifactId>assignable-roles-impl</artifactId>
</dependency>
<dependency>
<groupId>dev.sheldan.abstracto.modules</groupId>
<artifactId>custom-command-impl</artifactId>
</dependency>
<dependency>
<groupId>dev.sheldan.abstracto.modules</groupId>
<artifactId>modmail-impl</artifactId>
</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 -->
<dependency>
<groupId>dev.sheldan.sissi.application.module</groupId>
<artifactId>quotes</artifactId>
@@ -87,6 +144,20 @@
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>dev.sheldan.sissi.application.module</groupId>
<artifactId>debra</artifactId>
<version>${project.version}</version>
</dependency>
<!-- sissi customizations -->
<dependency>
<groupId>dev.sheldan.sissi.application.module.custom</groupId>
<artifactId>moderation-custom</artifactId>
<version>${project.version}</version>
</dependency>
</dependencies>
</project>

View File

@@ -3,7 +3,7 @@
<parent>
<groupId>dev.sheldan.sissi</groupId>
<artifactId>sissi</artifactId>
<version>1.2.0</version>
<version>1.3.13</version>
</parent>
<modelVersion>4.0.0</modelVersion>
@@ -26,8 +26,9 @@
</dependencyManagement>
<modules>
<module>executable</module>
<module>sissi-modules</module>
<module>sissi-customizations</module>
<module>executable</module>
</modules>
<dependencies>

View 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.module.custom</groupId>
<artifactId>sissi-customizations</artifactId>
<version>1.3.13</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>moderation-custom</artifactId>
<dependencies>
<dependency>
<groupId>dev.sheldan.abstracto.modules</groupId>
<artifactId>moderation-int</artifactId>
<version>${abstracto.version}</version>
</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>

View File

@@ -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>

View File

@@ -0,0 +1,95 @@
package dev.sheldan.sissi.module.custom.moderation.commands;
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.abstracto.moderation.config.ModerationModuleDefinition;
import dev.sheldan.sissi.module.custom.moderation.config.ModerationCustomFeatureDefinition;
import dev.sheldan.sissi.module.custom.moderation.config.ModerationCustomSlashCommandNames;
import dev.sheldan.sissi.module.custom.moderation.service.ModModeServiceBean;
import net.dv8tion.jda.api.events.interaction.command.SlashCommandInteractionEvent;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import java.util.Collections;
import java.util.List;
import java.util.concurrent.CompletableFuture;
@Component
public class ModMode extends AbstractConditionableCommand {
public static final String NEW_STATE_PARAMETER = "newState";
public static final String MOD_MODE_COMMAND = "modMode";
public static final String MOD_MODE_RESPONSE = "modMode_response";
@Autowired
private ModModeServiceBean modModeServiceBean;
@Autowired
private SlashCommandParameterService slashCommandParameterService;
@Autowired
private InteractionService interactionService;
@Override
public CompletableFuture<CommandResult> executeAsync(CommandContext commandContext) {
Boolean newState = (Boolean) commandContext.getParameters().getParameters().get(0);
return modModeServiceBean.setModModeTo(commandContext.getGuild(), newState)
.thenApply(unused -> CommandResult.fromSuccess());
}
@Override
public CompletableFuture<CommandResult> executeSlash(SlashCommandInteractionEvent event) {
Boolean newState = slashCommandParameterService.getCommandOption(NEW_STATE_PARAMETER, event, Boolean.class);
return modModeServiceBean.setModModeTo(event.getGuild(), newState)
.thenApply(unused -> interactionService.replyEmbed(MOD_MODE_RESPONSE, event))
.thenApply(interactionHookCompletableFuture -> CommandResult.fromSuccess());
}
@Override
public CommandConfiguration getConfiguration() {
Parameter memberParameter = Parameter
.builder()
.templated(true)
.name(NEW_STATE_PARAMETER)
.type(Boolean.class)
.build();
List<Parameter> parameters = Collections.singletonList(memberParameter);
HelpInfo helpInfo = HelpInfo
.builder()
.templated(true)
.build();
SlashCommandConfig slashCommandConfig = SlashCommandConfig
.builder()
.enabled(true)
.rootCommandName(ModerationCustomSlashCommandNames.MODERATION)
.commandName(MOD_MODE_COMMAND)
.build();
return CommandConfiguration.builder()
.name(MOD_MODE_COMMAND)
.async(true)
.slashCommandConfig(slashCommandConfig)
.module(ModerationModuleDefinition.MODERATION)
.parameters(parameters)
.help(helpInfo)
.templated(true)
.supportsEmbedException(true)
.causesReaction(true)
.build();
}
@Override
public FeatureDefinition getFeature() {
return ModerationCustomFeatureDefinition.MODERATION_CUSTOM;
}
}

View File

@@ -0,0 +1,36 @@
package dev.sheldan.sissi.module.custom.moderation.config;
import dev.sheldan.abstracto.core.config.FeatureConfig;
import dev.sheldan.abstracto.core.config.FeatureDefinition;
import dev.sheldan.abstracto.moderation.config.feature.ReportReactionFeatureConfig;
import dev.sheldan.sissi.module.custom.moderation.service.ModModeServiceBean;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import java.util.Arrays;
import java.util.List;
import static dev.sheldan.sissi.module.custom.moderation.listener.ReactionReportReactionListener.REACTION_REPORT_REACTION_AMOUNT_CONFIG_KEY;
@Component
public class ModerationCustomFeature implements FeatureConfig {
@Autowired
private ReportReactionFeatureConfig reportReactionFeatureConfig;
@Override
public FeatureDefinition getFeature() {
return ModerationCustomFeatureDefinition.MODERATION_CUSTOM;
}
@Override
public List<FeatureConfig> getRequiredFeatures() {
return Arrays.asList(reportReactionFeatureConfig);
}
@Override
public List<String> getRequiredSystemConfigKeys() {
return Arrays.asList(REACTION_REPORT_REACTION_AMOUNT_CONFIG_KEY, ModModeServiceBean.MODMODE_ROLE_CONFIG_KEY,
ModModeServiceBean.MODMODE_CHANGED_ROLE_COLOR_CONFIG_KEY);
}
}

View File

@@ -0,0 +1,15 @@
package dev.sheldan.sissi.module.custom.moderation.config;
import dev.sheldan.abstracto.core.config.FeatureDefinition;
import lombok.Getter;
@Getter
public enum ModerationCustomFeatureDefinition implements FeatureDefinition {
MODERATION_CUSTOM("moderationCustom");
private String key;
ModerationCustomFeatureDefinition(String key) {
this.key = key;
}
}

View File

@@ -0,0 +1,10 @@
package dev.sheldan.sissi.module.custom.moderation.config;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.PropertySource;
@Configuration
@PropertySource("classpath:moderation-custom.properties")
public class ModerationCustomProperties {
}

View File

@@ -0,0 +1,5 @@
package dev.sheldan.sissi.module.custom.moderation.config;
public class ModerationCustomSlashCommandNames {
public static final String MODERATION = "moderation";
}

View File

@@ -0,0 +1,15 @@
package dev.sheldan.sissi.module.custom.moderation.exception;
import dev.sheldan.abstracto.core.exception.AbstractoTemplatableException;
public class ModRoleNotFoundException extends AbstractoTemplatableException {
@Override
public String getTemplateName() {
return "mod_role_not_found_exception";
}
@Override
public Object getTemplateModel() {
return new Object();
}
}

View File

@@ -0,0 +1,58 @@
package dev.sheldan.sissi.module.custom.moderation.listener;
import dev.sheldan.abstracto.core.config.FeatureDefinition;
import dev.sheldan.abstracto.core.listener.DefaultListenerResult;
import dev.sheldan.abstracto.core.service.ConfigService;
import dev.sheldan.abstracto.core.service.ReactionService;
import dev.sheldan.abstracto.moderation.listener.ReportMessageCreatedListener;
import dev.sheldan.abstracto.moderation.model.listener.ReportMessageCreatedModel;
import dev.sheldan.sissi.module.custom.moderation.config.ModerationCustomFeatureDefinition;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
@Component
@Slf4j
public class ReactionReportReactionListener implements ReportMessageCreatedListener {
public static final String REACTION_REPORT_REACTION_AMOUNT_CONFIG_KEY = "reportReactionAmount";
public static final String REACTION_REPORT_EMOTE_PREFIX = "reactionReport";
@Autowired
private ConfigService configService;
@Autowired
private ReactionService reactionService;
@Override
public DefaultListenerResult execute(ReportMessageCreatedModel model) {
if(model.getReportMessage() == null) {
return DefaultListenerResult.IGNORED;
}
Long reactionAmount = configService.getLongValueOrConfigDefault(REACTION_REPORT_REACTION_AMOUNT_CONFIG_KEY, model.getServerId());
for (int i = 0; i < reactionAmount; i++) {
String emoteKey = buildReactionEmoteName(i + 1);
reactionService.addReactionToMessageAsync(emoteKey,
model.getServerId(), model.getReportMessage().getChannelId(), model.getReportMessage().getMessageId())
.thenAccept(unused -> log.info("Added reaction emote {} on report message {} in channel {} in server {}",
emoteKey, model.getReportMessage().getMessageId(), model.getReportMessage().getChannelId(), model.getServerId()))
.exceptionally(throwable -> {
log.info("Failed to add reaction emote {} on report message {} in channel {} in server {}",
emoteKey, model.getReportMessage().getMessageId(), model.getReportMessage().getChannelId(), model.getServerId());
return null;
});
}
return DefaultListenerResult.PROCESSED;
}
@Override
public FeatureDefinition getFeature() {
return ModerationCustomFeatureDefinition.MODERATION_CUSTOM;
}
private String buildReactionEmoteName(Integer position) {
return REACTION_REPORT_EMOTE_PREFIX + position;
}
}

View File

@@ -0,0 +1,55 @@
package dev.sheldan.sissi.module.custom.moderation.service;
import dev.sheldan.abstracto.core.service.ConfigService;
import dev.sheldan.sissi.module.custom.moderation.exception.ModRoleNotFoundException;
import lombok.extern.slf4j.Slf4j;
import net.dv8tion.jda.api.entities.Guild;
import net.dv8tion.jda.api.entities.Role;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import java.awt.*;
import java.util.concurrent.CompletableFuture;
@Component
@Slf4j
public class ModModeServiceBean {
public static final String MODMODE_ROLE_CONFIG_KEY = "modModeRoleId";
public static final String MODMODE_CHANGED_ROLE_COLOR_CONFIG_KEY = "modModeNewRoleColor";
@Autowired
private ConfigService configService;
public CompletableFuture<Void> setModModeTo(Guild guild, Boolean newState) {
if(Boolean.TRUE.equals(newState)) {
return enableModMode(guild);
} else {
return disableModMoe(guild);
}
}
private CompletableFuture<Void> enableModMode(Guild guild) {
Color colorToSet = getColorFromConfig(MODMODE_CHANGED_ROLE_COLOR_CONFIG_KEY, guild);
return setModRoleTo(guild, colorToSet);
}
private CompletableFuture<Void> disableModMoe(Guild guild) {
return setModRoleTo(guild, null);
}
private Color getColorFromConfig(String key, Guild guild) {
String colorString = configService.getStringValueOrConfigDefault(key, guild.getIdLong());
String[] parts = colorString.split(",");
return new Color(Integer.parseInt(parts[0]), Integer.parseInt(parts[1]), Integer.parseInt(parts[2]));
}
private CompletableFuture<Void> setModRoleTo(Guild guild, Color color) {
Long roleId = configService.getLongValue(MODMODE_ROLE_CONFIG_KEY, guild.getIdLong());
Role modRole = guild.getRoleById(roleId);
if(modRole != null) {
return modRole.getManager().setColor(color).submit();
} else {
throw new ModRoleNotFoundException();
}
}
}

View File

@@ -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>

View File

@@ -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="default_emote.xml" relativeToChangelogFile="true"/>
</databaseChangeLog>

View File

@@ -0,0 +1,31 @@
<?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="moderation_custom_reaction_message_default_emote-insert">
<insert tableName="default_emote">
<column name="emote_key" value="reactionReport1"/>
<column name="name" value="♂️"/>
</insert>
<insert tableName="default_emote">
<column name="emote_key" value="reactionReport2"/>
<column name="name" value="📣"/>
</insert>
<insert tableName="default_emote">
<column name="emote_key" value="reactionReport3"/>
<column name="name" value="🤫"/>
</insert>
<insert tableName="default_emote">
<column name="emote_key" value="reactionReport4"/>
<column name="name" value="🔨"/>
</insert>
<insert tableName="default_emote">
<column name="emote_key" value="reactionReport5"/>
<column name="name" value="⚠️"/>
</insert>
</changeSet>
</databaseChangeLog>

View File

@@ -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="moderation_custom_feature-insertion">
<insert tableName="feature">
<column name="key" value="moderationCustom"/>
</insert>
</changeSet>
</databaseChangeLog>

View File

@@ -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>

View File

@@ -0,0 +1,18 @@
<?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="moderationCustomFeature" value="(SELECT id FROM feature WHERE key = 'moderationCustom')"/>
<property name="moderationModule" value="(SELECT id FROM module WHERE name = 'moderation')"/>
<changeSet author="Sheldan" id="moderationCustom_modmode-commands">
<insert tableName="command">
<column name="name" value="modMode"/>
<column name="module_id" valueComputed="${moderationModule}"/>
<column name="feature_id" valueComputed="${moderationCustomFeature}"/>
</insert>
</changeSet>
</databaseChangeLog>

View File

@@ -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>

View File

@@ -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="1.1.0/collection.xml" relativeToChangelogFile="true"/>
<include file="1.2.1/collection.xml" relativeToChangelogFile="true"/>
</databaseChangeLog>

View File

@@ -0,0 +1,11 @@
abstracto.featureFlags.moderationCustom.featureName=moderationCustom
abstracto.featureFlags.moderationCustom.enabled=false
abstracto.systemConfigs.reportReactionAmount.name=reportReactionAmount
abstracto.systemConfigs.reportReactionAmount.longValue=5
abstracto.systemConfigs.modModeRoleId.name=modModeRoleId
abstracto.systemConfigs.modModeRoleId.longValue=0
abstracto.systemConfigs.modModeNewRoleColor.name=modModeNewRoleColor
abstracto.systemConfigs.modModeNewRoleColor.stringValue=0,0,0

View File

@@ -0,0 +1,19 @@
<?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>application</artifactId>
<groupId>dev.sheldan.sissi.application</groupId>
<version>1.3.13</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<groupId>dev.sheldan.sissi.application.module.custom</groupId>
<artifactId>sissi-customizations</artifactId>
<packaging>pom</packaging>
<modules>
<module>moderation-custom</module>
</modules>
</project>

View File

@@ -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.application</groupId>
<artifactId>sissi-modules</artifactId>
<version>1.3.13</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<groupId>dev.sheldan.sissi.application.module</groupId>
<artifactId>debra</artifactId>
<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>

View File

@@ -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>

View File

@@ -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();
}
}

View File

@@ -0,0 +1,99 @@
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.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.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.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.math.BigDecimal;
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";
@Autowired
private ChannelService channelService;
@Autowired
private InteractionService interactionService;
@Autowired
private DonationService donationService;
@Autowired
private TemplateService templateService;
@Override
public CompletableFuture<CommandResult> executeAsync(CommandContext commandContext) {
MessageToSend messageToSend = getDonationMessageToSend();
return FutureUtils.toSingleFutureGeneric(channelService.sendMessageToSendToChannel(messageToSend, commandContext.getChannel()))
.thenApply(unused -> CommandResult.fromSuccess());
}
@Override
public CompletableFuture<CommandResult> executeSlash(SlashCommandInteractionEvent event) {
MessageToSend messageToSend = getDonationMessageToSend();
return interactionService.replyMessageToSend(messageToSend, event)
.thenApply(interactionHook -> CommandResult.fromSuccess());
}
private MessageToSend getDonationMessageToSend() {
BigDecimal currentDonationAmount = donationService.fetchCurrentDonationAmount();
DonationsModel donationModel = DonationsModel
.builder()
.donationAmount(currentDonationAmount)
.build();
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")
.build();
return CommandConfiguration.builder()
.name(DONATIONS_COMMAND_NAME)
.module(UtilityModuleDefinition.UTILITY)
.templated(true)
.slashCommandConfig(slashCommandConfig)
.async(true)
.supportsEmbedException(true)
.causesReaction(false)
.help(helpInfo)
.build();
}
@Override
public FeatureDefinition getFeature() {
return DebraFeatureDefinition.DEBRA;
}
}

View File

@@ -0,0 +1,30 @@
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_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);
}
}

View File

@@ -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;
}
}

View File

@@ -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;
}
}

View File

@@ -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 {
}

View File

@@ -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 donationsPageURL;
}

View File

@@ -0,0 +1,5 @@
package dev.sheldan.sissi.module.debra.config;
public class DebraSlashCommandNames {
public static final String DEBRA = "debra";
}

View File

@@ -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.Donation;
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.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) {
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.");
Donation 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);
webSocket.close(1000, null);
webSocket.close(1000, "Connection closed");
}
@Override
public void onClosing(WebSocket webSocket, int code, String reason) {
webSocket.close(1000, null);
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);
}
}

View File

@@ -0,0 +1,16 @@
package dev.sheldan.sissi.module.debra.model;
import lombok.Builder;
import lombok.Getter;
import lombok.ToString;
import java.math.BigDecimal;
@Getter
@Builder
@ToString
public class Donation {
private String donatorName;
private BigDecimal amount;
private String message;
}

View File

@@ -0,0 +1,12 @@
package dev.sheldan.sissi.module.debra.model.commands;
import lombok.Builder;
import lombok.Getter;
import java.math.BigDecimal;
@Getter
@Builder
public class DonationsModel {
private BigDecimal donationAmount;
}

View File

@@ -0,0 +1,14 @@
package dev.sheldan.sissi.module.debra.model.listener;
import dev.sheldan.sissi.module.debra.model.Donation;
import lombok.Builder;
import lombok.Getter;
import java.math.BigDecimal;
@Getter
@Builder
public class DonationNotificationModel {
private Donation donation;
private BigDecimal totalDonationAmount;
}

View File

@@ -0,0 +1,98 @@
package dev.sheldan.sissi.module.debra.service;
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.model.Donation;
import dev.sheldan.sissi.module.debra.model.listener.DonationNotificationModel;
import lombok.extern.slf4j.Slf4j;
import net.dv8tion.jda.api.entities.Message;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.math.BigDecimal;
import java.net.URL;
import java.util.List;
import java.util.Optional;
import java.util.concurrent.CompletableFuture;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
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;
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 \\/>(.*)");
private static final Pattern DONATION_PAGE_AMOUNT_PARTNER = Pattern.compile("\"metric4\",\\s*\"(.*)\"");
public Donation 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 Donation
.builder()
.message(donationMessage)
.donatorName(donatorName)
.amount(amount)
.build();
} else {
throw new IllegalArgumentException("String in wrong format");
}
}
public BigDecimal fetchCurrentDonationAmount() {
try (InputStream is = new URL(debraProperties.getDonationsPageURL()).openStream()) {
BufferedReader br = new BufferedReader(new InputStreamReader(is));
String line;
while ((line = br.readLine()) != null) {
Matcher matcher = DONATION_PAGE_AMOUNT_PARTNER.matcher(line);
if (matcher.find()) {
return new BigDecimal(matcher.group(1).replace(',', '.'));
}
}
log.warn("Did not find the donation amount in the configured URL {}", debraProperties.getDonationsPageURL());
throw new DonationAmountNotFoundException();
} catch (IOException ex) {
log.warn("Failed to load page for parsing donation amount {}.", debraProperties.getDonationsPageURL(), ex);
throw new DonationAmountNotFoundException();
}
}
public CompletableFuture<Void> sendDonationNotification(Donation donation) {
DonationNotificationModel model = DonationNotificationModel
.builder()
.donation(donation)
.totalDonationAmount(fetchCurrentDonationAmount())
.build();
MessageToSend messageToSend = templateService.renderEmbedTemplate(DEBRA_DONATION_NOTIFICATION_TEMPLATE_KEY, model);
Long targetServerId = Long.parseLong(System.getenv(DEBRA_DONATION_NOTIFICATION_SERVER_ID_ENV_NAME));
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);
}
}

View File

@@ -0,0 +1,11 @@
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.donationsPageURL=https://em.altruja.de/discord-fuer-debra-2022
abstracto.systemConfigs.debraDonationNotificationDelayMillis.name=debraDonationNotificationDelayMillis
abstracto.systemConfigs.debraDonationNotificationDelayMillis.longValue=60000

View File

@@ -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>

View File

@@ -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>

View File

@@ -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>

View File

@@ -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

View File

@@ -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>

View File

@@ -3,7 +3,7 @@
<parent>
<groupId>dev.sheldan.sissi.application</groupId>
<artifactId>sissi-modules</artifactId>
<version>1.2.0</version>
<version>1.3.13</version>
</parent>
<modelVersion>4.0.0</modelVersion>

View File

@@ -5,12 +5,12 @@ 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.config.SlashCommandConfig;
import dev.sheldan.abstracto.core.command.execution.CommandContext;
import dev.sheldan.abstracto.core.command.execution.CommandResult;
import dev.sheldan.abstracto.core.command.slash.parameter.SlashCommandParameterService;
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.abstracto.core.utils.FutureUtils;
import dev.sheldan.sissi.module.meetup.config.MeetupFeatureDefinition;
import dev.sheldan.sissi.module.meetup.config.MeetupSlashCommandNames;

View File

@@ -5,14 +5,14 @@ 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.config.SlashCommandConfig;
import dev.sheldan.abstracto.core.command.execution.CommandContext;
import dev.sheldan.abstracto.core.command.execution.CommandResult;
import dev.sheldan.abstracto.core.command.slash.parameter.SlashCommandParameterService;
import dev.sheldan.abstracto.core.config.FeatureDefinition;
import dev.sheldan.abstracto.core.interaction.ComponentService;
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.service.ComponentService;
import dev.sheldan.abstracto.core.templating.model.MessageToSend;
import dev.sheldan.abstracto.core.templating.service.TemplateService;
import dev.sheldan.abstracto.core.utils.FutureUtils;

View File

@@ -5,17 +5,17 @@ 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.config.SlashCommandConfig;
import dev.sheldan.abstracto.core.command.execution.CommandContext;
import dev.sheldan.abstracto.core.command.execution.CommandResult;
import dev.sheldan.abstracto.core.command.slash.parameter.SlashCommandParameterService;
import dev.sheldan.abstracto.core.config.FeatureDefinition;
import dev.sheldan.abstracto.core.interaction.ComponentService;
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.models.database.AChannel;
import dev.sheldan.abstracto.core.models.database.AUserInAServer;
import dev.sheldan.abstracto.core.models.template.display.MemberDisplay;
import dev.sheldan.abstracto.core.service.ChannelService;
import dev.sheldan.abstracto.core.service.ComponentService;
import dev.sheldan.abstracto.core.service.management.ChannelManagementService;
import dev.sheldan.abstracto.core.service.management.UserInServerManagementService;
import dev.sheldan.abstracto.core.templating.model.MessageToSend;

View File

@@ -5,11 +5,11 @@ 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.config.SlashCommandConfig;
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.service.ChannelService;
import dev.sheldan.abstracto.core.templating.model.MessageToSend;
import dev.sheldan.abstracto.core.templating.service.TemplateService;

View File

@@ -5,12 +5,12 @@ 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.config.SlashCommandConfig;
import dev.sheldan.abstracto.core.command.execution.CommandContext;
import dev.sheldan.abstracto.core.command.execution.CommandResult;
import dev.sheldan.abstracto.core.command.slash.parameter.SlashCommandParameterService;
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;

View File

@@ -2,11 +2,11 @@ package dev.sheldan.sissi.module.meetup.listener;
import dev.sheldan.abstracto.core.config.FeatureDefinition;
import dev.sheldan.abstracto.core.config.ListenerPriority;
import dev.sheldan.abstracto.core.listener.ButtonClickedListenerResult;
import dev.sheldan.abstracto.core.listener.async.jda.ButtonClickedListener;
import dev.sheldan.abstracto.core.models.listener.ButtonClickedListenerModel;
import dev.sheldan.abstracto.core.interaction.ComponentPayloadManagementService;
import dev.sheldan.abstracto.core.interaction.button.listener.ButtonClickedListener;
import dev.sheldan.abstracto.core.interaction.button.listener.ButtonClickedListenerModel;
import dev.sheldan.abstracto.core.interaction.button.listener.ButtonClickedListenerResult;
import dev.sheldan.abstracto.core.service.MessageService;
import dev.sheldan.abstracto.core.service.management.ComponentPayloadManagementService;
import dev.sheldan.sissi.module.meetup.config.MeetupFeatureDefinition;
import dev.sheldan.sissi.module.meetup.model.database.Meetup;
import dev.sheldan.sissi.module.meetup.model.payload.MeetupChangeTimeConfirmationPayload;

View File

@@ -2,18 +2,18 @@ package dev.sheldan.sissi.module.meetup.listener;
import dev.sheldan.abstracto.core.config.FeatureDefinition;
import dev.sheldan.abstracto.core.config.ListenerPriority;
import dev.sheldan.abstracto.core.listener.ButtonClickedListenerResult;
import dev.sheldan.abstracto.core.listener.async.jda.ButtonClickedListener;
import dev.sheldan.abstracto.core.interaction.ComponentPayloadManagementService;
import dev.sheldan.abstracto.core.interaction.ComponentPayloadService;
import dev.sheldan.abstracto.core.interaction.ComponentService;
import dev.sheldan.abstracto.core.interaction.button.listener.ButtonClickedListener;
import dev.sheldan.abstracto.core.interaction.button.listener.ButtonClickedListenerModel;
import dev.sheldan.abstracto.core.interaction.button.listener.ButtonClickedListenerResult;
import dev.sheldan.abstracto.core.models.database.AChannel;
import dev.sheldan.abstracto.core.models.database.AServer;
import dev.sheldan.abstracto.core.models.database.ComponentPayload;
import dev.sheldan.abstracto.core.models.listener.ButtonClickedListenerModel;
import dev.sheldan.abstracto.core.service.ChannelService;
import dev.sheldan.abstracto.core.service.ComponentPayloadService;
import dev.sheldan.abstracto.core.service.ComponentService;
import dev.sheldan.abstracto.core.service.MessageService;
import dev.sheldan.abstracto.core.service.management.ChannelManagementService;
import dev.sheldan.abstracto.core.service.management.ComponentPayloadManagementService;
import dev.sheldan.abstracto.core.service.management.ServerManagementService;
import dev.sheldan.abstracto.core.templating.model.MessageToSend;
import dev.sheldan.abstracto.core.utils.FutureUtils;

View File

@@ -2,10 +2,10 @@ package dev.sheldan.sissi.module.meetup.listener;
import dev.sheldan.abstracto.core.config.FeatureDefinition;
import dev.sheldan.abstracto.core.config.ListenerPriority;
import dev.sheldan.abstracto.core.listener.ButtonClickedListenerResult;
import dev.sheldan.abstracto.core.listener.async.jda.ButtonClickedListener;
import dev.sheldan.abstracto.core.interaction.button.listener.ButtonClickedListener;
import dev.sheldan.abstracto.core.interaction.button.listener.ButtonClickedListenerModel;
import dev.sheldan.abstracto.core.interaction.button.listener.ButtonClickedListenerResult;
import dev.sheldan.abstracto.core.models.database.AUserInAServer;
import dev.sheldan.abstracto.core.models.listener.ButtonClickedListenerModel;
import dev.sheldan.abstracto.core.models.template.display.MemberDisplay;
import dev.sheldan.abstracto.core.service.ChannelService;
import dev.sheldan.abstracto.core.service.management.UserInServerManagementService;

View File

@@ -1,6 +1,6 @@
package dev.sheldan.sissi.module.meetup.model.payload;
import dev.sheldan.abstracto.core.models.template.button.ButtonPayload;
import dev.sheldan.abstracto.core.interaction.button.ButtonPayload;
import lombok.Builder;
import lombok.Getter;
import lombok.Setter;

View File

@@ -1,6 +1,6 @@
package dev.sheldan.sissi.module.meetup.model.payload;
import dev.sheldan.abstracto.core.models.template.button.ButtonPayload;
import dev.sheldan.abstracto.core.interaction.button.ButtonPayload;
import lombok.Builder;
import lombok.Getter;
import lombok.Setter;

View File

@@ -1,6 +1,6 @@
package dev.sheldan.sissi.module.meetup.model.payload;
import dev.sheldan.abstracto.core.models.template.button.ButtonPayload;
import dev.sheldan.abstracto.core.interaction.button.ButtonPayload;
import dev.sheldan.sissi.module.meetup.model.database.MeetupDecision;
import lombok.Builder;
import lombok.Getter;

View File

@@ -1,10 +1,11 @@
package dev.sheldan.sissi.module.meetup.service;
import dev.sheldan.abstracto.core.interaction.ComponentPayloadManagementService;
import dev.sheldan.abstracto.core.interaction.ComponentPayloadService;
import dev.sheldan.abstracto.core.models.ServerChannelMessage;
import dev.sheldan.abstracto.core.models.database.AServer;
import dev.sheldan.abstracto.core.models.template.display.MemberDisplay;
import dev.sheldan.abstracto.core.service.*;
import dev.sheldan.abstracto.core.service.management.ComponentPayloadManagementService;
import dev.sheldan.abstracto.core.service.management.ServerManagementService;
import dev.sheldan.abstracto.core.templating.model.MessageToSend;
import dev.sheldan.abstracto.core.templating.service.TemplateService;
@@ -26,8 +27,8 @@ 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.MeetupParticipatorManagementServiceBean;
import lombok.extern.slf4j.Slf4j;
import net.dv8tion.jda.api.entities.GuildMessageChannel;
import net.dv8tion.jda.api.entities.MessageChannel;
import net.dv8tion.jda.api.entities.channel.middleman.GuildMessageChannel;
import net.dv8tion.jda.api.entities.channel.middleman.MessageChannel;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import org.springframework.transaction.annotation.Transactional;
@@ -291,15 +292,24 @@ public class MeetupServiceBean {
public void cleanupMeetups() {
Instant time = Instant.now().minus(1, ChronoUnit.DAYS);
List<Meetup> oldMeetups = meetupManagementServiceBean.getMeetupsOlderThan(time);
log.info("Deleting {} old meetups.", oldMeetups.size());
deleteMeetups(oldMeetups);
List<Meetup> cancelledMeetups = meetupManagementServiceBean.findCancelledMeetups();
log.info("Deleting {} cancelled meetups.", cancelledMeetups.size());
deleteMeetups(cancelledMeetups);
}
private void deleteMeetups(List<Meetup> oldMeetups) {
oldMeetups.forEach(meetup -> {
if(meetup.getMessageId() != null) {
messageService.deleteMessageInChannelInServer(meetup.getServer().getId(), meetup.getMeetupChannel().getId(), meetup.getMessageId());
Long messageId = meetup.getMessageId();
Long meetupId = meetup.getId().getId();
Long serverId = meetup.getServer().getId();
messageService.deleteMessageInChannelInServer(meetup.getServer().getId(), meetup.getMeetupChannel().getId(), meetup.getMessageId())
.exceptionally(throwable -> {
log.error("Failed to delete message {} for meetup {} in server {}.", messageId, meetupId, serverId);
return null;
});
}
meetupComponentManagementServiceBean.deleteAllComponents(meetup);
});

View File

@@ -3,7 +3,7 @@
<parent>
<groupId>dev.sheldan.sissi.application</groupId>
<artifactId>application</artifactId>
<version>1.2.0</version>
<version>1.3.13</version>
</parent>
<modelVersion>4.0.0</modelVersion>
@@ -13,6 +13,7 @@
<modules>
<module>quotes</module>
<module>meetup</module>
<module>debra</module>
</modules>

View File

@@ -3,7 +3,7 @@
<parent>
<groupId>dev.sheldan.sissi.application</groupId>
<artifactId>sissi-modules</artifactId>
<version>1.2.0</version>
<version>1.3.13</version>
</parent>
<modelVersion>4.0.0</modelVersion>

View File

@@ -4,12 +4,12 @@ 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.config.SlashCommandConfig;
import dev.sheldan.abstracto.core.command.execution.CommandContext;
import dev.sheldan.abstracto.core.command.execution.CommandResult;
import dev.sheldan.abstracto.core.command.slash.parameter.SlashCommandParameterService;
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.abstracto.core.models.database.AServer;
import dev.sheldan.abstracto.core.models.database.AUserInAServer;
import dev.sheldan.abstracto.core.service.ChannelService;
@@ -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.service.QuoteServiceBean;
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.interactions.InteractionHook;
import org.springframework.beans.factory.annotation.Autowired;

View File

@@ -4,12 +4,12 @@ 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.config.SlashCommandConfig;
import dev.sheldan.abstracto.core.command.execution.CommandContext;
import dev.sheldan.abstracto.core.command.execution.CommandResult;
import dev.sheldan.abstracto.core.command.slash.parameter.SlashCommandParameterService;
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.abstracto.core.models.database.AServer;
import dev.sheldan.abstracto.core.service.management.ServerManagementService;
import dev.sheldan.sissi.module.quotes.config.QuoteSlashCommandNames;

View File

@@ -4,12 +4,12 @@ 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.config.SlashCommandConfig;
import dev.sheldan.abstracto.core.command.execution.CommandContext;
import dev.sheldan.abstracto.core.command.execution.CommandResult;
import dev.sheldan.abstracto.core.command.slash.parameter.SlashCommandParameterService;
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.abstracto.core.models.database.AServer;
import dev.sheldan.abstracto.core.service.ChannelService;
import dev.sheldan.abstracto.core.service.management.ServerManagementService;
@@ -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.model.database.Quote;
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.interactions.InteractionHook;
import org.springframework.beans.factory.annotation.Autowired;

View File

@@ -4,12 +4,12 @@ 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.config.SlashCommandConfig;
import dev.sheldan.abstracto.core.command.execution.CommandContext;
import dev.sheldan.abstracto.core.command.execution.CommandResult;
import dev.sheldan.abstracto.core.command.slash.parameter.SlashCommandParameterService;
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.abstracto.core.models.database.AServer;
import dev.sheldan.abstracto.core.service.ChannelService;
import dev.sheldan.abstracto.core.service.management.ServerManagementService;
@@ -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.model.database.Quote;
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.interactions.InteractionHook;
import org.springframework.beans.factory.annotation.Autowired;

View File

@@ -6,9 +6,9 @@ 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.command.slash.parameter.SlashCommandParameterService;
import dev.sheldan.abstracto.core.config.FeatureDefinition;
import dev.sheldan.abstracto.core.interaction.InteractionService;
import dev.sheldan.abstracto.core.interaction.slash.parameter.SlashCommandParameterService;
import dev.sheldan.abstracto.core.service.ChannelService;
import dev.sheldan.abstracto.core.utils.FutureUtils;
import dev.sheldan.sissi.module.quotes.config.QuotesFeatureDefinition;

View File

@@ -19,6 +19,8 @@ import dev.sheldan.sissi.module.quotes.model.database.QuoteAttachment;
import dev.sheldan.sissi.module.quotes.repository.QuoteRepository;
import lombok.extern.slf4j.Slf4j;
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.stereotype.Component;

View File

@@ -3,7 +3,7 @@
<parent>
<groupId>dev.sheldan.sissi</groupId>
<artifactId>deployment</artifactId>
<version>1.2.0</version>
<version>1.3.13</version>
</parent>
<modelVersion>4.0.0</modelVersion>

View File

@@ -27,7 +27,8 @@ PROMETHEUS_PORT=9090
PGADMIN_PORT=5050
# default authentication for pg admin
PGADMIN_DEFAULT_EMAIL=sheldan@sheldan.dev
DEBRA_DONATION_NOTIFICATION_SERVER_ID=0
PGADMIN_DEFAULT_PASSWORD=admin
TOKEN=<INSERT TOKEN>
YOUTUBE_API_KEY=<INSERT KEY>
SISSI_VERSION=1.2.0
SISSI_VERSION=1.3.13

View File

@@ -3,7 +3,7 @@
<parent>
<groupId>dev.sheldan.sissi</groupId>
<artifactId>deployment</artifactId>
<version>1.2.0</version>
<version>1.3.13</version>
</parent>
<modelVersion>4.0.0</modelVersion>
@@ -42,7 +42,7 @@
<destFileName>app.jar</destFileName>
</artifactItem>
<!-- template artefacts -->
<!-- abstracto template artefacts -->
<artifactItem>
<groupId>dev.sheldan.abstracto-templates.templates</groupId>
<artifactId>core</artifactId>
@@ -53,6 +53,86 @@
<destFileName>core.zip</destFileName>
</artifactItem>
<artifactItem>
<groupId>dev.sheldan.abstracto-templates.templates</groupId>
<artifactId>assignable-roles</artifactId>
<version>${abstracto.templates.version}</version>
<type>zip</type>
<overWrite>true</overWrite>
<outputDirectory>${file.basedir}/deployment/template-artifacts/</outputDirectory>
<destFileName>assignable-roles.zip</destFileName>
</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>
<groupId>dev.sheldan.abstracto-templates.templates</groupId>
<artifactId>modmail</artifactId>
<version>${abstracto.templates.version}</version>
<type>zip</type>
<overWrite>true</overWrite>
<outputDirectory>${file.basedir}/deployment/template-artifacts/</outputDirectory>
<destFileName>modmail.zip</destFileName>
</artifactItem>
<artifactItem>
<groupId>dev.sheldan.abstracto-templates.templates</groupId>
<artifactId>utility</artifactId>
<version>${abstracto.templates.version}</version>
<type>zip</type>
<overWrite>true</overWrite>
<outputDirectory>${file.basedir}/deployment/template-artifacts/</outputDirectory>
<destFileName>utility.zip</destFileName>
</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>
<groupId>dev.sheldan.abstracto-templates.templates</groupId>
<artifactId>webservices</artifactId>
<version>${abstracto.templates.version}</version>
<type>zip</type>
<overWrite>true</overWrite>
<outputDirectory>${file.basedir}/deployment/template-artifacts/</outputDirectory>
<destFileName>webservices.zip</destFileName>
</artifactItem>
<artifactItem>
<groupId>dev.sheldan.abstracto-templates.templates</groupId>
<artifactId>remind</artifactId>
<version>${abstracto.templates.version}</version>
<type>zip</type>
<overWrite>true</overWrite>
<outputDirectory>${file.basedir}/deployment/template-artifacts/</outputDirectory>
<destFileName>remind.zip</destFileName>
</artifactItem>
<artifactItem>
<groupId>dev.sheldan.abstracto-templates.templates</groupId>
<artifactId>suggestion</artifactId>
<version>${abstracto.templates.version}</version>
<type>zip</type>
<overWrite>true</overWrite>
<outputDirectory>${file.basedir}/deployment/template-artifacts/</outputDirectory>
<destFileName>suggestion.zip</destFileName>
</artifactItem>
<artifactItem>
<groupId>dev.sheldan.abstracto-templates.templates</groupId>
<artifactId>link-embed</artifactId>
@@ -73,6 +153,37 @@
<destFileName>starboard.zip</destFileName>
</artifactItem>
<artifactItem>
<groupId>dev.sheldan.abstracto-templates.templates</groupId>
<artifactId>moderation</artifactId>
<version>${abstracto.templates.version}</version>
<type>zip</type>
<overWrite>true</overWrite>
<outputDirectory>${file.basedir}/deployment/template-artifacts/</outputDirectory>
<destFileName>moderation.zip</destFileName>
</artifactItem>
<artifactItem>
<groupId>dev.sheldan.abstracto-templates.templates</groupId>
<artifactId>entertainment</artifactId>
<version>${abstracto.templates.version}</version>
<type>zip</type>
<overWrite>true</overWrite>
<outputDirectory>${file.basedir}/deployment/template-artifacts/</outputDirectory>
<destFileName>entertainment.zip</destFileName>
</artifactItem>
<artifactItem>
<groupId>dev.sheldan.abstracto-templates.templates</groupId>
<artifactId>custom-command</artifactId>
<version>${abstracto.templates.version}</version>
<type>zip</type>
<overWrite>true</overWrite>
<outputDirectory>${file.basedir}/deployment/template-artifacts/</outputDirectory>
<destFileName>custom-command.zip</destFileName>
</artifactItem>
<!-- sissi template artefacts -->
<artifactItem>
<groupId>dev.sheldan.sissi.templates</groupId>
<artifactId>quotes-templates</artifactId>
@@ -93,7 +204,29 @@
<destFileName>meetup.zip</destFileName>
</artifactItem>
<!-- translation artefacts -->
<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 -->
<artifactItem>
<groupId>dev.sheldan.sissi.templates</groupId>
<artifactId>moderation-customization-templates</artifactId>
<version>${project.version}</version>
<type>zip</type>
<overWrite>true</overWrite>
<outputDirectory>${file.basedir}/deployment/template-artifacts/</outputDirectory>
<destFileName>moderation-custom.zip</destFileName>
</artifactItem>
<!-- abstracto translation artefacts -->
<artifactItem>
<groupId>dev.sheldan.abstracto-templates.translations</groupId>
@@ -115,6 +248,76 @@
<destFileName>link-embed.zip</destFileName>
</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>
<groupId>dev.sheldan.abstracto-templates.translations</groupId>
<artifactId>modmail</artifactId>
<version>${abstracto.templates.version}</version>
<type>zip</type>
<overWrite>true</overWrite>
<outputDirectory>${file.basedir}/deployment/translation-artifacts/</outputDirectory>
<destFileName>modmail.zip</destFileName>
</artifactItem>
<artifactItem>
<groupId>dev.sheldan.abstracto-templates.translations</groupId>
<artifactId>assignable-roles</artifactId>
<version>${abstracto.templates.version}</version>
<type>zip</type>
<overWrite>true</overWrite>
<outputDirectory>${file.basedir}/deployment/translation-artifacts/</outputDirectory>
<destFileName>assignable-roles.zip</destFileName>
</artifactItem>
<artifactItem>
<groupId>dev.sheldan.abstracto-templates.translations</groupId>
<artifactId>utility</artifactId>
<version>${abstracto.templates.version}</version>
<type>zip</type>
<overWrite>true</overWrite>
<outputDirectory>${file.basedir}/deployment/translation-artifacts/</outputDirectory>
<destFileName>utility.zip</destFileName>
</artifactItem>
<artifactItem>
<groupId>dev.sheldan.abstracto-templates.translations</groupId>
<artifactId>webservices</artifactId>
<version>${abstracto.templates.version}</version>
<type>zip</type>
<overWrite>true</overWrite>
<outputDirectory>${file.basedir}/deployment/translation-artifacts/</outputDirectory>
<destFileName>webservices.zip</destFileName>
</artifactItem>
<artifactItem>
<groupId>dev.sheldan.abstracto-templates.translations</groupId>
<artifactId>remind</artifactId>
<version>${abstracto.templates.version}</version>
<type>zip</type>
<overWrite>true</overWrite>
<outputDirectory>${file.basedir}/deployment/translation-artifacts/</outputDirectory>
<destFileName>remind.zip</destFileName>
</artifactItem>
<artifactItem>
<groupId>dev.sheldan.abstracto-templates.translations</groupId>
<artifactId>suggestion</artifactId>
<version>${abstracto.templates.version}</version>
<type>zip</type>
<overWrite>true</overWrite>
<outputDirectory>${file.basedir}/deployment/translation-artifacts/</outputDirectory>
<destFileName>suggestion.zip</destFileName>
</artifactItem>
<artifactItem>
<groupId>dev.sheldan.abstracto-templates.translations</groupId>
<artifactId>starboard</artifactId>
@@ -125,6 +328,48 @@
<destFileName>starboard.zip</destFileName>
</artifactItem>
<artifactItem>
<groupId>dev.sheldan.abstracto-templates.translations</groupId>
<artifactId>moderation</artifactId>
<version>${abstracto.templates.version}</version>
<type>zip</type>
<overWrite>true</overWrite>
<outputDirectory>${file.basedir}/deployment/translation-artifacts/</outputDirectory>
<destFileName>moderation.zip</destFileName>
</artifactItem>
<artifactItem>
<groupId>dev.sheldan.abstracto-templates.translations</groupId>
<artifactId>entertainment</artifactId>
<version>${abstracto.templates.version}</version>
<type>zip</type>
<overWrite>true</overWrite>
<outputDirectory>${file.basedir}/deployment/translation-artifacts/</outputDirectory>
<destFileName>entertainment.zip</destFileName>
</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>
<groupId>dev.sheldan.abstracto-templates.translations</groupId>
<artifactId>custom-command</artifactId>
<version>${abstracto.templates.version}</version>
<type>zip</type>
<overWrite>true</overWrite>
<outputDirectory>${file.basedir}/deployment/translation-artifacts/</outputDirectory>
<destFileName>custom-command.zip</destFileName>
</artifactItem>
<!-- sissi translation artefacts -->
<artifactItem>
<groupId>dev.sheldan.sissi.templates.translations</groupId>
<artifactId>quote-translations</artifactId>
@@ -145,9 +390,19 @@
<destFileName>meetup.zip</destFileName>
</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 -->
<!-- liquibase artifacts -->
<!-- abstracto liquibase artifacts -->
<artifactItem>
<groupId>dev.sheldan.abstracto.scheduling</groupId>
<artifactId>scheduling-impl</artifactId>
@@ -181,6 +436,28 @@
<destFileName>link-embed.zip</destFileName>
</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>
<groupId>dev.sheldan.abstracto.modules</groupId>
<artifactId>starboard-impl</artifactId>
@@ -192,7 +469,117 @@
<destFileName>starboard.zip</destFileName>
</artifactItem>
<!-- custom modules -->
<artifactItem>
<groupId>dev.sheldan.abstracto.modules</groupId>
<artifactId>assignable-roles-impl</artifactId>
<version>${abstracto.version}</version>
<classifier>liquibase</classifier>
<type>zip</type>
<overWrite>true</overWrite>
<outputDirectory>${file.basedir}/deployment/liquibase-artifacts/</outputDirectory>
<destFileName>assignable-roles.zip</destFileName>
</artifactItem>
<artifactItem>
<groupId>dev.sheldan.abstracto.modules</groupId>
<artifactId>utility-impl</artifactId>
<version>${abstracto.version}</version>
<classifier>liquibase</classifier>
<type>zip</type>
<overWrite>true</overWrite>
<outputDirectory>${file.basedir}/deployment/liquibase-artifacts/</outputDirectory>
<destFileName>utility.zip</destFileName>
</artifactItem>
<artifactItem>
<groupId>dev.sheldan.abstracto.modules</groupId>
<artifactId>modmail-impl</artifactId>
<version>${abstracto.version}</version>
<classifier>liquibase</classifier>
<type>zip</type>
<overWrite>true</overWrite>
<outputDirectory>${file.basedir}/deployment/liquibase-artifacts/</outputDirectory>
<destFileName>modmail.zip</destFileName>
</artifactItem>
<artifactItem>
<groupId>dev.sheldan.abstracto.modules</groupId>
<artifactId>utility-impl</artifactId>
<version>${abstracto.version}</version>
<classifier>liquibase</classifier>
<type>zip</type>
<overWrite>true</overWrite>
<outputDirectory>${file.basedir}/deployment/liquibase-artifacts/</outputDirectory>
<destFileName>utility.zip</destFileName>
</artifactItem>
<artifactItem>
<groupId>dev.sheldan.abstracto.modules</groupId>
<artifactId>webservices-impl</artifactId>
<version>${abstracto.version}</version>
<classifier>liquibase</classifier>
<type>zip</type>
<overWrite>true</overWrite>
<outputDirectory>${file.basedir}/deployment/liquibase-artifacts/</outputDirectory>
<destFileName>webservices.zip</destFileName>
</artifactItem>
<artifactItem>
<groupId>dev.sheldan.abstracto.modules</groupId>
<artifactId>remind-impl</artifactId>
<version>${abstracto.version}</version>
<classifier>liquibase</classifier>
<type>zip</type>
<overWrite>true</overWrite>
<outputDirectory>${file.basedir}/deployment/liquibase-artifacts/</outputDirectory>
<destFileName>remind.zip</destFileName>
</artifactItem>
<artifactItem>
<groupId>dev.sheldan.abstracto.modules</groupId>
<artifactId>suggestion-impl</artifactId>
<version>${abstracto.version}</version>
<classifier>liquibase</classifier>
<type>zip</type>
<overWrite>true</overWrite>
<outputDirectory>${file.basedir}/deployment/liquibase-artifacts/</outputDirectory>
<destFileName>suggestion.zip</destFileName>
</artifactItem>
<artifactItem>
<groupId>dev.sheldan.abstracto.modules</groupId>
<artifactId>moderation-impl</artifactId>
<version>${abstracto.version}</version>
<classifier>liquibase</classifier>
<type>zip</type>
<overWrite>true</overWrite>
<outputDirectory>${file.basedir}/deployment/liquibase-artifacts/</outputDirectory>
<destFileName>moderation.zip</destFileName>
</artifactItem>
<artifactItem>
<groupId>dev.sheldan.abstracto.modules</groupId>
<artifactId>entertainment-impl</artifactId>
<version>${abstracto.version}</version>
<classifier>liquibase</classifier>
<type>zip</type>
<overWrite>true</overWrite>
<outputDirectory>${file.basedir}/deployment/liquibase-artifacts/</outputDirectory>
<destFileName>entertainment.zip</destFileName>
</artifactItem>
<artifactItem>
<groupId>dev.sheldan.abstracto.modules</groupId>
<artifactId>custom-command-impl</artifactId>
<version>${abstracto.version}</version>
<classifier>liquibase</classifier>
<type>zip</type>
<overWrite>true</overWrite>
<outputDirectory>${file.basedir}/deployment/liquibase-artifacts/</outputDirectory>
<destFileName>custom-command.zip</destFileName>
</artifactItem>
<!-- sissi liquibase artifacts -->
<artifactItem>
<groupId>dev.sheldan.sissi.application.module</groupId>
@@ -216,12 +603,104 @@
<destFileName>meetup.zip</destFileName>
</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 -->
<artifactItem>
<groupId>dev.sheldan.sissi.application.module.custom</groupId>
<artifactId>moderation-custom</artifactId>
<version>${project.version}</version>
<classifier>liquibase</classifier>
<type>zip</type>
<overWrite>true</overWrite>
<outputDirectory>${file.basedir}/deployment/liquibase-artifacts/</outputDirectory>
<destFileName>moderation-custom.zip</destFileName>
</artifactItem>
<artifactItem>
<groupId>dev.sheldan.sissi.templates.translations</groupId>
<artifactId>moderation-customization-translations</artifactId>
<version>${project.version}</version>
<type>zip</type>
<overWrite>true</overWrite>
<outputDirectory>${file.basedir}/deployment/translation-artifacts/</outputDirectory>
<destFileName>moderation-custom.zip</destFileName>
</artifactItem>
<!-- overrides -->
<artifactItem>
<groupId>dev.sheldan.sissi.templates</groupId>
<artifactId>moderation-template-overrides</artifactId>
<version>${project.version}</version>
<type>zip</type>
<overWrite>true</overWrite>
<outputDirectory>${file.basedir}/deployment/template-artifacts/</outputDirectory>
<destFileName>moderation-template-overrides.zip</destFileName>
</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 -->
<artifactItem>
<groupId>dev.sheldan.sissi.templates.translations.overrides</groupId>
<artifactId>moderation-translation-overrides</artifactId>
<version>${project.version}</version>
<type>zip</type>
<overWrite>true</overWrite>
<outputDirectory>${file.basedir}/deployment/translation-artifacts/</outputDirectory>
<destFileName>moderation-translation-overrides.zip</destFileName>
</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>
</configuration>
</plugin>

View File

@@ -1,13 +1,37 @@
{
"template_artifacts": ["core","starboard", "link-embed", "quotes", "meetup"],
"translation_artifacts": ["core", "starboard", "link-embed", "quotes", "meetup"],
"template_artifacts": [
"core","starboard", "link-embed", "moderation", "entertainment", "custom-command", "utility", "webservices", "remind", "suggestion", "modmail", "assignable-roles", "experience-tracking", "logging",
"quotes", "meetup", "debra",
"moderation-custom",
"moderation-template-overrides", "experience-template-overrides", "logging-template-overrides"
],
"translation_artifacts": [
"core",
"starboard", "link-embed", "moderation", "entertainment", "custom-command", "utility", "webservices", "suggestion", "remind", "modmail", "assignable-roles", "experience-tracking", "logging",
"quotes", "meetup", "debra",
"moderation-custom",
"moderation-translation-overrides", "experience-translation-overrides", "logging-translation-overrides"
],
"liquibase_artifacts": [
{ "zip": "scheduling", "file": "scheduling-changeLog.xml" },
{ "zip": "core", "file": "core-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": "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": "entertainment", "file": "entertainment-changeLog.xml"},
{ "zip": "custom-command", "file": "custom-command-changeLog.xml"},
{ "zip": "utility", "file": "utility-changeLog.xml"},
{ "zip": "webservices", "file": "webservices-changeLog.xml"},
{ "zip": "remind", "file": "remind-changeLog.xml"},
{ "zip": "suggestion", "file": "suggestion-changeLog.xml"},
{ "zip": "modmail", "file": "modMail-changeLog.xml"},
{ "zip": "assignable-roles", "file": "assignableRoles-changeLog.xml"},
{ "zip": "moderation-custom", "file": "moderation-custom-changeLog.xml"}
]
}

View File

@@ -159,7 +159,7 @@
{
"expr": "increase(command_processed_total[1m])",
"interval": "",
"legendFormat": "{{status}}",
"legendFormat": "{{type}}-{{status}}",
"refId": "A"
}
],
@@ -788,99 +788,6 @@
"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": {},
"bars": false,
@@ -1082,7 +989,7 @@
"hide": 2,
"label": null,
"name": "application",
"query": "sissi",
"query": "Sissi",
"skipUrlSync": false,
"type": "constant"
}

View File

@@ -3,7 +3,7 @@
<parent>
<groupId>dev.sheldan.sissi</groupId>
<artifactId>sissi</artifactId>
<version>1.2.0</version>
<version>1.3.13</version>
</parent>
<modelVersion>4.0.0</modelVersion>

View File

@@ -13,15 +13,15 @@
<groupId>dev.sheldan.sissi</groupId>
<artifactId>sissi</artifactId>
<name>Sissi</name>
<version>1.2.0</version>
<version>1.3.13</version>
<properties>
<maven.compiler.target>1.8</maven.compiler.target>
<maven.compiler.source>1.8</maven.compiler.source>
<!-- edit in release.yml as well -->
<!-- when releasing a new bot version, update the .env as well-->
<abstracto.version>1.4.0.RC2</abstracto.version>
<abstracto.templates.version>1.4.0.RC1</abstracto.templates.version>
<abstracto.version>1.4.14</abstracto.version>
<abstracto.templates.version>1.4.9</abstracto.templates.version>
</properties>
<modules>
@@ -57,7 +57,7 @@
<scm>
<url>https://maven.pkg.github.com/Sheldan/Sissi</url>
<developerConnection>scm:git:git@github.com:Sheldan/Sissi.git</developerConnection>
<tag>sissi-1.2.0</tag>
<tag>sissi-1.3.13</tag>
</scm>
</project>

View File

@@ -3,7 +3,7 @@
<parent>
<groupId>dev.sheldan.sissi</groupId>
<artifactId>sissi</artifactId>
<version>1.2.0</version>
<version>1.3.13</version>
</parent>
<modelVersion>4.0.0</modelVersion>

View File

@@ -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>
<groupId>dev.sheldan.sissi.templates</groupId>
<artifactId>customization-templates</artifactId>
<version>1.3.13</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>moderation-customization-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>moderation-customization-templates-${project.version}</finalName>
<appendAssemblyId>false</appendAssemblyId>
<descriptors>
<descriptor>src/main/assembly/assembly.xml</descriptor>
</descriptors>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>

View File

@@ -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>

View File

@@ -0,0 +1,6 @@
{
"additionalMessage": "<@safe_include "modMode_response_text"/>",
"messageConfig": {
"ephemeral": true
}
}

View File

@@ -0,0 +1,17 @@
<?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>sissi-templates</artifactId>
<groupId>dev.sheldan.sissi.templates</groupId>
<version>1.3.13</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>customization-templates</artifactId>
<packaging>pom</packaging>
<modules>
<module>moderation-customization-templates</module>
</modules>
</project>

View File

@@ -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.13</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>

View File

@@ -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>

View File

@@ -0,0 +1,10 @@
{
<#assign donationAmount=donationAmount>
<#setting locale="de_DE">
"additionalMessage": "<#include "donations_response_description">",
"embeds": [
{
"imageUrl": "https://cdn.discordapp.com/attachments/299115929206390784/1047306670319079474/dotpict-1.png"
}
]
}

View File

@@ -0,0 +1 @@
<#include "donation_amount_not_found_exception_text">

View File

@@ -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
}
}
]
}

View File

@@ -3,7 +3,7 @@
<parent>
<artifactId>module-templates</artifactId>
<groupId>dev.sheldan.sissi.templates</groupId>
<version>1.2.0</version>
<version>1.3.13</version>
</parent>
<modelVersion>4.0.0</modelVersion>

View File

@@ -3,7 +3,7 @@
<parent>
<groupId>dev.sheldan.sissi.templates</groupId>
<artifactId>sissi-templates</artifactId>
<version>1.2.0</version>
<version>1.3.13</version>
</parent>
<modelVersion>4.0.0</modelVersion>
@@ -12,6 +12,7 @@
<modules>
<module>quotes-templates</module>
<module>meetup-templates</module>
<module>debra-templates</module>
</modules>
</project>

View File

@@ -3,7 +3,7 @@
<parent>
<groupId>dev.sheldan.sissi.templates</groupId>
<artifactId>module-templates</artifactId>
<version>1.2.0</version>
<version>1.3.13</version>
</parent>
<modelVersion>4.0.0</modelVersion>

View File

@@ -3,7 +3,7 @@
<parent>
<groupId>dev.sheldan.sissi.templates</groupId>
<artifactId>templates</artifactId>
<version>1.2.0</version>
<version>1.3.13</version>
</parent>
<modelVersion>4.0.0</modelVersion>
@@ -12,5 +12,7 @@
<packaging>pom</packaging>
<modules>
<module>module-templates</module>
<module>template-overrides</module>
<module>customization-templates</module>
</modules>
</project>

View File

@@ -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.13</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>

View File

@@ -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>

View File

@@ -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"/>"
}

View File

@@ -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.13</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>

View File

@@ -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>

View File

@@ -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"/>"
}

View File

@@ -0,0 +1,5 @@
{
<#assign userName>${user.name}#${user.discriminator} (${user.id})</#assign>
<#setting locale="de_DE">
"additionalMessage": "<@safe_include "user_left_text"/>"
}

View File

@@ -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.13</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>moderation-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>moderation-template-overrides-${project.version}</finalName>
<appendAssemblyId>false</appendAssemblyId>
<descriptors>
<descriptor>src/main/assembly/assembly.xml</descriptor>
</descriptors>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>

View File

@@ -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>

View File

@@ -0,0 +1,40 @@
{
"embeds": [
{
<#include "abstracto_color">,
<#assign messageLink=reportedMessage.messageUrl>
<#assign userMention>${reportedMessage.author.asMention}</#assign>
<#assign messageContent><#if reportedMessage.content?has_content>`${reportedMessage.content?json_string}`<#else><@safe_include "reactionReport_no_content"/></#if></#assign>
"description" : "<#if context?has_content><@safe_include "reactionReport_additional_context_label"/>: `${context?json_string}`</#if>
<@safe_include "reactionReport_notification_embed_description"/>",
"footer": {
"text": "<@safe_include "reaction_report_custom_text"/>"
}
<#if reportedMessage.attachments?size gt 0>
,"imageUrl": "${reportedMessage.attachments[0].proxyUrl}"
<#elseif reportedMessage.attachments?size = 0 && reportedMessage.embeds?size gt 0 && reportedMessage.embeds[0].cachedThumbnail??>
,"imageUrl": "${reportedMessage.embeds[0].cachedThumbnail.proxyUrl}"
<#elseif reportedMessage.attachments?size = 0 && reportedMessage.embeds?size gt 0 && reportedMessage.embeds[0].cachedImageInfo??>
,"imageUrl": "${reportedMessage.embeds[0].cachedImageInfo.proxyUrl}"
</#if>
<#if singularMessage>,
,"fields": [
{
"name": "<@safe_include "reactionReport_notification_embed_report_counter_field_title"/>",
"value": "${reportCount}"
}
]
</#if>
}
],
"buttons": [
{
"label": "<@safe_include "reactionReport_jump_button_label"/>",
"url": "${messageLink?json_string}",
"buttonStyle": "link",
"metaConfig": {
"persistCallback": false
}
}
]
}

View File

@@ -0,0 +1,18 @@
<?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>sissi-templates</artifactId>
<groupId>dev.sheldan.sissi.templates</groupId>
<version>1.3.13</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>template-overrides</artifactId>
<packaging>pom</packaging>
<modules>
<module>moderation-template-overrides</module>
<module>experience-template-overrides</module>
<module>logging-template-overrides</module>
</modules>
</project>

Some files were not shown because too many files have changed in this diff Show More