mirror of
https://github.com/Sheldan/OnePlusBot.git
synced 2026-01-09 02:44:02 +00:00
Compare commits
5 Commits
oneplusbot
...
oneplusbot
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
c7e8fd315f | ||
|
|
95ad8fdd3a | ||
|
|
51775b454e | ||
|
|
aa4de8f571 | ||
|
|
eae07fd07c |
2
.github/workflows/release.yml
vendored
2
.github/workflows/release.yml
vendored
@@ -34,5 +34,5 @@ jobs:
|
|||||||
env:
|
env:
|
||||||
REGISTRY_PREFIX: docker.pkg.github.com/sheldan/oneplusbot/
|
REGISTRY_PREFIX: docker.pkg.github.com/sheldan/oneplusbot/
|
||||||
VERSION: ${{ env.version }}
|
VERSION: ${{ env.version }}
|
||||||
ABSTRACTO_VERSION: 1.3.9
|
ABSTRACTO_VERSION: 1.3.10
|
||||||
ABSTRACTO_REGISTRY_PREFIX: docker.pkg.github.com/sheldan/abstracto/
|
ABSTRACTO_REGISTRY_PREFIX: docker.pkg.github.com/sheldan/abstracto/
|
||||||
@@ -3,7 +3,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>dev.sheldan.oneplus.bot.application</groupId>
|
<groupId>dev.sheldan.oneplus.bot.application</groupId>
|
||||||
<artifactId>application</artifactId>
|
<artifactId>application</artifactId>
|
||||||
<version>1.5.8</version>
|
<version>1.5.9</version>
|
||||||
</parent>
|
</parent>
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>dev.sheldan.oneplus.bot.application</groupId>
|
<groupId>dev.sheldan.oneplus.bot.application</groupId>
|
||||||
<artifactId>application</artifactId>
|
<artifactId>application</artifactId>
|
||||||
<version>1.5.8</version>
|
<version>1.5.9</version>
|
||||||
</parent>
|
</parent>
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
<artifactId>executable</artifactId>
|
<artifactId>executable</artifactId>
|
||||||
@@ -191,6 +191,12 @@
|
|||||||
<version>${project.version}</version>
|
<version>${project.version}</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>dev.sheldan.oneplus.bot.application.modules</groupId>
|
||||||
|
<artifactId>seasonal</artifactId>
|
||||||
|
<version>${project.version}</version>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
</dependencies>
|
</dependencies>
|
||||||
|
|
||||||
</project>
|
</project>
|
||||||
@@ -3,7 +3,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>dev.sheldan.oneplus.bot.application.custom</groupId>
|
<groupId>dev.sheldan.oneplus.bot.application.custom</groupId>
|
||||||
<artifactId>oneplus-bot-customizations</artifactId>
|
<artifactId>oneplus-bot-customizations</artifactId>
|
||||||
<version>1.5.8</version>
|
<version>1.5.9</version>
|
||||||
</parent>
|
</parent>
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<artifactId>oneplus-bot-customizations</artifactId>
|
<artifactId>oneplus-bot-customizations</artifactId>
|
||||||
<groupId>dev.sheldan.oneplus.bot.application.custom</groupId>
|
<groupId>dev.sheldan.oneplus.bot.application.custom</groupId>
|
||||||
<version>1.5.8</version>
|
<version>1.5.9</version>
|
||||||
</parent>
|
</parent>
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>dev.sheldan.oneplus.bot.application</groupId>
|
<groupId>dev.sheldan.oneplus.bot.application</groupId>
|
||||||
<artifactId>application</artifactId>
|
<artifactId>application</artifactId>
|
||||||
<version>1.5.8</version>
|
<version>1.5.9</version>
|
||||||
</parent>
|
</parent>
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>dev.sheldan.oneplus.bot.application.custom</groupId>
|
<groupId>dev.sheldan.oneplus.bot.application.custom</groupId>
|
||||||
<artifactId>oneplus-bot-customizations</artifactId>
|
<artifactId>oneplus-bot-customizations</artifactId>
|
||||||
<version>1.5.8</version>
|
<version>1.5.9</version>
|
||||||
</parent>
|
</parent>
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<artifactId>oneplus-bot-modules</artifactId>
|
<artifactId>oneplus-bot-modules</artifactId>
|
||||||
<groupId>dev.sheldan.oneplus.bot.application.modules</groupId>
|
<groupId>dev.sheldan.oneplus.bot.application.modules</groupId>
|
||||||
<version>1.5.8</version>
|
<version>1.5.9</version>
|
||||||
</parent>
|
</parent>
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>dev.sheldan.oneplus.bot.application.modules</groupId>
|
<groupId>dev.sheldan.oneplus.bot.application.modules</groupId>
|
||||||
<artifactId>oneplus-bot-modules</artifactId>
|
<artifactId>oneplus-bot-modules</artifactId>
|
||||||
<version>1.5.8</version>
|
<version>1.5.9</version>
|
||||||
</parent>
|
</parent>
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>dev.sheldan.oneplus.bot.application</groupId>
|
<groupId>dev.sheldan.oneplus.bot.application</groupId>
|
||||||
<artifactId>application</artifactId>
|
<artifactId>application</artifactId>
|
||||||
<version>1.5.8</version>
|
<version>1.5.9</version>
|
||||||
</parent>
|
</parent>
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
|
||||||
@@ -15,6 +15,7 @@
|
|||||||
<module>setup</module>
|
<module>setup</module>
|
||||||
<module>referral</module>
|
<module>referral</module>
|
||||||
<module>faq</module>
|
<module>faq</module>
|
||||||
|
<module>seasonal</module>
|
||||||
</modules>
|
</modules>
|
||||||
|
|
||||||
<properties>
|
<properties>
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>dev.sheldan.oneplus.bot.application.modules</groupId>
|
<groupId>dev.sheldan.oneplus.bot.application.modules</groupId>
|
||||||
<artifactId>oneplus-bot-modules</artifactId>
|
<artifactId>oneplus-bot-modules</artifactId>
|
||||||
<version>1.5.8</version>
|
<version>1.5.9</version>
|
||||||
</parent>
|
</parent>
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
|
||||||
|
|||||||
39
application/oneplus-bot-modules/seasonal/pom.xml
Normal file
39
application/oneplus-bot-modules/seasonal/pom.xml
Normal file
@@ -0,0 +1,39 @@
|
|||||||
|
<?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.oneplus.bot.application.modules</groupId>
|
||||||
|
<artifactId>oneplus-bot-modules</artifactId>
|
||||||
|
<version>1.5.9</version>
|
||||||
|
</parent>
|
||||||
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
|
||||||
|
<artifactId>seasonal</artifactId>
|
||||||
|
|
||||||
|
<properties>
|
||||||
|
<maven.compiler.source>8</maven.compiler.source>
|
||||||
|
<maven.compiler.target>8</maven.compiler.target>
|
||||||
|
</properties>
|
||||||
|
|
||||||
|
<build>
|
||||||
|
<plugins>
|
||||||
|
<plugin>
|
||||||
|
<artifactId>maven-assembly-plugin</artifactId>
|
||||||
|
<configuration>
|
||||||
|
<descriptors>
|
||||||
|
<descriptor>src/main/assembly/liquibase.xml</descriptor>
|
||||||
|
</descriptors>
|
||||||
|
</configuration>
|
||||||
|
<executions>
|
||||||
|
<execution>
|
||||||
|
<id>make-assembly</id>
|
||||||
|
<phase>package</phase>
|
||||||
|
<goals>
|
||||||
|
<goal>single</goal>
|
||||||
|
</goals>
|
||||||
|
</execution>
|
||||||
|
</executions>
|
||||||
|
</plugin>
|
||||||
|
</plugins>
|
||||||
|
</build>
|
||||||
|
|
||||||
|
</project>
|
||||||
@@ -0,0 +1,18 @@
|
|||||||
|
<assembly xmlns="http://maven.apache.org/ASSEMBLY/2.1.0"
|
||||||
|
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||||
|
xsi:schemaLocation="http://maven.apache.org/ASSEMBLY/2.1.0 http://maven.apache.org/xsd/assembly-2.1.0.xsd">
|
||||||
|
<id>liquibase</id>
|
||||||
|
<formats>
|
||||||
|
<format>zip</format>
|
||||||
|
</formats>
|
||||||
|
<includeBaseDirectory>false</includeBaseDirectory>
|
||||||
|
<fileSets>
|
||||||
|
<fileSet>
|
||||||
|
<outputDirectory>.</outputDirectory>
|
||||||
|
<directory>${project.basedir}/src/main/resources/migrations</directory>
|
||||||
|
<includes>
|
||||||
|
<include>**/*</include>
|
||||||
|
</includes>
|
||||||
|
</fileSet>
|
||||||
|
</fileSets>
|
||||||
|
</assembly>
|
||||||
@@ -0,0 +1,24 @@
|
|||||||
|
package dev.sheldan.oneplus.bot.modules.seasonal.config;
|
||||||
|
|
||||||
|
import dev.sheldan.abstracto.core.command.config.ModuleDefinition;
|
||||||
|
import dev.sheldan.abstracto.core.command.config.ModuleInfo;
|
||||||
|
import org.springframework.stereotype.Component;
|
||||||
|
|
||||||
|
@Component
|
||||||
|
public class SeasonalEntertainmentFeatureDefinition implements ModuleDefinition {
|
||||||
|
public static final String ENTERTAINMENT = "entertainment";
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public ModuleInfo getInfo() {
|
||||||
|
return ModuleInfo
|
||||||
|
.builder()
|
||||||
|
.name(ENTERTAINMENT)
|
||||||
|
.templated(true)
|
||||||
|
.build();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getParentModule() {
|
||||||
|
return "default";
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,15 @@
|
|||||||
|
package dev.sheldan.oneplus.bot.modules.seasonal.config;
|
||||||
|
|
||||||
|
import dev.sheldan.abstracto.core.config.FeatureDefinition;
|
||||||
|
import lombok.Getter;
|
||||||
|
|
||||||
|
@Getter
|
||||||
|
public enum SeasonalFeatureDefinition implements FeatureDefinition {
|
||||||
|
LIGHTS("lights");
|
||||||
|
|
||||||
|
private String key;
|
||||||
|
|
||||||
|
SeasonalFeatureDefinition(String key) {
|
||||||
|
this.key = key;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,10 @@
|
|||||||
|
package dev.sheldan.oneplus.bot.modules.seasonal.config;
|
||||||
|
|
||||||
|
import org.springframework.context.annotation.Configuration;
|
||||||
|
import org.springframework.context.annotation.PropertySource;
|
||||||
|
|
||||||
|
@Configuration
|
||||||
|
@PropertySource("classpath:seasonal.properties")
|
||||||
|
public class SeasonalProperties {
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,58 @@
|
|||||||
|
package dev.sheldan.oneplus.bot.modules.seasonal.lights.command;
|
||||||
|
|
||||||
|
import dev.sheldan.abstracto.core.command.condition.AbstractConditionableCommand;
|
||||||
|
import dev.sheldan.abstracto.core.command.config.CommandConfiguration;
|
||||||
|
import dev.sheldan.abstracto.core.command.config.HelpInfo;
|
||||||
|
import dev.sheldan.abstracto.core.command.config.Parameter;
|
||||||
|
import dev.sheldan.abstracto.core.command.execution.CommandContext;
|
||||||
|
import dev.sheldan.abstracto.core.command.execution.CommandResult;
|
||||||
|
import dev.sheldan.abstracto.core.config.FeatureDefinition;
|
||||||
|
import dev.sheldan.abstracto.core.exception.EntityGuildMismatchException;
|
||||||
|
import dev.sheldan.oneplus.bot.modules.seasonal.config.SeasonalEntertainmentFeatureDefinition;
|
||||||
|
import dev.sheldan.oneplus.bot.modules.seasonal.config.SeasonalFeatureDefinition;
|
||||||
|
import dev.sheldan.oneplus.bot.modules.seasonal.lights.service.LightsRoleServiceBean;
|
||||||
|
import net.dv8tion.jda.api.entities.Role;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.stereotype.Component;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
@Component
|
||||||
|
public class AddRoleToLights extends AbstractConditionableCommand {
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private LightsRoleServiceBean lightsMemberServiceBean;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public CommandResult execute(CommandContext commandContext) {
|
||||||
|
List<Object> parameters = commandContext.getParameters().getParameters();
|
||||||
|
Role role = (Role) parameters.get(0);
|
||||||
|
if(!role.getGuild().equals(commandContext.getGuild())) {
|
||||||
|
throw new EntityGuildMismatchException();
|
||||||
|
}
|
||||||
|
lightsMemberServiceBean.addMemberToSeasonalLights(role);
|
||||||
|
return CommandResult.fromSuccess();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public CommandConfiguration getConfiguration() {
|
||||||
|
List<Parameter> parameters = new ArrayList<>();
|
||||||
|
parameters.add(Parameter.builder().name("role").templated(true).type(Role.class).build());
|
||||||
|
HelpInfo helpInfo = HelpInfo.builder().templated(true).build();
|
||||||
|
return CommandConfiguration.builder()
|
||||||
|
.name("addRoleToLights")
|
||||||
|
.module(SeasonalEntertainmentFeatureDefinition.ENTERTAINMENT)
|
||||||
|
.templated(true)
|
||||||
|
.supportsEmbedException(true)
|
||||||
|
.causesReaction(true)
|
||||||
|
.parameters(parameters)
|
||||||
|
.help(helpInfo)
|
||||||
|
.build();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public FeatureDefinition getFeature() {
|
||||||
|
return SeasonalFeatureDefinition.LIGHTS;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,58 @@
|
|||||||
|
package dev.sheldan.oneplus.bot.modules.seasonal.lights.command;
|
||||||
|
|
||||||
|
import dev.sheldan.abstracto.core.command.condition.AbstractConditionableCommand;
|
||||||
|
import dev.sheldan.abstracto.core.command.config.CommandConfiguration;
|
||||||
|
import dev.sheldan.abstracto.core.command.config.HelpInfo;
|
||||||
|
import dev.sheldan.abstracto.core.command.config.Parameter;
|
||||||
|
import dev.sheldan.abstracto.core.command.execution.CommandContext;
|
||||||
|
import dev.sheldan.abstracto.core.command.execution.CommandResult;
|
||||||
|
import dev.sheldan.abstracto.core.config.FeatureDefinition;
|
||||||
|
import dev.sheldan.abstracto.core.exception.EntityGuildMismatchException;
|
||||||
|
import dev.sheldan.oneplus.bot.modules.seasonal.config.SeasonalEntertainmentFeatureDefinition;
|
||||||
|
import dev.sheldan.oneplus.bot.modules.seasonal.config.SeasonalFeatureDefinition;
|
||||||
|
import dev.sheldan.oneplus.bot.modules.seasonal.lights.service.LightsRoleServiceBean;
|
||||||
|
import net.dv8tion.jda.api.entities.Role;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.stereotype.Component;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
@Component
|
||||||
|
public class RemoveRoleFromLights extends AbstractConditionableCommand {
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private LightsRoleServiceBean lightsMemberServiceBean;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public CommandResult execute(CommandContext commandContext) {
|
||||||
|
List<Object> parameters = commandContext.getParameters().getParameters();
|
||||||
|
Role role = (Role) parameters.get(0);
|
||||||
|
if(!role.getGuild().equals(commandContext.getGuild())) {
|
||||||
|
throw new EntityGuildMismatchException();
|
||||||
|
}
|
||||||
|
lightsMemberServiceBean.removeMemberFromSeasonalLights(role);
|
||||||
|
return CommandResult.fromSuccess();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public CommandConfiguration getConfiguration() {
|
||||||
|
List<Parameter> parameters = new ArrayList<>();
|
||||||
|
parameters.add(Parameter.builder().name("role").templated(true).type(Role.class).build());
|
||||||
|
HelpInfo helpInfo = HelpInfo.builder().templated(true).build();
|
||||||
|
return CommandConfiguration.builder()
|
||||||
|
.name("removeRoleFromLights")
|
||||||
|
.module(SeasonalEntertainmentFeatureDefinition.ENTERTAINMENT)
|
||||||
|
.templated(true)
|
||||||
|
.supportsEmbedException(true)
|
||||||
|
.causesReaction(true)
|
||||||
|
.parameters(parameters)
|
||||||
|
.help(helpInfo)
|
||||||
|
.build();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public FeatureDefinition getFeature() {
|
||||||
|
return SeasonalFeatureDefinition.LIGHTS;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,55 @@
|
|||||||
|
package dev.sheldan.oneplus.bot.modules.seasonal.lights.command;
|
||||||
|
|
||||||
|
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.oneplus.bot.modules.seasonal.config.SeasonalEntertainmentFeatureDefinition;
|
||||||
|
import dev.sheldan.oneplus.bot.modules.seasonal.config.SeasonalFeatureDefinition;
|
||||||
|
import dev.sheldan.oneplus.bot.modules.seasonal.lights.service.LightsRoleServiceBean;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.stereotype.Component;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.concurrent.CompletableFuture;
|
||||||
|
|
||||||
|
@Component
|
||||||
|
public class SwitchLights extends AbstractConditionableCommand {
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private LightsRoleServiceBean lightsMemberServiceBean;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public CompletableFuture<CommandResult> executeAsync(CommandContext commandContext) {
|
||||||
|
return lightsMemberServiceBean.switchLights(commandContext.getGuild())
|
||||||
|
.thenApply(unused -> CommandResult.fromSuccess());
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public CommandConfiguration getConfiguration() {
|
||||||
|
List<Parameter> parameters = new ArrayList<>();
|
||||||
|
HelpInfo helpInfo = HelpInfo
|
||||||
|
.builder()
|
||||||
|
.templated(true)
|
||||||
|
.build();
|
||||||
|
return CommandConfiguration.builder()
|
||||||
|
.name("switchLights")
|
||||||
|
.module(SeasonalEntertainmentFeatureDefinition.ENTERTAINMENT)
|
||||||
|
.templated(true)
|
||||||
|
.async(true)
|
||||||
|
.causesReaction(true)
|
||||||
|
.supportsEmbedException(true)
|
||||||
|
.parameters(parameters)
|
||||||
|
.help(helpInfo)
|
||||||
|
.build();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public FeatureDefinition getFeature() {
|
||||||
|
return SeasonalFeatureDefinition.LIGHTS;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,17 @@
|
|||||||
|
package dev.sheldan.oneplus.bot.modules.seasonal.lights.config;
|
||||||
|
|
||||||
|
import dev.sheldan.oneplus.bot.modules.seasonal.lights.models.LightsRoleColor;
|
||||||
|
import lombok.Getter;
|
||||||
|
import lombok.Setter;
|
||||||
|
import org.springframework.boot.context.properties.ConfigurationProperties;
|
||||||
|
import org.springframework.context.annotation.Configuration;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
@Getter
|
||||||
|
@Setter
|
||||||
|
@Configuration
|
||||||
|
@ConfigurationProperties(prefix = "abstracto.feature.lights")
|
||||||
|
public class LightsColorConfig {
|
||||||
|
private List<LightsRoleColor> colors;
|
||||||
|
}
|
||||||
@@ -0,0 +1,16 @@
|
|||||||
|
package dev.sheldan.oneplus.bot.modules.seasonal.lights.config;
|
||||||
|
|
||||||
|
import dev.sheldan.abstracto.core.config.FeatureConfig;
|
||||||
|
import dev.sheldan.abstracto.core.config.FeatureDefinition;
|
||||||
|
import dev.sheldan.oneplus.bot.modules.seasonal.config.SeasonalFeatureDefinition;
|
||||||
|
import org.springframework.stereotype.Component;
|
||||||
|
|
||||||
|
@Component
|
||||||
|
public class LightsFeatureConfig implements FeatureConfig {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public FeatureDefinition getFeature() {
|
||||||
|
return SeasonalFeatureDefinition.LIGHTS;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,18 @@
|
|||||||
|
package dev.sheldan.oneplus.bot.modules.seasonal.lights.models;
|
||||||
|
|
||||||
|
import lombok.Getter;
|
||||||
|
import lombok.Setter;
|
||||||
|
|
||||||
|
import java.awt.*;
|
||||||
|
|
||||||
|
@Getter
|
||||||
|
@Setter
|
||||||
|
public class LightsRoleColor {
|
||||||
|
private Integer r;
|
||||||
|
private Integer g;
|
||||||
|
private Integer b;
|
||||||
|
|
||||||
|
public Color toColor() {
|
||||||
|
return new Color(r, g, b);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,31 @@
|
|||||||
|
package dev.sheldan.oneplus.bot.modules.seasonal.lights.models.database;
|
||||||
|
|
||||||
|
import dev.sheldan.abstracto.core.models.database.ARole;
|
||||||
|
import dev.sheldan.abstracto.core.models.database.AServer;
|
||||||
|
import lombok.*;
|
||||||
|
|
||||||
|
import javax.persistence.*;
|
||||||
|
|
||||||
|
@Builder
|
||||||
|
@Entity
|
||||||
|
@NoArgsConstructor
|
||||||
|
@AllArgsConstructor
|
||||||
|
@Table(name = "lights_role")
|
||||||
|
@Getter
|
||||||
|
@Setter
|
||||||
|
@EqualsAndHashCode
|
||||||
|
public class LightsRole {
|
||||||
|
@Id
|
||||||
|
@Column(name = "id")
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
@Getter
|
||||||
|
@ManyToOne(fetch = FetchType.LAZY)
|
||||||
|
@JoinColumn(name = "server_id", nullable = false)
|
||||||
|
private AServer server;
|
||||||
|
|
||||||
|
@Getter
|
||||||
|
@ManyToOne(fetch = FetchType.LAZY)
|
||||||
|
@PrimaryKeyJoinColumn
|
||||||
|
private ARole role;
|
||||||
|
}
|
||||||
@@ -0,0 +1,13 @@
|
|||||||
|
package dev.sheldan.oneplus.bot.modules.seasonal.lights.repository;
|
||||||
|
|
||||||
|
import dev.sheldan.abstracto.core.models.database.AServer;
|
||||||
|
import dev.sheldan.oneplus.bot.modules.seasonal.lights.models.database.LightsRole;
|
||||||
|
import org.springframework.data.jpa.repository.JpaRepository;
|
||||||
|
import org.springframework.stereotype.Repository;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
@Repository
|
||||||
|
public interface LightsRoleRepository extends JpaRepository<LightsRole, Long> {
|
||||||
|
List<LightsRole> findByServer(AServer server);
|
||||||
|
}
|
||||||
@@ -0,0 +1,81 @@
|
|||||||
|
package dev.sheldan.oneplus.bot.modules.seasonal.lights.service;
|
||||||
|
|
||||||
|
import dev.sheldan.abstracto.core.models.database.ARole;
|
||||||
|
import dev.sheldan.abstracto.core.models.database.AServer;
|
||||||
|
import dev.sheldan.abstracto.core.service.RoleService;
|
||||||
|
import dev.sheldan.abstracto.core.service.management.RoleManagementService;
|
||||||
|
import dev.sheldan.abstracto.core.service.management.ServerManagementService;
|
||||||
|
import dev.sheldan.abstracto.core.utils.FutureUtils;
|
||||||
|
import dev.sheldan.oneplus.bot.modules.seasonal.lights.config.LightsColorConfig;
|
||||||
|
import dev.sheldan.oneplus.bot.modules.seasonal.lights.models.database.LightsRole;
|
||||||
|
import dev.sheldan.oneplus.bot.modules.seasonal.lights.service.management.LightsRoleServiceManagementBean;
|
||||||
|
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.security.SecureRandom;
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.concurrent.CompletableFuture;
|
||||||
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
|
@Component
|
||||||
|
@Slf4j
|
||||||
|
public class LightsRoleServiceBean {
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private ServerManagementService serverManagementService;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private LightsRoleServiceManagementBean serviceManagementBean;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private RoleManagementService roleManagementService;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private RoleService roleService;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private SecureRandom secureRandom;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private LightsColorConfig lightsColorConfig;
|
||||||
|
|
||||||
|
public void addMemberToSeasonalLights(Role role) {
|
||||||
|
ARole aRole = roleManagementService.findRole(role.getIdLong());
|
||||||
|
log.info("Adding {} to lights for guild {}.", role.getId(), role.getGuild().getId());
|
||||||
|
serviceManagementBean.addMemberToLights(aRole);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void removeMemberFromSeasonalLights(Role role) {
|
||||||
|
ARole aRole = roleManagementService.findRole(role.getIdLong());
|
||||||
|
log.info("Removing {} from lights for guild {}.", role.getId(), role.getGuild().getId());
|
||||||
|
serviceManagementBean.removeMemberFromLights(aRole);
|
||||||
|
}
|
||||||
|
|
||||||
|
public CompletableFuture<Void> switchLights(Guild guild) {
|
||||||
|
log.info("Switching lights in guild {}", guild.getIdLong());
|
||||||
|
AServer server = serverManagementService.loadServer(guild.getIdLong());
|
||||||
|
List<LightsRole> lightUsers = serviceManagementBean.getLightsUserInServer(server);
|
||||||
|
List<Long> roleIds = lightUsers
|
||||||
|
.stream()
|
||||||
|
.map(lightsMember -> lightsMember.getRole().getId())
|
||||||
|
.distinct()
|
||||||
|
.collect(Collectors.toList());
|
||||||
|
List<CompletableFuture<Void>> futures = new ArrayList<>();
|
||||||
|
roleIds.forEach(roleId -> {
|
||||||
|
Role foundRole = guild.getRoleById(roleId);
|
||||||
|
if(foundRole != null) {
|
||||||
|
futures.add(roleService.setRoleColorTo(foundRole, getRandomColor()));
|
||||||
|
}
|
||||||
|
});
|
||||||
|
return FutureUtils.toSingleFutureGeneric(futures);
|
||||||
|
}
|
||||||
|
|
||||||
|
private Color getRandomColor() {
|
||||||
|
return lightsColorConfig.getColors().get(secureRandom.nextInt(lightsColorConfig.getColors().size())).toColor();
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,37 @@
|
|||||||
|
package dev.sheldan.oneplus.bot.modules.seasonal.lights.service.management;
|
||||||
|
|
||||||
|
import dev.sheldan.abstracto.core.models.database.ARole;
|
||||||
|
import dev.sheldan.abstracto.core.models.database.AServer;
|
||||||
|
import dev.sheldan.oneplus.bot.modules.seasonal.lights.models.database.LightsRole;
|
||||||
|
import dev.sheldan.oneplus.bot.modules.seasonal.lights.repository.LightsRoleRepository;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.stereotype.Component;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
@Component
|
||||||
|
public class LightsRoleServiceManagementBean {
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private LightsRoleRepository lightMemberRepository;
|
||||||
|
|
||||||
|
public void addMemberToLights(ARole aRole) {
|
||||||
|
if(!lightMemberRepository.existsById(aRole.getId())) {
|
||||||
|
LightsRole member = LightsRole
|
||||||
|
.builder()
|
||||||
|
.id(aRole.getId())
|
||||||
|
.server(aRole.getServer())
|
||||||
|
.role(aRole)
|
||||||
|
.build();
|
||||||
|
lightMemberRepository.save(member);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public void removeMemberFromLights(ARole aRole) {
|
||||||
|
lightMemberRepository.deleteById(aRole.getId());
|
||||||
|
}
|
||||||
|
|
||||||
|
public List<LightsRole> getLightsUserInServer(AServer server) {
|
||||||
|
return lightMemberRepository.findByServer(server);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,11 @@
|
|||||||
|
<?xml version="1.1" encoding="UTF-8" standalone="no"?>
|
||||||
|
<databaseChangeLog xmlns="http://www.liquibase.org/xml/ns/dbchangelog"
|
||||||
|
xmlns:ext="http://www.liquibase.org/xml/ns/dbchangelog-ext"
|
||||||
|
xmlns:pro="http://www.liquibase.org/xml/ns/pro"
|
||||||
|
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||||
|
xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog dbchangelog.xsd
|
||||||
|
http://www.liquibase.org/xml/ns/dbchangelog-ext dbchangelog.xsd
|
||||||
|
http://www.liquibase.org/xml/ns/pro dbchangelog.xsd" >
|
||||||
|
<include file="tables/tables.xml" relativeToChangelogFile="true"/>
|
||||||
|
<include file="seedData/data.xml" relativeToChangelogFile="true"/>
|
||||||
|
</databaseChangeLog>
|
||||||
@@ -0,0 +1,28 @@
|
|||||||
|
<?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="lightsFeature" value="(SELECT id FROM feature WHERE key = 'lights')"/>
|
||||||
|
<property name="entertainmentModule" value="(SELECT id FROM module WHERE name = 'entertainment')"/>
|
||||||
|
<changeSet author="Sheldan" id="lights-commands" >
|
||||||
|
<insert tableName="command">
|
||||||
|
<column name="name" value="addRoleToLights"/>
|
||||||
|
<column name="module_id" valueComputed="${entertainmentModule}"/>
|
||||||
|
<column name="feature_id" valueComputed="${lightsFeature}"/>
|
||||||
|
</insert>
|
||||||
|
<insert tableName="command">
|
||||||
|
<column name="name" value="removeRoleFromLights"/>
|
||||||
|
<column name="module_id" valueComputed="${entertainmentModule}"/>
|
||||||
|
<column name="feature_id" valueComputed="${lightsFeature}"/>
|
||||||
|
</insert>
|
||||||
|
<insert tableName="command">
|
||||||
|
<column name="name" value="switchLights"/>
|
||||||
|
<column name="module_id" valueComputed="${entertainmentModule}"/>
|
||||||
|
<column name="feature_id" valueComputed="${lightsFeature}"/>
|
||||||
|
</insert>
|
||||||
|
</changeSet>
|
||||||
|
</databaseChangeLog>
|
||||||
@@ -0,0 +1,11 @@
|
|||||||
|
<?xml version="1.1" encoding="UTF-8" standalone="no"?>
|
||||||
|
<databaseChangeLog xmlns="http://www.liquibase.org/xml/ns/dbchangelog"
|
||||||
|
xmlns:ext="http://www.liquibase.org/xml/ns/dbchangelog-ext"
|
||||||
|
xmlns:pro="http://www.liquibase.org/xml/ns/pro"
|
||||||
|
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||||
|
xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog dbchangelog.xsd
|
||||||
|
http://www.liquibase.org/xml/ns/dbchangelog-ext dbchangelog.xsd
|
||||||
|
http://www.liquibase.org/xml/ns/pro dbchangelog.xsd" >
|
||||||
|
<include file="feature.xml" relativeToChangelogFile="true"/>
|
||||||
|
<include file="command.xml" relativeToChangelogFile="true"/>
|
||||||
|
</databaseChangeLog>
|
||||||
@@ -0,0 +1,14 @@
|
|||||||
|
<?xml version="1.1" encoding="UTF-8" standalone="no"?>
|
||||||
|
<databaseChangeLog xmlns="http://www.liquibase.org/xml/ns/dbchangelog"
|
||||||
|
xmlns:ext="http://www.liquibase.org/xml/ns/dbchangelog-ext"
|
||||||
|
xmlns:pro="http://www.liquibase.org/xml/ns/pro"
|
||||||
|
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||||
|
xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog dbchangelog.xsd
|
||||||
|
http://www.liquibase.org/xml/ns/dbchangelog-ext dbchangelog.xsd
|
||||||
|
http://www.liquibase.org/xml/ns/pro dbchangelog.xsd" >
|
||||||
|
<changeSet author="Sheldan" id="seasonal_lights_feature-insertion">
|
||||||
|
<insert tableName="feature">
|
||||||
|
<column name="key" value="lights"/>
|
||||||
|
</insert>
|
||||||
|
</changeSet>
|
||||||
|
</databaseChangeLog>
|
||||||
@@ -0,0 +1,44 @@
|
|||||||
|
<?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="lights_role-table">
|
||||||
|
<createTable tableName="lights_role">
|
||||||
|
<column name="id" type="BIGINT">
|
||||||
|
<constraints nullable="true" primaryKey="true" primaryKeyName="pk_lights_role"/>
|
||||||
|
</column>
|
||||||
|
<column name="server_id" type="BIGINT">
|
||||||
|
<constraints nullable="false"/>
|
||||||
|
</column>
|
||||||
|
<column name="role_id" type="BIGINT">
|
||||||
|
<constraints nullable="false"/>
|
||||||
|
</column>
|
||||||
|
<column name="created" type="TIMESTAMP WITHOUT TIME ZONE">
|
||||||
|
<constraints nullable="true"/>
|
||||||
|
</column>
|
||||||
|
<column name="updated" type="TIMESTAMP WITHOUT TIME ZONE"/>
|
||||||
|
</createTable>
|
||||||
|
<addForeignKeyConstraint baseColumnNames="server_id" baseTableName="lights_role" constraintName="fk_lights_role_server"
|
||||||
|
deferrable="false" initiallyDeferred="false" onDelete="NO ACTION" onUpdate="NO ACTION"
|
||||||
|
referencedColumnNames="id" referencedTableName="server" validate="true"/>
|
||||||
|
<addForeignKeyConstraint baseColumnNames="id" baseTableName="lights_role" constraintName="fk_lights_role_role"
|
||||||
|
deferrable="false" initiallyDeferred="false" onDelete="NO ACTION" onUpdate="NO ACTION"
|
||||||
|
referencedColumnNames="id" referencedTableName="role" validate="true"/>
|
||||||
|
|
||||||
|
|
||||||
|
<sql>
|
||||||
|
DROP TRIGGER IF EXISTS lights_role_update_trigger ON lights_role;
|
||||||
|
CREATE TRIGGER lights_role_update_trigger BEFORE UPDATE ON lights_role FOR EACH ROW EXECUTE PROCEDURE update_trigger_procedure();
|
||||||
|
</sql>
|
||||||
|
<sql>
|
||||||
|
DROP TRIGGER IF EXISTS lights_role_insert_trigger ON lights_role;
|
||||||
|
CREATE TRIGGER lights_role_insert_trigger BEFORE INSERT ON lights_role FOR EACH ROW EXECUTE PROCEDURE insert_trigger_procedure();
|
||||||
|
</sql>
|
||||||
|
</changeSet>
|
||||||
|
|
||||||
|
</databaseChangeLog>
|
||||||
@@ -0,0 +1,10 @@
|
|||||||
|
<?xml version="1.1" encoding="UTF-8" standalone="no"?>
|
||||||
|
<databaseChangeLog xmlns="http://www.liquibase.org/xml/ns/dbchangelog"
|
||||||
|
xmlns:ext="http://www.liquibase.org/xml/ns/dbchangelog-ext"
|
||||||
|
xmlns:pro="http://www.liquibase.org/xml/ns/pro"
|
||||||
|
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||||
|
xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog dbchangelog.xsd
|
||||||
|
http://www.liquibase.org/xml/ns/dbchangelog-ext dbchangelog.xsd
|
||||||
|
http://www.liquibase.org/xml/ns/pro dbchangelog.xsd" >
|
||||||
|
<include file="lights_role.xml" relativeToChangelogFile="true"/>
|
||||||
|
</databaseChangeLog>
|
||||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,10 @@
|
|||||||
|
<?xml version="1.1" encoding="UTF-8" standalone="no"?>
|
||||||
|
<databaseChangeLog xmlns="http://www.liquibase.org/xml/ns/dbchangelog"
|
||||||
|
xmlns:ext="http://www.liquibase.org/xml/ns/dbchangelog-ext"
|
||||||
|
xmlns:pro="http://www.liquibase.org/xml/ns/pro"
|
||||||
|
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||||
|
xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog dbchangelog.xsd
|
||||||
|
http://www.liquibase.org/xml/ns/dbchangelog-ext dbchangelog.xsd
|
||||||
|
http://www.liquibase.org/xml/ns/pro dbchangelog.xsd" >
|
||||||
|
<include file="1.5.9/collection.xml" relativeToChangelogFile="true"/>
|
||||||
|
</databaseChangeLog>
|
||||||
@@ -0,0 +1,30 @@
|
|||||||
|
abstracto.featureFlags.lights.featureName=lights
|
||||||
|
abstracto.featureFlags.lights.enabled=false
|
||||||
|
|
||||||
|
abstracto.feature.lights.colors[0].r=12
|
||||||
|
abstracto.feature.lights.colors[0].g=169
|
||||||
|
abstracto.feature.lights.colors[0].b=12
|
||||||
|
|
||||||
|
abstracto.feature.lights.colors[1].r=206
|
||||||
|
abstracto.feature.lights.colors[1].g=13
|
||||||
|
abstracto.feature.lights.colors[1].b=13
|
||||||
|
|
||||||
|
abstracto.feature.lights.colors[2].r=255
|
||||||
|
abstracto.feature.lights.colors[2].g=255
|
||||||
|
abstracto.feature.lights.colors[2].b=255
|
||||||
|
|
||||||
|
abstracto.feature.lights.colors[3].r=148
|
||||||
|
abstracto.feature.lights.colors[3].g=125
|
||||||
|
abstracto.feature.lights.colors[3].b=0
|
||||||
|
|
||||||
|
abstracto.feature.lights.colors[4].r=77
|
||||||
|
abstracto.feature.lights.colors[4].g=106
|
||||||
|
abstracto.feature.lights.colors[4].b=255
|
||||||
|
|
||||||
|
abstracto.feature.lights.colors[5].r=166
|
||||||
|
abstracto.feature.lights.colors[5].g=51
|
||||||
|
abstracto.feature.lights.colors[5].b=222
|
||||||
|
|
||||||
|
abstracto.feature.lights.colors[6].r=246
|
||||||
|
abstracto.feature.lights.colors[6].g=232
|
||||||
|
abstracto.feature.lights.colors[6].b=63
|
||||||
@@ -3,7 +3,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<artifactId>oneplus-bot-modules</artifactId>
|
<artifactId>oneplus-bot-modules</artifactId>
|
||||||
<groupId>dev.sheldan.oneplus.bot.application.modules</groupId>
|
<groupId>dev.sheldan.oneplus.bot.application.modules</groupId>
|
||||||
<version>1.5.8</version>
|
<version>1.5.9</version>
|
||||||
</parent>
|
</parent>
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
|
||||||
|
|||||||
@@ -5,13 +5,13 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>dev.sheldan.oneplus.bot</groupId>
|
<groupId>dev.sheldan.oneplus.bot</groupId>
|
||||||
<artifactId>oneplusbot</artifactId>
|
<artifactId>oneplusbot</artifactId>
|
||||||
<version>1.5.8</version>
|
<version>1.5.9</version>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
<groupId>dev.sheldan.oneplus.bot.application</groupId>
|
<groupId>dev.sheldan.oneplus.bot.application</groupId>
|
||||||
<artifactId>application</artifactId>
|
<artifactId>application</artifactId>
|
||||||
<packaging>pom</packaging>
|
<packaging>pom</packaging>
|
||||||
<version>1.5.8</version>
|
<version>1.5.9</version>
|
||||||
<modules>
|
<modules>
|
||||||
<module>executable</module>
|
<module>executable</module>
|
||||||
<module>oneplus-bot-customizations</module>
|
<module>oneplus-bot-customizations</module>
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>dev.sheldan.oneplus.bot.deployment</groupId>
|
<groupId>dev.sheldan.oneplus.bot.deployment</groupId>
|
||||||
<artifactId>deployment</artifactId>
|
<artifactId>deployment</artifactId>
|
||||||
<version>1.5.8</version>
|
<version>1.5.9</version>
|
||||||
</parent>
|
</parent>
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
|
||||||
|
|||||||
@@ -29,4 +29,4 @@ PGADMIN_DEFAULT_EMAIL=sheldan@sheldan.dev
|
|||||||
PGADMIN_DEFAULT_PASSWORD=admin
|
PGADMIN_DEFAULT_PASSWORD=admin
|
||||||
TOKEN=<INSERT TOKEN>
|
TOKEN=<INSERT TOKEN>
|
||||||
YOUTUBE_API_KEY=<INSERT KEY>
|
YOUTUBE_API_KEY=<INSERT KEY>
|
||||||
ONEPLUS_BOT_VERSION=1.5.8
|
ONEPLUS_BOT_VERSION=1.5.9
|
||||||
@@ -3,7 +3,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>dev.sheldan.oneplus.bot.deployment</groupId>
|
<groupId>dev.sheldan.oneplus.bot.deployment</groupId>
|
||||||
<artifactId>deployment</artifactId>
|
<artifactId>deployment</artifactId>
|
||||||
<version>1.5.8</version>
|
<version>1.5.9</version>
|
||||||
</parent>
|
</parent>
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
|
||||||
@@ -513,6 +513,16 @@
|
|||||||
<destFileName>referral.zip</destFileName>
|
<destFileName>referral.zip</destFileName>
|
||||||
</artifactItem>
|
</artifactItem>
|
||||||
|
|
||||||
|
<artifactItem>
|
||||||
|
<groupId>dev.sheldan.oneplus.bot.templates.translations.modules</groupId>
|
||||||
|
<artifactId>seasonal-translations</artifactId>
|
||||||
|
<version>${project.version}</version>
|
||||||
|
<type>zip</type>
|
||||||
|
<overWrite>true</overWrite>
|
||||||
|
<outputDirectory>${file.basedir}/deployment/translation-artifacts/</outputDirectory>
|
||||||
|
<destFileName>seasonal.zip</destFileName>
|
||||||
|
</artifactItem>
|
||||||
|
|
||||||
<artifactItem>
|
<artifactItem>
|
||||||
<groupId>dev.sheldan.oneplus.bot.templates.translations.modules</groupId>
|
<groupId>dev.sheldan.oneplus.bot.templates.translations.modules</groupId>
|
||||||
<artifactId>faq-translations</artifactId>
|
<artifactId>faq-translations</artifactId>
|
||||||
@@ -834,6 +844,17 @@
|
|||||||
<destFileName>faq.zip</destFileName>
|
<destFileName>faq.zip</destFileName>
|
||||||
</artifactItem>
|
</artifactItem>
|
||||||
|
|
||||||
|
<artifactItem>
|
||||||
|
<groupId>dev.sheldan.oneplus.bot.application.modules</groupId>
|
||||||
|
<artifactId>seasonal</artifactId>
|
||||||
|
<version>${project.version}</version>
|
||||||
|
<classifier>liquibase</classifier>
|
||||||
|
<type>zip</type>
|
||||||
|
<overWrite>true</overWrite>
|
||||||
|
<outputDirectory>${file.basedir}/deployment/liquibase-artifacts/</outputDirectory>
|
||||||
|
<destFileName>seasonal.zip</destFileName>
|
||||||
|
</artifactItem>
|
||||||
|
|
||||||
<artifactItem>
|
<artifactItem>
|
||||||
<groupId>dev.sheldan.oneplus.bot.application</groupId>
|
<groupId>dev.sheldan.oneplus.bot.application</groupId>
|
||||||
<artifactId>database</artifactId>
|
<artifactId>database</artifactId>
|
||||||
|
|||||||
@@ -11,7 +11,7 @@
|
|||||||
"voice-channel-context", "anti-raid",
|
"voice-channel-context", "anti-raid",
|
||||||
"starboard-custom", "dynamic-activity-custom-translations", "moderation-custom",
|
"starboard-custom", "dynamic-activity-custom-translations", "moderation-custom",
|
||||||
"overrides-translation-moderation",
|
"overrides-translation-moderation",
|
||||||
"news", "setup", "referral", "faq"],
|
"news", "setup", "referral", "faq", "seasonal"],
|
||||||
"liquibase_artifacts": [
|
"liquibase_artifacts": [
|
||||||
{ "zip": "scheduling", "file": "scheduling-changeLog.xml" },
|
{ "zip": "scheduling", "file": "scheduling-changeLog.xml" },
|
||||||
{ "zip": "core", "file": "core-changeLog.xml" },
|
{ "zip": "core", "file": "core-changeLog.xml" },
|
||||||
@@ -40,7 +40,8 @@
|
|||||||
{ "zip": "moderation-custom", "file": "moderation-custom-changeLog.xml"},
|
{ "zip": "moderation-custom", "file": "moderation-custom-changeLog.xml"},
|
||||||
{ "zip": "dynamic-activity-custom", "file": "dynamicActivity-custom-changeLog.xml"},
|
{ "zip": "dynamic-activity-custom", "file": "dynamicActivity-custom-changeLog.xml"},
|
||||||
{ "zip": "news", "file": "news-changeLog.xml"},
|
{ "zip": "news", "file": "news-changeLog.xml"},
|
||||||
{ "zip": "faq", "file": "faq-changeLog.xml"}
|
{ "zip": "faq", "file": "faq-changeLog.xml"},
|
||||||
|
{ "zip": "seasonal", "file": "seasonal-changeLog.xml"}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<artifactId>oneplusbot</artifactId>
|
<artifactId>oneplusbot</artifactId>
|
||||||
<groupId>dev.sheldan.oneplus.bot</groupId>
|
<groupId>dev.sheldan.oneplus.bot</groupId>
|
||||||
<version>1.5.8</version>
|
<version>1.5.9</version>
|
||||||
</parent>
|
</parent>
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
|
||||||
|
|||||||
8
pom.xml
8
pom.xml
@@ -12,15 +12,15 @@
|
|||||||
|
|
||||||
<groupId>dev.sheldan.oneplus.bot</groupId>
|
<groupId>dev.sheldan.oneplus.bot</groupId>
|
||||||
<artifactId>oneplusbot</artifactId>
|
<artifactId>oneplusbot</artifactId>
|
||||||
<version>1.5.8</version>
|
<version>1.5.9</version>
|
||||||
|
|
||||||
<properties>
|
<properties>
|
||||||
<maven.compiler.target>1.8</maven.compiler.target>
|
<maven.compiler.target>1.8</maven.compiler.target>
|
||||||
<maven.compiler.source>1.8</maven.compiler.source>
|
<maven.compiler.source>1.8</maven.compiler.source>
|
||||||
<!-- edit in release.yml as well -->
|
<!-- edit in release.yml as well -->
|
||||||
<!-- when releasing a new opbot version, update the .env as well-->
|
<!-- when releasing a new opbot version, update the .env as well-->
|
||||||
<abstracto.version>1.3.9</abstracto.version>
|
<abstracto.version>1.3.10</abstracto.version>
|
||||||
<abstracto.templates.version>1.2.21</abstracto.templates.version>
|
<abstracto.templates.version>1.3.0</abstracto.templates.version>
|
||||||
</properties>
|
</properties>
|
||||||
|
|
||||||
<modules>
|
<modules>
|
||||||
@@ -56,7 +56,7 @@
|
|||||||
<scm>
|
<scm>
|
||||||
<url>https://maven.pkg.github.com/Sheldan/OnePlusBot</url>
|
<url>https://maven.pkg.github.com/Sheldan/OnePlusBot</url>
|
||||||
<developerConnection>scm:git:git@github.com:Sheldan/OnePlusBot.git</developerConnection>
|
<developerConnection>scm:git:git@github.com:Sheldan/OnePlusBot.git</developerConnection>
|
||||||
<tag>oneplusbot-1.5.8</tag>
|
<tag>oneplusbot-1.5.9</tag>
|
||||||
</scm>
|
</scm>
|
||||||
|
|
||||||
</project>
|
</project>
|
||||||
@@ -3,7 +3,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>dev.sheldan.oneplus.bot.templates.customizations</groupId>
|
<groupId>dev.sheldan.oneplus.bot.templates.customizations</groupId>
|
||||||
<artifactId>customization-templates</artifactId>
|
<artifactId>customization-templates</artifactId>
|
||||||
<version>1.5.8</version>
|
<version>1.5.9</version>
|
||||||
</parent>
|
</parent>
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,6 @@
|
|||||||
{
|
{
|
||||||
|
"embeds": [
|
||||||
|
{
|
||||||
"title": {
|
"title": {
|
||||||
"title": "<@safe_include "warning_threshold_reached_notification_title"/>"
|
"title": "<@safe_include "warning_threshold_reached_notification_title"/>"
|
||||||
},
|
},
|
||||||
@@ -10,4 +12,6 @@
|
|||||||
<#assign channelDisplay=channelDisplay>
|
<#assign channelDisplay=channelDisplay>
|
||||||
<#assign messageId=messageId>
|
<#assign messageId=messageId>
|
||||||
"description": "<@safe_include "warning_threshold_reached_notification_description"/>"
|
"description": "<@safe_include "warning_threshold_reached_notification_description"/>"
|
||||||
|
}
|
||||||
|
]
|
||||||
}
|
}
|
||||||
@@ -3,7 +3,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>dev.sheldan.oneplus.bot.templates</groupId>
|
<groupId>dev.sheldan.oneplus.bot.templates</groupId>
|
||||||
<artifactId>oneplus-bot-templates</artifactId>
|
<artifactId>oneplus-bot-templates</artifactId>
|
||||||
<version>1.5.8</version>
|
<version>1.5.9</version>
|
||||||
</parent>
|
</parent>
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>dev.sheldan.oneplus.bot.templates.customizations</groupId>
|
<groupId>dev.sheldan.oneplus.bot.templates.customizations</groupId>
|
||||||
<artifactId>customization-templates</artifactId>
|
<artifactId>customization-templates</artifactId>
|
||||||
<version>1.5.8</version>
|
<version>1.5.9</version>
|
||||||
</parent>
|
</parent>
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,6 @@
|
|||||||
{
|
{
|
||||||
|
"embeds": [
|
||||||
|
{
|
||||||
"title": {
|
"title": {
|
||||||
"title": "<@safe_include "starboard_post_created_title"/>"
|
"title": "<@safe_include "starboard_post_created_title"/>"
|
||||||
},
|
},
|
||||||
@@ -38,4 +40,6 @@
|
|||||||
</#if>
|
</#if>
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
}
|
}
|
||||||
@@ -1,4 +1,6 @@
|
|||||||
{
|
{
|
||||||
|
"embeds": [
|
||||||
|
{
|
||||||
"title": {
|
"title": {
|
||||||
"title": "<@safe_include "starboard_post_deleted_title"/>"
|
"title": "<@safe_include "starboard_post_deleted_title"/>"
|
||||||
},
|
},
|
||||||
@@ -30,4 +32,6 @@
|
|||||||
</#if>
|
</#if>
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
}
|
}
|
||||||
@@ -3,7 +3,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>dev.sheldan.oneplus.bot.templates.modules</groupId>
|
<groupId>dev.sheldan.oneplus.bot.templates.modules</groupId>
|
||||||
<artifactId>oneplus-bot-module-templates</artifactId>
|
<artifactId>oneplus-bot-module-templates</artifactId>
|
||||||
<version>1.5.8</version>
|
<version>1.5.9</version>
|
||||||
</parent>
|
</parent>
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,6 @@
|
|||||||
{
|
{
|
||||||
|
"embeds": [
|
||||||
|
{
|
||||||
<#include "abstracto_color">,
|
<#include "abstracto_color">,
|
||||||
"description": "
|
"description": "
|
||||||
<#list uses as usage>
|
<#list uses as usage>
|
||||||
@@ -11,4 +13,6 @@
|
|||||||
<@safe_include "FAQUsage_usage_display"/><#sep>, </#list>
|
<@safe_include "FAQUsage_usage_display"/><#sep>, </#list>
|
||||||
<#else>
|
<#else>
|
||||||
<@safe_include "FAQUsage_no_usages"/></#list>"
|
<@safe_include "FAQUsage_no_usages"/></#list>"
|
||||||
|
}
|
||||||
|
]
|
||||||
}
|
}
|
||||||
@@ -2,6 +2,8 @@
|
|||||||
<#if additionalMessage??>
|
<#if additionalMessage??>
|
||||||
"additionalMessage": "${additionalMessage?json_string}"
|
"additionalMessage": "${additionalMessage?json_string}"
|
||||||
</#if>
|
</#if>
|
||||||
|
"embeds": [
|
||||||
|
{
|
||||||
<#if description?? || imageURL??>
|
<#if description?? || imageURL??>
|
||||||
<#include "user_author">
|
<#include "user_author">
|
||||||
<#if additionalMessage??>,</#if>
|
<#if additionalMessage??>,</#if>
|
||||||
@@ -18,4 +20,6 @@
|
|||||||
,"imageUrl": "${imageURL}"
|
,"imageUrl": "${imageURL}"
|
||||||
</#if>
|
</#if>
|
||||||
</#if>
|
</#if>
|
||||||
|
}
|
||||||
|
]
|
||||||
}
|
}
|
||||||
@@ -1,7 +1,9 @@
|
|||||||
{
|
{
|
||||||
|
"embeds": [
|
||||||
|
{
|
||||||
<#include "abstracto_color">,
|
<#include "abstracto_color">,
|
||||||
"description": "
|
"description": "
|
||||||
<@safe_include "listFAQCommands_command_header"/>
|
<@safe_include "listFAQCommands_command_header"/>
|
||||||
|
|
||||||
<#list commands as command>
|
<#list commands as command>
|
||||||
<#assign command=command>
|
<#assign command=command>
|
||||||
@@ -17,4 +19,6 @@
|
|||||||
|
|
||||||
<#else>
|
<#else>
|
||||||
<@safe_include "listFAQCommands_no_commands"/></#list>"
|
<@safe_include "listFAQCommands_no_commands"/></#list>"
|
||||||
|
}
|
||||||
|
]
|
||||||
}
|
}
|
||||||
@@ -3,7 +3,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>dev.sheldan.oneplus.bot.templates.modules</groupId>
|
<groupId>dev.sheldan.oneplus.bot.templates.modules</groupId>
|
||||||
<artifactId>oneplus-bot-module-templates</artifactId>
|
<artifactId>oneplus-bot-module-templates</artifactId>
|
||||||
<version>1.5.8</version>
|
<version>1.5.9</version>
|
||||||
</parent>
|
</parent>
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
|
||||||
|
|||||||
@@ -2,11 +2,17 @@
|
|||||||
<#assign roleMention="<@&479202891358535681>"/>
|
<#assign roleMention="<@&479202891358535681>"/>
|
||||||
<#assign authorMention>${author.user.name}#${author.user.discriminator}</#assign>
|
<#assign authorMention>${author.user.name}#${author.user.discriminator}</#assign>
|
||||||
"additionalMessage": "<@safe_include "news_post_description"/>",
|
"additionalMessage": "<@safe_include "news_post_description"/>",
|
||||||
|
"embeds": [
|
||||||
|
{
|
||||||
<#if message.attachments?size gt 0>
|
<#if message.attachments?size gt 0>
|
||||||
"imageUrl": "${message.attachments[0].proxyUrl}",
|
"imageUrl": "${message.attachments[0].proxyUrl}",
|
||||||
</#if>
|
</#if>
|
||||||
"metaConfig": {
|
"metaConfig": {
|
||||||
"allowsRoleMention": true,
|
|
||||||
"preventEmptyEmbed": true
|
"preventEmptyEmbed": true
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"messageConfig": {
|
||||||
|
"allowsRoleMention": true
|
||||||
|
}
|
||||||
}
|
}
|
||||||
@@ -3,7 +3,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>dev.sheldan.oneplus.bot.templates</groupId>
|
<groupId>dev.sheldan.oneplus.bot.templates</groupId>
|
||||||
<artifactId>oneplus-bot-templates</artifactId>
|
<artifactId>oneplus-bot-templates</artifactId>
|
||||||
<version>1.5.8</version>
|
<version>1.5.9</version>
|
||||||
</parent>
|
</parent>
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>dev.sheldan.oneplus.bot.templates.modules</groupId>
|
<groupId>dev.sheldan.oneplus.bot.templates.modules</groupId>
|
||||||
<artifactId>oneplus-bot-module-templates</artifactId>
|
<artifactId>oneplus-bot-module-templates</artifactId>
|
||||||
<version>1.5.8</version>
|
<version>1.5.9</version>
|
||||||
</parent>
|
</parent>
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,6 @@
|
|||||||
{
|
{
|
||||||
|
"embeds": [
|
||||||
|
{
|
||||||
<#include "abstracto_color">,
|
<#include "abstracto_color">,
|
||||||
<#include "member_author">
|
<#include "member_author">
|
||||||
<#assign member=postingMember>
|
<#assign member=postingMember>
|
||||||
@@ -14,4 +16,6 @@
|
|||||||
<#sep>,
|
<#sep>,
|
||||||
</#list>
|
</#list>
|
||||||
]
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
}
|
}
|
||||||
@@ -1,5 +1,9 @@
|
|||||||
{
|
{
|
||||||
|
"embeds": [
|
||||||
|
{
|
||||||
<#include "abstracto_color">,
|
<#include "abstracto_color">,
|
||||||
"description": "<@safe_include "too_recent_referral_post"/>",
|
"description": "<@safe_include "too_recent_referral_post"/>",
|
||||||
"timeStamp": "${nextReferralDate}"
|
"timeStamp": "${nextReferralDate}"
|
||||||
|
}
|
||||||
|
]
|
||||||
}
|
}
|
||||||
@@ -3,13 +3,13 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>dev.sheldan.oneplus.bot.templates</groupId>
|
<groupId>dev.sheldan.oneplus.bot.templates</groupId>
|
||||||
<artifactId>templates</artifactId>
|
<artifactId>templates</artifactId>
|
||||||
<version>1.5.8</version>
|
<version>1.5.9</version>
|
||||||
</parent>
|
</parent>
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
|
||||||
<artifactId>oneplus-bot-templates</artifactId>
|
<artifactId>oneplus-bot-templates</artifactId>
|
||||||
<packaging>pom</packaging>
|
<packaging>pom</packaging>
|
||||||
<version>1.5.8</version>
|
<version>1.5.9</version>
|
||||||
<modules>
|
<modules>
|
||||||
<module>module-templates</module>
|
<module>module-templates</module>
|
||||||
<module>customization-templates</module>
|
<module>customization-templates</module>
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>dev.sheldan.oneplus.bot.templates.overrides</groupId>
|
<groupId>dev.sheldan.oneplus.bot.templates.overrides</groupId>
|
||||||
<artifactId>template-overrides</artifactId>
|
<artifactId>template-overrides</artifactId>
|
||||||
<version>1.5.8</version>
|
<version>1.5.9</version>
|
||||||
</parent>
|
</parent>
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>dev.sheldan.oneplus.bot.templates.overrides</groupId>
|
<groupId>dev.sheldan.oneplus.bot.templates.overrides</groupId>
|
||||||
<artifactId>template-overrides</artifactId>
|
<artifactId>template-overrides</artifactId>
|
||||||
<version>1.5.8</version>
|
<version>1.5.9</version>
|
||||||
</parent>
|
</parent>
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>dev.sheldan.oneplus.bot.templates.overrides</groupId>
|
<groupId>dev.sheldan.oneplus.bot.templates.overrides</groupId>
|
||||||
<artifactId>template-overrides</artifactId>
|
<artifactId>template-overrides</artifactId>
|
||||||
<version>1.5.8</version>
|
<version>1.5.9</version>
|
||||||
</parent>
|
</parent>
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>dev.sheldan.oneplus.bot.templates.overrides</groupId>
|
<groupId>dev.sheldan.oneplus.bot.templates.overrides</groupId>
|
||||||
<artifactId>template-overrides</artifactId>
|
<artifactId>template-overrides</artifactId>
|
||||||
<version>1.5.8</version>
|
<version>1.5.9</version>
|
||||||
</parent>
|
</parent>
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>dev.sheldan.oneplus.bot.templates</groupId>
|
<groupId>dev.sheldan.oneplus.bot.templates</groupId>
|
||||||
<artifactId>oneplus-bot-templates</artifactId>
|
<artifactId>oneplus-bot-templates</artifactId>
|
||||||
<version>1.5.8</version>
|
<version>1.5.9</version>
|
||||||
</parent>
|
</parent>
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>dev.sheldan.oneplus.bot.templates.overrides</groupId>
|
<groupId>dev.sheldan.oneplus.bot.templates.overrides</groupId>
|
||||||
<artifactId>template-overrides</artifactId>
|
<artifactId>template-overrides</artifactId>
|
||||||
<version>1.5.8</version>
|
<version>1.5.9</version>
|
||||||
</parent>
|
</parent>
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>dev.sheldan.oneplus.bot.templates.overrides</groupId>
|
<groupId>dev.sheldan.oneplus.bot.templates.overrides</groupId>
|
||||||
<artifactId>template-overrides</artifactId>
|
<artifactId>template-overrides</artifactId>
|
||||||
<version>1.5.8</version>
|
<version>1.5.9</version>
|
||||||
</parent>
|
</parent>
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,7 @@
|
|||||||
{
|
{
|
||||||
|
"additionalMessage": "${definition.definition?json_string}",
|
||||||
|
"embeds": [
|
||||||
|
{
|
||||||
<#include "abstracto_color">,
|
<#include "abstracto_color">,
|
||||||
"fields": [
|
"fields": [
|
||||||
{
|
{
|
||||||
@@ -12,9 +15,10 @@
|
|||||||
"valueLengthLimit": 250,
|
"valueLengthLimit": 250,
|
||||||
"inline": "true"
|
"inline": "true"
|
||||||
}
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
],
|
],
|
||||||
"additionalMessage": "${definition.definition?json_string}",
|
"messageConfig": {
|
||||||
"metaConfig": {
|
|
||||||
"messageLimit": 1,
|
"messageLimit": 1,
|
||||||
"additionalMessageLengthLimit": 250
|
"additionalMessageLengthLimit": 250
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>dev.sheldan.oneplus.bot</groupId>
|
<groupId>dev.sheldan.oneplus.bot</groupId>
|
||||||
<artifactId>oneplusbot</artifactId>
|
<artifactId>oneplusbot</artifactId>
|
||||||
<version>1.5.8</version>
|
<version>1.5.9</version>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
<modules>
|
<modules>
|
||||||
@@ -14,7 +14,7 @@
|
|||||||
|
|
||||||
<groupId>dev.sheldan.oneplus.bot.templates</groupId>
|
<groupId>dev.sheldan.oneplus.bot.templates</groupId>
|
||||||
<artifactId>templates</artifactId>
|
<artifactId>templates</artifactId>
|
||||||
<version>1.5.8</version>
|
<version>1.5.9</version>
|
||||||
<packaging>pom</packaging>
|
<packaging>pom</packaging>
|
||||||
|
|
||||||
</project>
|
</project>
|
||||||
@@ -3,7 +3,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>dev.sheldan.oneplus.bot.templates.translations.customizations</groupId>
|
<groupId>dev.sheldan.oneplus.bot.templates.translations.customizations</groupId>
|
||||||
<artifactId>customization-translations</artifactId>
|
<artifactId>customization-translations</artifactId>
|
||||||
<version>1.5.8</version>
|
<version>1.5.9</version>
|
||||||
</parent>
|
</parent>
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>dev.sheldan.oneplus.bot.templates.translations.customizations</groupId>
|
<groupId>dev.sheldan.oneplus.bot.templates.translations.customizations</groupId>
|
||||||
<artifactId>customization-translations</artifactId>
|
<artifactId>customization-translations</artifactId>
|
||||||
<version>1.5.8</version>
|
<version>1.5.9</version>
|
||||||
</parent>
|
</parent>
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
|
||||||
|
|||||||
@@ -1 +1 @@
|
|||||||
The channel in which warn threshold notifications should be sent to. Default: ${defaultValue}
|
The channel in which warn threshold notifications should be sent to. Default: ${currentTarget}
|
||||||
@@ -3,7 +3,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>dev.sheldan.oneplus.bot.templates.translations</groupId>
|
<groupId>dev.sheldan.oneplus.bot.templates.translations</groupId>
|
||||||
<artifactId>translations</artifactId>
|
<artifactId>translations</artifactId>
|
||||||
<version>1.5.8</version>
|
<version>1.5.9</version>
|
||||||
</parent>
|
</parent>
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>dev.sheldan.oneplus.bot.templates.translations.customizations</groupId>
|
<groupId>dev.sheldan.oneplus.bot.templates.translations.customizations</groupId>
|
||||||
<artifactId>customization-translations</artifactId>
|
<artifactId>customization-translations</artifactId>
|
||||||
<version>1.5.8</version>
|
<version>1.5.9</version>
|
||||||
</parent>
|
</parent>
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>dev.sheldan.oneplus.bot.templates.translations.modules</groupId>
|
<groupId>dev.sheldan.oneplus.bot.templates.translations.modules</groupId>
|
||||||
<artifactId>module-translations</artifactId>
|
<artifactId>module-translations</artifactId>
|
||||||
<version>1.5.8</version>
|
<version>1.5.9</version>
|
||||||
</parent>
|
</parent>
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>dev.sheldan.oneplus.bot.templates.translations.modules</groupId>
|
<groupId>dev.sheldan.oneplus.bot.templates.translations.modules</groupId>
|
||||||
<artifactId>module-translations</artifactId>
|
<artifactId>module-translations</artifactId>
|
||||||
<version>1.5.8</version>
|
<version>1.5.9</version>
|
||||||
</parent>
|
</parent>
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>dev.sheldan.oneplus.bot.templates.translations</groupId>
|
<groupId>dev.sheldan.oneplus.bot.templates.translations</groupId>
|
||||||
<artifactId>translations</artifactId>
|
<artifactId>translations</artifactId>
|
||||||
<version>1.5.8</version>
|
<version>1.5.9</version>
|
||||||
</parent>
|
</parent>
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
|
||||||
@@ -15,6 +15,7 @@
|
|||||||
<module>news-translations</module>
|
<module>news-translations</module>
|
||||||
<module>referral-translations</module>
|
<module>referral-translations</module>
|
||||||
<module>setup-translations</module>
|
<module>setup-translations</module>
|
||||||
|
<module>seasonal-translations</module>
|
||||||
</modules>
|
</modules>
|
||||||
|
|
||||||
</project>
|
</project>
|
||||||
@@ -3,7 +3,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>dev.sheldan.oneplus.bot.templates.translations.modules</groupId>
|
<groupId>dev.sheldan.oneplus.bot.templates.translations.modules</groupId>
|
||||||
<artifactId>module-translations</artifactId>
|
<artifactId>module-translations</artifactId>
|
||||||
<version>1.5.8</version>
|
<version>1.5.9</version>
|
||||||
</parent>
|
</parent>
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,36 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||||
|
<parent>
|
||||||
|
<groupId>dev.sheldan.oneplus.bot.templates.translations.modules</groupId>
|
||||||
|
<artifactId>module-translations</artifactId>
|
||||||
|
<version>1.5.9</version>
|
||||||
|
</parent>
|
||||||
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
|
||||||
|
<artifactId>seasonal-translations</artifactId>
|
||||||
|
|
||||||
|
<build>
|
||||||
|
<plugins>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
|
<artifactId>maven-assembly-plugin</artifactId>
|
||||||
|
<executions>
|
||||||
|
<execution>
|
||||||
|
<phase>package</phase>
|
||||||
|
<goals>
|
||||||
|
<goal>single</goal>
|
||||||
|
</goals>
|
||||||
|
<configuration>
|
||||||
|
<finalName>seasonal-translations-${project.version}</finalName>
|
||||||
|
<appendAssemblyId>false</appendAssemblyId>
|
||||||
|
<descriptors>
|
||||||
|
<descriptor>src/main/assembly/assembly.xml</descriptor>
|
||||||
|
</descriptors>
|
||||||
|
</configuration>
|
||||||
|
</execution>
|
||||||
|
</executions>
|
||||||
|
</plugin>
|
||||||
|
</plugins>
|
||||||
|
</build>
|
||||||
|
|
||||||
|
</project>
|
||||||
@@ -0,0 +1,15 @@
|
|||||||
|
<assembly xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2"
|
||||||
|
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||||
|
xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2 http://maven.apache.org/xsd/assembly-1.1.2.xsd">
|
||||||
|
<id>zip</id>
|
||||||
|
<includeBaseDirectory>false</includeBaseDirectory>
|
||||||
|
<formats>
|
||||||
|
<format>zip</format>
|
||||||
|
</formats>
|
||||||
|
<fileSets>
|
||||||
|
<fileSet>
|
||||||
|
<outputDirectory>.</outputDirectory>
|
||||||
|
<directory>${project.basedir}/src/main/resources</directory>
|
||||||
|
</fileSet>
|
||||||
|
</fileSets>
|
||||||
|
</assembly>
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
Adds a role to the lights mechanism
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
Adds this role to the mechanism which switches the colors of the defined roles to a random color, when `switchLights` is executed.
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
The role to add to the lights mechanism
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
Removes a role from the lights mechanism
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
Removes this role from the mechanism which switches the colors of the defined roles to a random color, when `switchLights` is executed.
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
The role to remove
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
Switches the configured roles to a random color
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
This command switches the configured roles to a completely random color.
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
Lights
|
||||||
@@ -3,7 +3,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>dev.sheldan.oneplus.bot.templates.translations.modules</groupId>
|
<groupId>dev.sheldan.oneplus.bot.templates.translations.modules</groupId>
|
||||||
<artifactId>module-translations</artifactId>
|
<artifactId>module-translations</artifactId>
|
||||||
<version>1.5.8</version>
|
<version>1.5.9</version>
|
||||||
</parent>
|
</parent>
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>dev.sheldan.oneplus.bot.templates</groupId>
|
<groupId>dev.sheldan.oneplus.bot.templates</groupId>
|
||||||
<artifactId>templates</artifactId>
|
<artifactId>templates</artifactId>
|
||||||
<version>1.5.8</version>
|
<version>1.5.9</version>
|
||||||
</parent>
|
</parent>
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>dev.sheldan.oneplus.bot.templates.translations.overrides</groupId>
|
<groupId>dev.sheldan.oneplus.bot.templates.translations.overrides</groupId>
|
||||||
<artifactId>translation-overrides</artifactId>
|
<artifactId>translation-overrides</artifactId>
|
||||||
<version>1.5.8</version>
|
<version>1.5.9</version>
|
||||||
</parent>
|
</parent>
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>dev.sheldan.oneplus.bot.templates.translations</groupId>
|
<groupId>dev.sheldan.oneplus.bot.templates.translations</groupId>
|
||||||
<artifactId>translations</artifactId>
|
<artifactId>translations</artifactId>
|
||||||
<version>1.5.8</version>
|
<version>1.5.9</version>
|
||||||
</parent>
|
</parent>
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user