mirror of
https://github.com/Sheldan/OnePlusBot.git
synced 2026-04-13 04:16:28 +00:00
[OPB-40] adding warning threshold notification
restructured template module structure and naming
This commit is contained in:
@@ -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.modules</groupId>
|
||||
<artifactId>oneplus-bot-module-templates</artifactId>
|
||||
<version>1.5.8-SNAPSHOT</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
<artifactId>faq-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>faq-templates-${project.version}</finalName>
|
||||
<appendAssemblyId>false</appendAssemblyId>
|
||||
<descriptors>
|
||||
<descriptor>src/main/assembly/assembly.xml</descriptor>
|
||||
</descriptors>
|
||||
</configuration>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
|
||||
</project>
|
||||
@@ -0,0 +1,15 @@
|
||||
<assembly xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2 http://maven.apache.org/xsd/assembly-1.1.2.xsd">
|
||||
<id>zip</id>
|
||||
<includeBaseDirectory>false</includeBaseDirectory>
|
||||
<formats>
|
||||
<format>zip</format>
|
||||
</formats>
|
||||
<fileSets>
|
||||
<fileSet>
|
||||
<outputDirectory>.</outputDirectory>
|
||||
<directory>${project.basedir}/src/main/resources</directory>
|
||||
</fileSet>
|
||||
</fileSets>
|
||||
</assembly>
|
||||
@@ -0,0 +1,14 @@
|
||||
{
|
||||
<#include "abstracto_color">,
|
||||
"description": "
|
||||
<#list uses as usage>
|
||||
<#assign usage=usage>
|
||||
<#assign commandName=usage.faqCommandName><@safe_include "FAQUsage_command_display"/>:
|
||||
<#list usage.faqChannelGroupUsages as channelGroupUsage>
|
||||
<#assign channelGroupUsage=channelGroupUsage>
|
||||
<#assign channelGroupName=channelGroupUsage.channelGroupName>
|
||||
<#assign uses=channelGroupUsage.uses>
|
||||
<@safe_include "FAQUsage_usage_display"/><#sep>, </#list>
|
||||
<#else>
|
||||
<@safe_include "FAQUsage_no_usages"/></#list>"
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
{
|
||||
<#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>
|
||||
}
|
||||
@@ -0,0 +1,4 @@
|
||||
{
|
||||
"additionalMessage": "<@safe_include "FAQ_response_no_command_found_message"/>
|
||||
<#if availableCommands?size gt 0><#assign commandNames>`${availableCommands?join('`, `')}`</#assign><@safe_include "FAQ_response_no_command_found_message_available_commands"/><#else><@safe_include "FAQ_response_no_command_found_message_no_commands"/></#if>"
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
{
|
||||
<#include "abstracto_color">,
|
||||
"description": "
|
||||
<@safe_include "listFAQCommands_command_header"/>
|
||||
|
||||
<#list commands as command>
|
||||
<#assign command=command>
|
||||
<#assign aliases>${command.aliases?join(', ')}</#assign>
|
||||
<#assign commandName=command.commandName><@safe_include "listFAQCommands_command_display"/>
|
||||
<#if command.aliases?size gt 0> <@safe_include "listFAQCommands_channel_group_display_aliases"/></#if>
|
||||
<@safe_include "listFAQCommands_channel_groups_header"/>
|
||||
<#list command.channelGroups as channelGroup>
|
||||
<#assign channelGroup=channelGroup>
|
||||
<#assign channelGroupName=channelGroup.channelGroupName>
|
||||
<#assign responseCount=channelGroup.responseCount>
|
||||
<@safe_include "listFAQCommands_channel_group_display"/><#sep>, </#list>
|
||||
|
||||
<#else>
|
||||
<@safe_include "listFAQCommands_no_commands"/></#list>"
|
||||
}
|
||||
@@ -0,0 +1,2 @@
|
||||
<#assign commandKeys>${model.duplicatedCommandKeys?join(', ')}</#assign>
|
||||
<#include "duplicated_command_or_alias_exception_message">
|
||||
@@ -0,0 +1,4 @@
|
||||
<#assign commandName=model.commandName>
|
||||
<#assign aliasName=model.alias>
|
||||
<#assign originalCommandName=model.originCommandName>
|
||||
<#include "duplicated_faq_command_alias_exception_message">
|
||||
@@ -0,0 +1,3 @@
|
||||
<#assign commandName=model.commandName>
|
||||
<#assign aliasName=model.alias>
|
||||
<#include "faq_command_alias_shadowing_exception_message">
|
||||
@@ -0,0 +1,2 @@
|
||||
<#assign commandName=model.commandName>
|
||||
<#include "faq_command_not_found_exception_message">
|
||||
@@ -0,0 +1,3 @@
|
||||
<#assign commandName=model.commandName>
|
||||
<#assign channelGroupName=model.channelGroupName>
|
||||
<#include "faq_command_response_duplicated_position_exception_message">
|
||||
@@ -0,0 +1,2 @@
|
||||
<#assign commandName=model.commandName>
|
||||
<#include "global_faq_command_config_mismatch_exception_message">
|
||||
@@ -0,0 +1,2 @@
|
||||
<#assign commandNames>${model.commandNames?join(', ')}</#assign>
|
||||
<#include "global_faq_command_responses_exception_message">
|
||||
@@ -0,0 +1 @@
|
||||
<#include "no_faq_response_found_exception_message">
|
||||
@@ -0,0 +1,37 @@
|
||||
<?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.modules</groupId>
|
||||
<artifactId>oneplus-bot-module-templates</artifactId>
|
||||
<version>1.5.8-SNAPSHOT</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
<artifactId>news-templates</artifactId>
|
||||
<packaging>pom</packaging>
|
||||
|
||||
<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>news-templates-${project.version}</finalName>
|
||||
<appendAssemblyId>false</appendAssemblyId>
|
||||
<descriptors>
|
||||
<descriptor>src/main/assembly/assembly.xml</descriptor>
|
||||
</descriptors>
|
||||
</configuration>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
|
||||
</project>
|
||||
@@ -0,0 +1,15 @@
|
||||
<assembly xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2 http://maven.apache.org/xsd/assembly-1.1.2.xsd">
|
||||
<id>zip</id>
|
||||
<includeBaseDirectory>false</includeBaseDirectory>
|
||||
<formats>
|
||||
<format>zip</format>
|
||||
</formats>
|
||||
<fileSets>
|
||||
<fileSet>
|
||||
<outputDirectory>.</outputDirectory>
|
||||
<directory>${project.basedir}/src/main/resources</directory>
|
||||
</fileSet>
|
||||
</fileSets>
|
||||
</assembly>
|
||||
@@ -0,0 +1,12 @@
|
||||
{
|
||||
<#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
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
<#include "news_post_locked_exception_message">
|
||||
@@ -0,0 +1 @@
|
||||
<#include "news_post_not_found_exception_text">
|
||||
22
templates/oneplus-bot-templates/module-templates/pom.xml
Normal file
22
templates/oneplus-bot-templates/module-templates/pom.xml
Normal file
@@ -0,0 +1,22 @@
|
||||
<?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</groupId>
|
||||
<artifactId>oneplus-bot-templates</artifactId>
|
||||
<version>1.5.8-SNAPSHOT</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
<groupId>dev.sheldan.oneplus.bot.templates.modules</groupId>
|
||||
<artifactId>oneplus-bot-module-templates</artifactId>
|
||||
<packaging>pom</packaging>
|
||||
|
||||
<modules>
|
||||
<module>faq-templates</module>
|
||||
<module>news-templates</module>
|
||||
<module>referral-templates</module>
|
||||
</modules>
|
||||
|
||||
</project>
|
||||
@@ -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.modules</groupId>
|
||||
<artifactId>oneplus-bot-module-templates</artifactId>
|
||||
<version>1.5.8-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>
|
||||
@@ -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,3 @@
|
||||
{
|
||||
"additionalMessage": "<@safe_include "no_referral_link_found"/>"
|
||||
}
|
||||
@@ -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>
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
{
|
||||
<#include "abstracto_color">,
|
||||
"description": "<@safe_include "too_recent_referral_post"/>",
|
||||
"timeStamp": "${nextReferralDate}"
|
||||
}
|
||||
Reference in New Issue
Block a user