[OPB-19] adding referral link functionality

changing name for setups feature
aligning starboard custom module name
This commit is contained in:
Sheldan
2021-05-12 00:14:18 +02:00
parent 67ae9702fd
commit e236522328
75 changed files with 2302 additions and 98 deletions

View File

@@ -12,8 +12,9 @@
<packaging>pom</packaging>
<version>1.3.11-SNAPSHOT</version>
<modules>
<module>starboard-custom</module>
<module>starboard-custom-templates</module>
<module>news-templates</module>
<module>referral-templates</module>
</modules>

View File

@@ -0,0 +1,38 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<parent>
<artifactId>oneplus-bot-modules-templates</artifactId>
<groupId>dev.sheldan.oneplus.bot.templates.modules</groupId>
<version>1.3.11-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>referral-templates</artifactId>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-assembly-plugin</artifactId>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>single</goal>
</goals>
<configuration>
<finalName>referral-templates-${project.version}</finalName>
<appendAssemblyId>false</appendAssemblyId>
<descriptors>
<descriptor>src/main/assembly/assembly.xml</descriptor>
</descriptors>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>

View File

@@ -0,0 +1,3 @@
{
"additionalMessage": "<@safe_include "no_referral_link_found"/>"
}

View File

@@ -0,0 +1,17 @@
{
<#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

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

View File

@@ -13,6 +13,7 @@
<modules>
<module>starboard-custom-translations</module>
<module>news-translations</module>
<module>setups-translations</module>
<module>setup-translations</module>
<module>referral-translations</module>
</modules>
</project>

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>
<artifactId>translations</artifactId>
<groupId>dev.sheldan.oneplus.bot.templates.translations</groupId>
<version>1.3.11-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>referral-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>referral-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 @@
The channel in which the referral codes should be handled in. Currently: ${currentTarget}

View File

@@ -0,0 +1 @@
The last referral post was too recent. See the footer for the next time you can retry

View File

@@ -9,7 +9,7 @@
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>setups-translations</artifactId>
<artifactId>setup-translations</artifactId>
<build>
<plugins>
@@ -23,7 +23,7 @@
<goal>single</goal>
</goals>
<configuration>
<finalName>setups-translations-${project.version}</finalName>
<finalName>setup-translations-${project.version}</finalName>
<appendAssemblyId>false</appendAssemblyId>
<descriptors>
<descriptor>src/main/assembly/assembly.xml</descriptor>

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

@@ -7,7 +7,7 @@
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>starboard-custom</artifactId>
<artifactId>starboard-custom-translations</artifactId>
<packaging>pom</packaging>
<build>