[AB-232] splitting logging functionality to separate module

changing user join/leave template to be an embed
This commit is contained in:
Sheldan
2021-04-24 16:03:07 +02:00
parent 9ab95c32bc
commit 73ca42bd66
30 changed files with 117 additions and 2 deletions

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>
<groupId>dev.sheldan.abstracto-templates.templates</groupId>
<artifactId>abstracto-modules</artifactId>
<version>1.2.5-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>logging</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>logging-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,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,12 @@
{
"imageUrl": "${imageUrl}",
"fields": [
{
"name": "<@safe_include "messageDeleted_attachment_link_field_title"/>",
"value": "[<@safe_include "messageDeleted_attachment_link_display_text"/>](${imageUrl})"
}
],
"footer": {
"text": "<@safe_include "messageDeleted_attachment_footer"/> #${counter}"
}
}

View File

@@ -0,0 +1,16 @@
{
<#include "member_author">
<@member_author member=member/>,
"description": "<@safe_include "messageDeleted_description_text"/>",
<#include "abstracto_color"/>,
"fields": [
{
"name": "<@safe_include "messageDeleted_original_message_field_title"/>",
"value": "${cachedMessage.content?json_string}"
},
{
"name": "<@safe_include "messageDeleted_message_link_field_title"/>",
"value": "[${channel.name?json_string}](${cachedMessage.messageUrl})"
}
]
}

View File

@@ -0,0 +1,20 @@
{
<#include "member_author">
<@member_author member=member/>,
<#include "abstracto_color"/>,
"description": "<@safe_include "messageEdited_description_text"/>",
"fields": [
{
"name": "<@safe_include "messageEdited_original_message_field_title"/>",
"value": "${messageBefore.content?json_string}"
},
{
"name": "<@safe_include "messageEdited_new_message_field_title"/>",
"value": "${messageAfter.contentRaw?json_string}"
},
{
"name": "<@safe_include "messageEdited_link_field_title"/>",
"value": "[${messageChannel.name?json_string}](${messageBefore.messageUrl})"
}
]
}

View File

@@ -0,0 +1,5 @@
{
<#assign user>${member.user.name}#${member.user.discriminator} (${member.asMention}: ${member.id})</#assign>
"description": "<@safe_include "user_joined_text"/>",
<#include "abstracto_color"/>
}

View File

@@ -0,0 +1,5 @@
{
<#assign user>${user.name}#${user.discriminator} (${user.id})</#assign>
"description": "<@safe_include "user_left_text"/>",
<#include "abstracto_color"/>
}