[AB-98] adding templates for twitch feature

This commit is contained in:
Sheldan
2023-07-09 23:09:34 +02:00
parent 4810352160
commit 5a63f0a8de
51 changed files with 250 additions and 0 deletions

View File

@@ -34,6 +34,7 @@
<module>voice-channel-context</module>
<module>anti-raid</module>
<module>custom-command</module>
<module>twitch</module>
</modules>
</project>

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.4.18-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<packaging>pom</packaging>
<artifactId>twitch</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>twitch-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,6 @@
{
"additionalMessage": "<@safe_include "addTwitchStreamer_response_description"/>",
"messageConfig": {
"ephemeral": true
}
}

View File

@@ -0,0 +1,6 @@
{
"additionalMessage": "<@safe_include "changeTwitchStreamer_response_description"/>",
"messageConfig": {
"ephemeral": true
}
}

View File

@@ -0,0 +1,15 @@
{
"embeds": [
{
<#include "twitch_color">,
"description": "<#list streamers as streamer>
<#assign streamer=streamer>
<#assign name=streamer.name>
<#assign targetChannel=streamer.targetChannel.channelMention>
<#assign showNotificationsDisplay>${streamer.showNotifications?string('✅', '❌')}</#assign>
<#assign streamerURL=streamer.streamerURL>
<#include "listTwitchStreamer_response_streamer_display"><#sep>
</#list>"
}
]
}

View File

@@ -0,0 +1,6 @@
{
"additionalMessage": "<@safe_include "removeTwitchStreamer_response_description"/>",
"messageConfig": {
"ephemeral": true
}
}

View File

@@ -0,0 +1 @@
<#include "streamer_already_exists_in_server_exception_message">

View File

@@ -0,0 +1 @@
<#include "streamer_not_exists_exception_message">

View File

@@ -0,0 +1 @@
<#include "streamer_not_exists_in_server_exception_message">

View File

@@ -0,0 +1,35 @@
<#include "format_instant">
{
<#assign channelName=channelName>
<#assign streamerAvatarURL=streamerAvatarURL>
<#assign streamURL=streamURL>
<#assign title=currentSection.title>
<#assign thumbnail=currentSection.thumbnailURL>
<#assign viewerCount=currentSection.viewerCount>
<#assign roleMention="<@&766751512009244712>"/>
"additionalMessage": "<@safe_include "twitch_streamer_go_live_notification_text"/> ${roleMention}",
"embeds": [
{
<#include "twitch_color">,
"author": { "name": "${channelName}", "avatar": "${streamerAvatarURL}", "url": "${streamURL}"},
"title": {
"title": "${title?json_string}"
},
"description": "<@safe_include "twitch_streamer_go_live_notification_current_section"/> <#if pastSections?? && pastSections?size gt 0><@safe_include "twitch_streamer_go_live_notification_past_sections"/></#if>",
"imageUrl": "${thumbnail}"
}
],
"messageConfig": {
"allowsRoleMention": true
},
"buttons": [
{
"label": "<@safe_include "twitch_streamer_go_live_notification_watch_button"/>",
"url": "${streamURL?json_string}",
"buttonStyle": "link",
"metaConfig": {
"persistCallback": false
}
}
]
}

View File

@@ -0,0 +1,18 @@
<#include "format_instant">
{
"embeds": [
{
<#include "twitch_color">,
<#assign channelName=channelName>
<#assign avatarURL=avatarURL>
"title": {
"title": "<@safe_include "twitch_streamer_went_offline_notification_title"/>"
},
"author": { "name": "${channelName}", "avatar": "${avatarURL}"},
"description": "<@safe_include "twitch_streamer_went_offline_notification_past_sections"/>"
<#if offlineImageURL??>,
<#assign offlineImageURL=offlineImageURL>
"imageUrl": "${offlineImageURL}"</#if>
}
]
}