[AB-240] moving invite filtering to separate module

adding templates for effects rework
changed display of optional parameters in help
This commit is contained in:
Sheldan
2021-05-10 20:57:09 +02:00
parent 3d7db690a5
commit 6b6f5bcb10
66 changed files with 150 additions and 21 deletions
@@ -46,21 +46,19 @@
</#if> </#if>
<#if restricted?? && restricted> <#if restricted?? && restricted>
<@safe_include "help_command_embed_command_executable_by"/>:<#if allowedRoles??> <#list allowedRoles as allowedRole> ${allowedRole.asMention?json_string}<#sep><@safe_include "help_command_embed_or"/><#else><@safe_include "help_command_embed_command_executable_by_nobody"/></#list> </#if> <@safe_include "help_command_embed_command_executable_by"/>:<#if allowedRoles??> <#list allowedRoles as allowedRole> ${allowedRole.asMention?json_string}<#sep><@safe_include "help_command_embed_or"/><#else><@safe_include "help_command_embed_command_executable_by_nobody"/></#list> </#if>
<#if immuneRoles?? ><@safe_include "help_command_embed_command_immune"/>: <#list immuneRoles as immuneRole> ${immuneRole.asMention?json_string}<#sep><@safe_include "help_command_embed_or"/><#else><@safe_include "help_command_embed_command_immune_none"/></#list> </#if>
<#else> <#else>
<@safe_include "help_command_embed_command_not_restricted"/> <@safe_include "help_command_embed_command_not_restricted"/>
</#if> </#if>
<#if effects??><@safe_include "help_command_embed_command_effects"/>: <#list effects as effect> <@safe_include "effect_type_${effect}"/><#sep>,<#else><@safe_include "help_command_embed_command_effects_none"/></#list> </#if>
</#if> </#if>
**<@safe_include "help_command_embed_command_parameters"/>**: **<@safe_include "help_command_embed_command_parameters"/>**:
<#if command.parameters??> <#if command.parameters??>
<#list command.parameters as parameter><#assign parameter=parameter> <#list command.parameters as parameter><#assign parameter=parameter>
<@safe_include "help_command_embed_command_description"/> `${parameter.name?json_string}`: <#if parameter.templated?? && parameter.templated><@safe_include "${command.name}_parameter_${parameter.name}"/><#else>${(parameter.description?json_string)!""}</#if> <@safe_include "help_command_embed_command_description"/> `${parameter.name?json_string}`: <#if parameter.templated?? && parameter.templated><@safe_include "${command.name}_parameter_${parameter.name}"/><#else>${(parameter.description?json_string)!""}</#if> <@safe_include "help_command_embed_command_optional"/>
<#list parameter.validators as validator><#assign validator=validator><#assign model=validator.templateModel/><@safe_include "${validator.templateName}"/> <#list parameter.validators as validator><#assign validator=validator><#assign model=validator.templateModel/><@safe_include "${validator.templateName}"/></#list>
</#list> <#sep>
<@safe_include "help_command_embed_command_optional"/><#sep>
<#else> <#else>
<@safe_include "help_command_embed_command_no_parameters"/> <@safe_include "help_command_embed_command_no_parameters"/>
</#list> </#list>
@@ -0,0 +1,8 @@
{
<#include "abstracto_color">,
"description": "
<#list effects as effect>
`${effect}` <@safe_include "effect_type_${effect}_description"/>
</#list>
"
}
@@ -1,2 +1,3 @@
<#assign roleName>${model.role.name}</#assign> <#assign roleName>${model.role.name}</#assign>
<#assign effect><#include "effect_type_${model.effectTypeKey}"></#assign>
<#include "immune_role_exception_text"> <#include "immune_role_exception_text">
@@ -0,0 +1 @@
<#include "effect_type_not_found_exception_text">
+37
View File
@@ -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>
<artifactId>abstracto-modules</artifactId>
<groupId>dev.sheldan.abstracto-templates.templates</groupId>
<version>1.2.7-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>invite-filter</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>invite-filter-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>
@@ -4,7 +4,7 @@
}, },
<#include "success_color">, <#include "success_color">,
"description": "<#list inviteLinks as link><#assign link=link/> "description": "<#list inviteLinks as link><#assign link=link/>
<#assign linkText>${link.code}</#assign> <#assign linkText>${link.serverName}</#assign>
<#assign linkUses>${link.uses}</#assign> <#assign linkUses>${link.uses}</#assign>
<@safe_include "tracked_invite_links_link_display"/><#else><@safe_include "tracked_invite_links_no_links"/> <@safe_include "tracked_invite_links_link_display"/><#else><@safe_include "tracked_invite_links_no_links"/>
</#list>" </#list>"
+1
View File
@@ -29,6 +29,7 @@
<module>suggestion</module> <module>suggestion</module>
<module>webservices</module> <module>webservices</module>
<module>logging</module> <module>logging</module>
<module>invite-filter</module>
</modules> </modules>
</project> </project>
@@ -1 +1 @@
Optional: ${parameter.optional?string('yes', 'no')} ${parameter.optional?string('(Optional)', '')}
@@ -1 +1 @@
Makes a role affected by certain commands/features Makes a role affected by effects
@@ -1 +1 @@
`makeAffected ban @Staff` in order so the role `Staff` can be banned via the command (where @Staff is a role mention) `makeAffected ban @Staff` in order so the role `Staff` can be banned (where @Staff is a role mention)
@@ -1,5 +1,5 @@
Makes the given role affected by certain commands like `ban`, `warn` or `mute`. Makes the given role affected by certain commands like `ban`, `warn` or `mute`.
When a feature name is used, all commands of this feature will be changed. This is done by 'effects', an effect is something which can be applied to members, and all the available effects can be
Not all commands actually support this functionality. shown via the command `showEffects`.
By default all roles are affected by the commands. By default all roles are affected by the commands.
The provided role can either be a role ID or a the mention of the role. The provided role can either be a role ID or a the mention of the role.
@@ -1 +0,0 @@
The command/feature name to make the role affected by.
@@ -0,0 +1 @@
The effect to make the role affected by
@@ -1 +1 @@
Makes a role immune against certain commands/complete features Makes a role immune against certain effects
@@ -1 +1 @@
`makeImmune ban @Staff` in order so the role `Staff` cannot be banned via the command (where @Staff is a role mention) `makeImmune ban @Staff` in order so the role `Staff` cannot be banned (where @Staff is a role mention)
@@ -1,5 +1,5 @@
Makes the given role immune to certain commands like `ban`, `warn` or `mute`. Makes the given role immune to certain commands like `ban`, `warn` or `mute`.
When a feature name is used, all commands of this feature will be changed. This is done by 'effects', an effect is something which can be applied to members, and all the available effects can be
Not all commands actually support this functionality. shown via the command `showEffects`.
By default all roles are affected by the commands. By default all roles are affected by the commands.
The provided role can either be a role ID or a the mention of the role. The provided role can either be a role ID or a the mention of the role.
@@ -1 +0,0 @@
The command/feature name to make the role immune for.
@@ -0,0 +1 @@
The effect to make the role immune against.
@@ -0,0 +1 @@
Shows the currently possible effects
@@ -0,0 +1 @@
Shows the keys of the currently available effects while also showing a short description thereof
@@ -1 +1 @@
The targeted user is immune against this command, because of the role: ${roleName}. The targeted user is immune against `${effect}`, because of the role: ${roleName}.
+37
View File
@@ -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>
<artifactId>translations</artifactId>
<groupId>dev.sheldan.abstracto-templates.translations</groupId>
<version>1.2.7-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>invite-filter</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>invite-filter-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 @@
Invites getting checked and maybe deleted
@@ -0,0 +1 @@
Utilities to moderate the server
@@ -0,0 +1 @@
Getting banned from the server
@@ -0,0 +1 @@
Getting kicked from the server
+1
View File
@@ -29,6 +29,7 @@
<module>repost-detection</module> <module>repost-detection</module>
<module>webservices</module> <module>webservices</module>
<module>logging</module> <module>logging</module>
<module>invite-filter</module>
</modules> </modules>
</project> </project>