Compare commits

...

5 Commits

Author SHA1 Message Date
Sheldan
c7e8fd315f [maven-release-plugin] prepare release oneplusbot-1.5.9 2021-12-24 14:25:19 +01:00
Sheldan
95ad8fdd3a [OPB-xxx] preparing for release 2021-12-24 13:53:01 +01:00
Sheldan
51775b454e [OPB-41] adding seasonal lights effect 2021-12-23 23:44:45 +01:00
Sheldan
aa4de8f571 [OPB-42] aligning templates with new multi embed support 2021-12-08 16:40:35 +01:00
Sheldan
eae07fd07c [maven-release-plugin] prepare for next development iteration 2021-10-26 00:07:29 +02:00
93 changed files with 2368 additions and 202 deletions

View File

@@ -34,5 +34,5 @@ jobs:
env:
REGISTRY_PREFIX: docker.pkg.github.com/sheldan/oneplusbot/
VERSION: ${{ env.version }}
ABSTRACTO_VERSION: 1.3.9
ABSTRACTO_VERSION: 1.3.10
ABSTRACTO_REGISTRY_PREFIX: docker.pkg.github.com/sheldan/abstracto/

View File

@@ -3,7 +3,7 @@
<parent>
<groupId>dev.sheldan.oneplus.bot.application</groupId>
<artifactId>application</artifactId>
<version>1.5.8</version>
<version>1.5.9</version>
</parent>
<modelVersion>4.0.0</modelVersion>

View File

@@ -3,7 +3,7 @@
<parent>
<groupId>dev.sheldan.oneplus.bot.application</groupId>
<artifactId>application</artifactId>
<version>1.5.8</version>
<version>1.5.9</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>executable</artifactId>
@@ -191,6 +191,12 @@
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>dev.sheldan.oneplus.bot.application.modules</groupId>
<artifactId>seasonal</artifactId>
<version>${project.version}</version>
</dependency>
</dependencies>
</project>

View File

@@ -3,7 +3,7 @@
<parent>
<groupId>dev.sheldan.oneplus.bot.application.custom</groupId>
<artifactId>oneplus-bot-customizations</artifactId>
<version>1.5.8</version>
<version>1.5.9</version>
</parent>
<modelVersion>4.0.0</modelVersion>

View File

@@ -3,7 +3,7 @@
<parent>
<artifactId>oneplus-bot-customizations</artifactId>
<groupId>dev.sheldan.oneplus.bot.application.custom</groupId>
<version>1.5.8</version>
<version>1.5.9</version>
</parent>
<modelVersion>4.0.0</modelVersion>

View File

@@ -3,7 +3,7 @@
<parent>
<groupId>dev.sheldan.oneplus.bot.application</groupId>
<artifactId>application</artifactId>
<version>1.5.8</version>
<version>1.5.9</version>
</parent>
<modelVersion>4.0.0</modelVersion>

View File

@@ -3,7 +3,7 @@
<parent>
<groupId>dev.sheldan.oneplus.bot.application.custom</groupId>
<artifactId>oneplus-bot-customizations</artifactId>
<version>1.5.8</version>
<version>1.5.9</version>
</parent>
<modelVersion>4.0.0</modelVersion>

View File

@@ -3,7 +3,7 @@
<parent>
<artifactId>oneplus-bot-modules</artifactId>
<groupId>dev.sheldan.oneplus.bot.application.modules</groupId>
<version>1.5.8</version>
<version>1.5.9</version>
</parent>
<modelVersion>4.0.0</modelVersion>

View File

@@ -3,7 +3,7 @@
<parent>
<groupId>dev.sheldan.oneplus.bot.application.modules</groupId>
<artifactId>oneplus-bot-modules</artifactId>
<version>1.5.8</version>
<version>1.5.9</version>
</parent>
<modelVersion>4.0.0</modelVersion>

View File

@@ -3,7 +3,7 @@
<parent>
<groupId>dev.sheldan.oneplus.bot.application</groupId>
<artifactId>application</artifactId>
<version>1.5.8</version>
<version>1.5.9</version>
</parent>
<modelVersion>4.0.0</modelVersion>
@@ -15,6 +15,7 @@
<module>setup</module>
<module>referral</module>
<module>faq</module>
<module>seasonal</module>
</modules>
<properties>

View File

@@ -3,7 +3,7 @@
<parent>
<groupId>dev.sheldan.oneplus.bot.application.modules</groupId>
<artifactId>oneplus-bot-modules</artifactId>
<version>1.5.8</version>
<version>1.5.9</version>
</parent>
<modelVersion>4.0.0</modelVersion>

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

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,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";
}
}

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

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="tables/tables.xml" relativeToChangelogFile="true"/>
<include file="seedData/data.xml" relativeToChangelogFile="true"/>
</databaseChangeLog>

View File

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

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

View File

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

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="lights_role.xml" relativeToChangelogFile="true"/>
</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="1.5.9/collection.xml" relativeToChangelogFile="true"/>
</databaseChangeLog>

View File

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

View File

@@ -3,7 +3,7 @@
<parent>
<artifactId>oneplus-bot-modules</artifactId>
<groupId>dev.sheldan.oneplus.bot.application.modules</groupId>
<version>1.5.8</version>
<version>1.5.9</version>
</parent>
<modelVersion>4.0.0</modelVersion>

View File

@@ -5,13 +5,13 @@
<parent>
<groupId>dev.sheldan.oneplus.bot</groupId>
<artifactId>oneplusbot</artifactId>
<version>1.5.8</version>
<version>1.5.9</version>
</parent>
<groupId>dev.sheldan.oneplus.bot.application</groupId>
<artifactId>application</artifactId>
<packaging>pom</packaging>
<version>1.5.8</version>
<version>1.5.9</version>
<modules>
<module>executable</module>
<module>oneplus-bot-customizations</module>

View File

@@ -3,7 +3,7 @@
<parent>
<groupId>dev.sheldan.oneplus.bot.deployment</groupId>
<artifactId>deployment</artifactId>
<version>1.5.8</version>
<version>1.5.9</version>
</parent>
<modelVersion>4.0.0</modelVersion>

View File

@@ -29,4 +29,4 @@ PGADMIN_DEFAULT_EMAIL=sheldan@sheldan.dev
PGADMIN_DEFAULT_PASSWORD=admin
TOKEN=<INSERT TOKEN>
YOUTUBE_API_KEY=<INSERT KEY>
ONEPLUS_BOT_VERSION=1.5.8
ONEPLUS_BOT_VERSION=1.5.9

View File

@@ -3,7 +3,7 @@
<parent>
<groupId>dev.sheldan.oneplus.bot.deployment</groupId>
<artifactId>deployment</artifactId>
<version>1.5.8</version>
<version>1.5.9</version>
</parent>
<modelVersion>4.0.0</modelVersion>
@@ -513,6 +513,16 @@
<destFileName>referral.zip</destFileName>
</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>
<groupId>dev.sheldan.oneplus.bot.templates.translations.modules</groupId>
<artifactId>faq-translations</artifactId>
@@ -834,6 +844,17 @@
<destFileName>faq.zip</destFileName>
</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>
<groupId>dev.sheldan.oneplus.bot.application</groupId>
<artifactId>database</artifactId>

View File

@@ -11,7 +11,7 @@
"voice-channel-context", "anti-raid",
"starboard-custom", "dynamic-activity-custom-translations", "moderation-custom",
"overrides-translation-moderation",
"news", "setup", "referral", "faq"],
"news", "setup", "referral", "faq", "seasonal"],
"liquibase_artifacts": [
{ "zip": "scheduling", "file": "scheduling-changeLog.xml" },
{ "zip": "core", "file": "core-changeLog.xml" },
@@ -40,7 +40,8 @@
{ "zip": "moderation-custom", "file": "moderation-custom-changeLog.xml"},
{ "zip": "dynamic-activity-custom", "file": "dynamicActivity-custom-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"}
]
}

View File

@@ -3,7 +3,7 @@
<parent>
<artifactId>oneplusbot</artifactId>
<groupId>dev.sheldan.oneplus.bot</groupId>
<version>1.5.8</version>
<version>1.5.9</version>
</parent>
<modelVersion>4.0.0</modelVersion>

View File

@@ -12,15 +12,15 @@
<groupId>dev.sheldan.oneplus.bot</groupId>
<artifactId>oneplusbot</artifactId>
<version>1.5.8</version>
<version>1.5.9</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 opbot version, update the .env as well-->
<abstracto.version>1.3.9</abstracto.version>
<abstracto.templates.version>1.2.21</abstracto.templates.version>
<abstracto.version>1.3.10</abstracto.version>
<abstracto.templates.version>1.3.0</abstracto.templates.version>
</properties>
<modules>
@@ -56,7 +56,7 @@
<scm>
<url>https://maven.pkg.github.com/Sheldan/OnePlusBot</url>
<developerConnection>scm:git:git@github.com:Sheldan/OnePlusBot.git</developerConnection>
<tag>oneplusbot-1.5.8</tag>
<tag>oneplusbot-1.5.9</tag>
</scm>
</project>

View File

@@ -3,7 +3,7 @@
<parent>
<groupId>dev.sheldan.oneplus.bot.templates.customizations</groupId>
<artifactId>customization-templates</artifactId>
<version>1.5.8</version>
<version>1.5.9</version>
</parent>
<modelVersion>4.0.0</modelVersion>

View File

@@ -1,13 +1,17 @@
{
"title": {
"title": "<@safe_include "warning_threshold_reached_notification_title"/>"
},
<#include "abstracto_color">,
<#assign warnedMemberMention=memberDisplay.memberMention>
<#assign warnedUserId=memberDisplay.userId>
<#assign memberMention=memberDisplay.memberMention>
<#assign warnCount=warnCount>
<#assign channelDisplay=channelDisplay>
<#assign messageId=messageId>
"description": "<@safe_include "warning_threshold_reached_notification_description"/>"
"embeds": [
{
"title": {
"title": "<@safe_include "warning_threshold_reached_notification_title"/>"
},
<#include "abstracto_color">,
<#assign warnedMemberMention=memberDisplay.memberMention>
<#assign warnedUserId=memberDisplay.userId>
<#assign memberMention=memberDisplay.memberMention>
<#assign warnCount=warnCount>
<#assign channelDisplay=channelDisplay>
<#assign messageId=messageId>
"description": "<@safe_include "warning_threshold_reached_notification_description"/>"
}
]
}

View File

@@ -3,7 +3,7 @@
<parent>
<groupId>dev.sheldan.oneplus.bot.templates</groupId>
<artifactId>oneplus-bot-templates</artifactId>
<version>1.5.8</version>
<version>1.5.9</version>
</parent>
<modelVersion>4.0.0</modelVersion>

View File

@@ -3,7 +3,7 @@
<parent>
<groupId>dev.sheldan.oneplus.bot.templates.customizations</groupId>
<artifactId>customization-templates</artifactId>
<version>1.5.8</version>
<version>1.5.9</version>
</parent>
<modelVersion>4.0.0</modelVersion>

View File

@@ -1,41 +1,45 @@
{
"title": {
"title": "<@safe_include "starboard_post_created_title"/>"
},
<#include "abstracto_color">,
"description": "<@safe_include "starboard_post_created_description"/>",
"fields": [
{
"name": "<@safe_include "starboard_post_notification_field_starboard_message"/>",
<#if starboardMessage??>
"value": "[<@safe_include "starboard_post_notification_field_starboard_message_jump"/>](${starboardMessage.jumpUrl})"
<#else>
"value": "${post.starboardMessageId?c}"
</#if>
},
{
"name": "<@safe_include "starboard_post_notification_field_starred_message"/>",
<#if starredMessage??>
"value": "[<@safe_include "starboard_post_notification_field_starboard_message_jump"/>](${starredMessage.jumpUrl})"
<#else>
"value": "${post.postMessageId?c}"
</#if>
},
{
"name": "<@safe_include "starboard_post_notification_field_starred_user"/>",
<#if starredMember??>
"value": "${starredMember.asMention}"
<#else>
"value": "${starredUserId?c} (<@safe_include "user_left_server"/>)"
</#if>
},
{
"name": "<@safe_include "starboard_post_notification_field_starring_user"/>",
<#if starringMember??>
"value": "${starringMember.asMention}"
<#else>
"value": "${starringUserId?c} (<@safe_include "user_left_server"/>)"
</#if>
}
]
"embeds": [
{
"title": {
"title": "<@safe_include "starboard_post_created_title"/>"
},
<#include "abstracto_color">,
"description": "<@safe_include "starboard_post_created_description"/>",
"fields": [
{
"name": "<@safe_include "starboard_post_notification_field_starboard_message"/>",
<#if starboardMessage??>
"value": "[<@safe_include "starboard_post_notification_field_starboard_message_jump"/>](${starboardMessage.jumpUrl})"
<#else>
"value": "${post.starboardMessageId?c}"
</#if>
},
{
"name": "<@safe_include "starboard_post_notification_field_starred_message"/>",
<#if starredMessage??>
"value": "[<@safe_include "starboard_post_notification_field_starboard_message_jump"/>](${starredMessage.jumpUrl})"
<#else>
"value": "${post.postMessageId?c}"
</#if>
},
{
"name": "<@safe_include "starboard_post_notification_field_starred_user"/>",
<#if starredMember??>
"value": "${starredMember.asMention}"
<#else>
"value": "${starredUserId?c} (<@safe_include "user_left_server"/>)"
</#if>
},
{
"name": "<@safe_include "starboard_post_notification_field_starring_user"/>",
<#if starringMember??>
"value": "${starringMember.asMention}"
<#else>
"value": "${starringUserId?c} (<@safe_include "user_left_server"/>)"
</#if>
}
]
}
]
}

View File

@@ -1,33 +1,37 @@
{
"title": {
"title": "<@safe_include "starboard_post_deleted_title"/>"
},
<#include "abstracto_color">,
"description": "<@safe_include "starboard_post_deleted_description"/>",
"fields": [
{
"name": "<@safe_include "starboard_post_notification_field_starred_message"/>",
<#if starredMessage??>
"value": "[<@safe_include "starboard_post_notification_field_starboard_message_jump"/>](${starredMessage.jumpUrl})"
<#else>
"value": "${starredMessageSimple.jumpUrl}"
</#if>
},
{
"name": "<@safe_include "starboard_post_notification_field_starred_user"/>",
<#if starredMember??>
"value": "${starredMember.asMention}"
<#else>
"value": "${starredUserId?c} (<@safe_include "user_left_server"/>)"
</#if>
},
{
"name": "<@safe_include "starboard_post_notification_field_starring_user"/>",
<#if starringMember??>
"value": "${starringMember.asMention}"
<#else>
"value": "${starringUserId?c} (<@safe_include "user_left_server"/>)"
</#if>
}
]
"embeds": [
{
"title": {
"title": "<@safe_include "starboard_post_deleted_title"/>"
},
<#include "abstracto_color">,
"description": "<@safe_include "starboard_post_deleted_description"/>",
"fields": [
{
"name": "<@safe_include "starboard_post_notification_field_starred_message"/>",
<#if starredMessage??>
"value": "[<@safe_include "starboard_post_notification_field_starboard_message_jump"/>](${starredMessage.jumpUrl})"
<#else>
"value": "${starredMessageSimple.jumpUrl}"
</#if>
},
{
"name": "<@safe_include "starboard_post_notification_field_starred_user"/>",
<#if starredMember??>
"value": "${starredMember.asMention}"
<#else>
"value": "${starredUserId?c} (<@safe_include "user_left_server"/>)"
</#if>
},
{
"name": "<@safe_include "starboard_post_notification_field_starring_user"/>",
<#if starringMember??>
"value": "${starringMember.asMention}"
<#else>
"value": "${starringUserId?c} (<@safe_include "user_left_server"/>)"
</#if>
}
]
}
]
}

View File

@@ -3,7 +3,7 @@
<parent>
<groupId>dev.sheldan.oneplus.bot.templates.modules</groupId>
<artifactId>oneplus-bot-module-templates</artifactId>
<version>1.5.8</version>
<version>1.5.9</version>
</parent>
<modelVersion>4.0.0</modelVersion>

View File

@@ -1,6 +1,8 @@
{
<#include "abstracto_color">,
"description": "
"embeds": [
{
<#include "abstracto_color">,
"description": "
<#list uses as usage>
<#assign usage=usage>
<#assign commandName=usage.faqCommandName><@safe_include "FAQUsage_command_display"/>:
@@ -11,4 +13,6 @@
<@safe_include "FAQUsage_usage_display"/><#sep>, </#list>
<#else>
<@safe_include "FAQUsage_no_usages"/></#list>"
}
]
}

View File

@@ -2,20 +2,24 @@
<#if additionalMessage??>
"additionalMessage": "${additionalMessage?json_string}"
</#if>
<#if description?? || imageURL??>
<#include "user_author">
<#if additionalMessage??>,</#if>
<@user_author user=author/>
<#if description??>
,"description": "${description?json_string}"
</#if>
,"color" : {
"r": "${red}",
"g": "${green}",
"b": "${blue}"
}
<#if imageURL??>
,"imageUrl": "${imageURL}"
</#if>
</#if>
"embeds": [
{
<#if description?? || imageURL??>
<#include "user_author">
<#if additionalMessage??>,</#if>
<@user_author user=author/>
<#if description??>
,"description": "${description?json_string}"
</#if>
,"color" : {
"r": "${red}",
"g": "${green}",
"b": "${blue}"
}
<#if imageURL??>
,"imageUrl": "${imageURL}"
</#if>
</#if>
}
]
}

View File

@@ -1,7 +1,9 @@
{
<#include "abstracto_color">,
"description": "
<@safe_include "listFAQCommands_command_header"/>
"embeds": [
{
<#include "abstracto_color">,
"description": "
<@safe_include "listFAQCommands_command_header"/>
<#list commands as command>
<#assign command=command>
@@ -17,4 +19,6 @@
<#else>
<@safe_include "listFAQCommands_no_commands"/></#list>"
}
]
}

View File

@@ -3,7 +3,7 @@
<parent>
<groupId>dev.sheldan.oneplus.bot.templates.modules</groupId>
<artifactId>oneplus-bot-module-templates</artifactId>
<version>1.5.8</version>
<version>1.5.9</version>
</parent>
<modelVersion>4.0.0</modelVersion>

View File

@@ -1,12 +1,18 @@
{
<#assign roleMention="<@&479202891358535681>"/>
<#assign authorMention>${author.user.name}#${author.user.discriminator}</#assign>
"additionalMessage": "<@safe_include "news_post_description"/>",
<#if message.attachments?size gt 0>
"imageUrl": "${message.attachments[0].proxyUrl}",
</#if>
"metaConfig": {
"allowsRoleMention": true,
"preventEmptyEmbed": true
}
"additionalMessage": "<@safe_include "news_post_description"/>",
"embeds": [
{
<#if message.attachments?size gt 0>
"imageUrl": "${message.attachments[0].proxyUrl}",
</#if>
"metaConfig": {
"preventEmptyEmbed": true
}
}
],
"messageConfig": {
"allowsRoleMention": true
}
}

View File

@@ -3,7 +3,7 @@
<parent>
<groupId>dev.sheldan.oneplus.bot.templates</groupId>
<artifactId>oneplus-bot-templates</artifactId>
<version>1.5.8</version>
<version>1.5.9</version>
</parent>
<modelVersion>4.0.0</modelVersion>

View File

@@ -3,7 +3,7 @@
<parent>
<groupId>dev.sheldan.oneplus.bot.templates.modules</groupId>
<artifactId>oneplus-bot-module-templates</artifactId>
<version>1.5.8</version>
<version>1.5.9</version>
</parent>
<modelVersion>4.0.0</modelVersion>

View File

@@ -1,17 +1,21 @@
{
<#include "abstracto_color">,
<#include "member_author">
<#assign member=postingMember>
<@member_author member=member/>,
<#include "full_member_info">
"description": "<@safe_include "referralListener_referral_post_description"/>",
"fields": [
<#list referrals as referral><#assign referral=referral>
{
"name": "<@safe_include "referral_link_type_${referral.type.key}"/>",
"value": "[${referral.referralIdentifier?json_string}](${referral.referralLink?json_string})"
}
<#sep>,
</#list>
]
"embeds": [
{
<#include "abstracto_color">,
<#include "member_author">
<#assign member=postingMember>
<@member_author member=member/>,
<#include "full_member_info">
"description": "<@safe_include "referralListener_referral_post_description"/>",
"fields": [
<#list referrals as referral><#assign referral=referral>
{
"name": "<@safe_include "referral_link_type_${referral.type.key}"/>",
"value": "[${referral.referralIdentifier?json_string}](${referral.referralLink?json_string})"
}
<#sep>,
</#list>
]
}
]
}

View File

@@ -1,5 +1,9 @@
{
<#include "abstracto_color">,
"description": "<@safe_include "too_recent_referral_post"/>",
"timeStamp": "${nextReferralDate}"
"embeds": [
{
<#include "abstracto_color">,
"description": "<@safe_include "too_recent_referral_post"/>",
"timeStamp": "${nextReferralDate}"
}
]
}

View File

@@ -3,13 +3,13 @@
<parent>
<groupId>dev.sheldan.oneplus.bot.templates</groupId>
<artifactId>templates</artifactId>
<version>1.5.8</version>
<version>1.5.9</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>oneplus-bot-templates</artifactId>
<packaging>pom</packaging>
<version>1.5.8</version>
<version>1.5.9</version>
<modules>
<module>module-templates</module>
<module>customization-templates</module>

View File

@@ -3,7 +3,7 @@
<parent>
<groupId>dev.sheldan.oneplus.bot.templates.overrides</groupId>
<artifactId>template-overrides</artifactId>
<version>1.5.8</version>
<version>1.5.9</version>
</parent>
<modelVersion>4.0.0</modelVersion>

View File

@@ -3,7 +3,7 @@
<parent>
<groupId>dev.sheldan.oneplus.bot.templates.overrides</groupId>
<artifactId>template-overrides</artifactId>
<version>1.5.8</version>
<version>1.5.9</version>
</parent>
<modelVersion>4.0.0</modelVersion>

View File

@@ -3,7 +3,7 @@
<parent>
<groupId>dev.sheldan.oneplus.bot.templates.overrides</groupId>
<artifactId>template-overrides</artifactId>
<version>1.5.8</version>
<version>1.5.9</version>
</parent>
<modelVersion>4.0.0</modelVersion>

View File

@@ -3,7 +3,7 @@
<parent>
<groupId>dev.sheldan.oneplus.bot.templates.overrides</groupId>
<artifactId>template-overrides</artifactId>
<version>1.5.8</version>
<version>1.5.9</version>
</parent>
<modelVersion>4.0.0</modelVersion>

View File

@@ -3,7 +3,7 @@
<parent>
<groupId>dev.sheldan.oneplus.bot.templates</groupId>
<artifactId>oneplus-bot-templates</artifactId>
<version>1.5.8</version>
<version>1.5.9</version>
</parent>
<modelVersion>4.0.0</modelVersion>

View File

@@ -3,7 +3,7 @@
<parent>
<groupId>dev.sheldan.oneplus.bot.templates.overrides</groupId>
<artifactId>template-overrides</artifactId>
<version>1.5.8</version>
<version>1.5.9</version>
</parent>
<modelVersion>4.0.0</modelVersion>

View File

@@ -3,7 +3,7 @@
<parent>
<groupId>dev.sheldan.oneplus.bot.templates.overrides</groupId>
<artifactId>template-overrides</artifactId>
<version>1.5.8</version>
<version>1.5.9</version>
</parent>
<modelVersion>4.0.0</modelVersion>

View File

@@ -1,21 +1,25 @@
{
<#include "abstracto_color">,
"fields": [
{
"name": "<@safe_include "urban_search_command_response_embed_field_title_link"/>",
"value": "${definition.url?json_string}",
"inline": "true"
},
{
"name": "<@safe_include "urban_search_command_response_embed_field_title_example"/>",
"value": "${definition.example?json_string}",
"valueLengthLimit": 250,
"inline": "true"
}
],
"additionalMessage": "${definition.definition?json_string}",
"metaConfig": {
"messageLimit": 1,
"additionalMessageLengthLimit": 250
}
"additionalMessage": "${definition.definition?json_string}",
"embeds": [
{
<#include "abstracto_color">,
"fields": [
{
"name": "<@safe_include "urban_search_command_response_embed_field_title_link"/>",
"value": "${definition.url?json_string}",
"inline": "true"
},
{
"name": "<@safe_include "urban_search_command_response_embed_field_title_example"/>",
"value": "${definition.example?json_string}",
"valueLengthLimit": 250,
"inline": "true"
}
]
}
],
"messageConfig": {
"messageLimit": 1,
"additionalMessageLengthLimit": 250
}
}

View File

@@ -4,7 +4,7 @@
<parent>
<groupId>dev.sheldan.oneplus.bot</groupId>
<artifactId>oneplusbot</artifactId>
<version>1.5.8</version>
<version>1.5.9</version>
</parent>
<modules>
@@ -14,7 +14,7 @@
<groupId>dev.sheldan.oneplus.bot.templates</groupId>
<artifactId>templates</artifactId>
<version>1.5.8</version>
<version>1.5.9</version>
<packaging>pom</packaging>
</project>

View File

@@ -3,7 +3,7 @@
<parent>
<groupId>dev.sheldan.oneplus.bot.templates.translations.customizations</groupId>
<artifactId>customization-translations</artifactId>
<version>1.5.8</version>
<version>1.5.9</version>
</parent>
<modelVersion>4.0.0</modelVersion>

View File

@@ -3,7 +3,7 @@
<parent>
<groupId>dev.sheldan.oneplus.bot.templates.translations.customizations</groupId>
<artifactId>customization-translations</artifactId>
<version>1.5.8</version>
<version>1.5.9</version>
</parent>
<modelVersion>4.0.0</modelVersion>

View File

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

View File

@@ -3,7 +3,7 @@
<parent>
<groupId>dev.sheldan.oneplus.bot.templates.translations</groupId>
<artifactId>translations</artifactId>
<version>1.5.8</version>
<version>1.5.9</version>
</parent>
<modelVersion>4.0.0</modelVersion>

View File

@@ -3,7 +3,7 @@
<parent>
<groupId>dev.sheldan.oneplus.bot.templates.translations.customizations</groupId>
<artifactId>customization-translations</artifactId>
<version>1.5.8</version>
<version>1.5.9</version>
</parent>
<modelVersion>4.0.0</modelVersion>

View File

@@ -3,7 +3,7 @@
<parent>
<groupId>dev.sheldan.oneplus.bot.templates.translations.modules</groupId>
<artifactId>module-translations</artifactId>
<version>1.5.8</version>
<version>1.5.9</version>
</parent>
<modelVersion>4.0.0</modelVersion>

View File

@@ -3,7 +3,7 @@
<parent>
<groupId>dev.sheldan.oneplus.bot.templates.translations.modules</groupId>
<artifactId>module-translations</artifactId>
<version>1.5.8</version>
<version>1.5.9</version>
</parent>
<modelVersion>4.0.0</modelVersion>

View File

@@ -3,7 +3,7 @@
<parent>
<groupId>dev.sheldan.oneplus.bot.templates.translations</groupId>
<artifactId>translations</artifactId>
<version>1.5.8</version>
<version>1.5.9</version>
</parent>
<modelVersion>4.0.0</modelVersion>
@@ -15,6 +15,7 @@
<module>news-translations</module>
<module>referral-translations</module>
<module>setup-translations</module>
<module>seasonal-translations</module>
</modules>
</project>

View File

@@ -3,7 +3,7 @@
<parent>
<groupId>dev.sheldan.oneplus.bot.templates.translations.modules</groupId>
<artifactId>module-translations</artifactId>
<version>1.5.8</version>
<version>1.5.9</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.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>

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 @@
Adds this role to the mechanism which switches the colors of the defined roles to a random color, when `switchLights` is executed.

View File

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

View File

@@ -0,0 +1 @@
This command switches the configured roles to a completely random color.

View File

@@ -3,7 +3,7 @@
<parent>
<groupId>dev.sheldan.oneplus.bot.templates.translations.modules</groupId>
<artifactId>module-translations</artifactId>
<version>1.5.8</version>
<version>1.5.9</version>
</parent>
<modelVersion>4.0.0</modelVersion>

View File

@@ -3,7 +3,7 @@
<parent>
<groupId>dev.sheldan.oneplus.bot.templates</groupId>
<artifactId>templates</artifactId>
<version>1.5.8</version>
<version>1.5.9</version>
</parent>
<modelVersion>4.0.0</modelVersion>

View File

@@ -3,7 +3,7 @@
<parent>
<groupId>dev.sheldan.oneplus.bot.templates.translations.overrides</groupId>
<artifactId>translation-overrides</artifactId>
<version>1.5.8</version>
<version>1.5.9</version>
</parent>
<modelVersion>4.0.0</modelVersion>

View File

@@ -3,7 +3,7 @@
<parent>
<groupId>dev.sheldan.oneplus.bot.templates.translations</groupId>
<artifactId>translations</artifactId>
<version>1.5.8</version>
<version>1.5.9</version>
</parent>
<modelVersion>4.0.0</modelVersion>