[AB-128] adding templates to cooldown restrictions

changing duration formatting to also show seconds in case there are 0 (if its the only time period shown)
This commit is contained in:
Sheldan
2021-04-19 00:40:36 +02:00
parent 147a7142fd
commit 2c4c1c1079
37 changed files with 65 additions and 2 deletions

View File

@@ -1 +1 @@
<#if days gt 1><#include "duration_days"><#elseif days = 1><#include "duration_day"></#if> <#if hours gt 1><#include "duration_hours"><#elseif hours = 1><#include "duration_hour"></#if> <#if minutes gt 1><#include "duration_minutes"><#elseif minutes = 1><#include "duration_minute"></#if> <#if seconds gt 1><#include "duration_seconds"><#elseif seconds = 1><#include "duration_second"></#if>
<#if days gt 1><#include "duration_days"><#elseif days = 1><#include "duration_day"></#if> <#if hours gt 1><#include "duration_hours"><#elseif hours = 1><#include "duration_hour"></#if> <#if minutes gt 1><#include "duration_minutes"><#elseif minutes = 1><#include "duration_minute"></#if> <#if seconds gt 1 || (seconds = 0 && days = 0 && hours = 0 && minutes = 0)><#include "duration_seconds"><#elseif seconds = 1><#include "duration_second"></#if>

View File

@@ -26,6 +26,24 @@
<#if serverSpecificAliases?size gt 0>
<@safe_include "help_command_embed_command_server_aliases"/>: `${serverSpecificAliases?join("`, `")?json_string}`
</#if>
<#if cooldowns??>
<@safe_include "help_command_embed_command_cooldowns"/>:
<#if cooldowns.serverCoolDown?has_content>
<#assign serverCooldown>${fmtDuration(cooldowns.serverCoolDown)}</#assign>
<@safe_include "help_command_embed_command_cooldown_server"/>
</#if>
<#if cooldowns.channelCoolDown?has_content>
<#assign channelCooldown>${fmtDuration(cooldowns.channelCoolDown)}</#assign>
<@safe_include "help_command_embed_command_cooldown_channel"/>
</#if>
<#if cooldowns.memberCoolDown?has_content>
<#assign memberCooldown>${fmtDuration(cooldowns.memberCoolDown)}</#assign>
<@safe_include "help_command_embed_command_cooldown_member"/>
</#if>
</#if>
<#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>
<#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>

View File

@@ -9,8 +9,9 @@
"fields": [
<#list groups as group>
{
"name": "${group.name?json_string} (<@safe_include "channel_group_type_${group.typeKey}_name"/>)",
"name": "${group.name?json_string} (<@safe_include "channel_group_type_${group.typeKey}_name"/> ${group.enabled?string('✅', '❌')})",
"value": "
<#if group.channelGroupInformation??><#assign model=group.channelGroupInformation.templateModel/> <@safe_include "${group.channelGroupInformation.templateName}"/></#if>
<#list group.channels as channel><#if channel.discordChannel??>${channel.discordChannel.asMention?json_string}<#else>${channel.channel.id?c}</#if><#sep>,<#else> <@safe_include "listChannelGroups_no_channels"/></#list>
"
}<#sep>,

View File

@@ -0,0 +1,3 @@
<#assign executeIn>${fmtDuration(model.reason.executeIn)}</#assign>
<#assign reason>${model.reason.reason}</#assign>
<#include "command_cool_down_detail_text">

View File

@@ -0,0 +1,2 @@
<#assign channelGroupName>${model.channelGroupName}</#assign>
<#include "channel_in_multiple_channel_groups_exception_text">

View File

@@ -0,0 +1,2 @@
<#assign channelGroupName>${model.channelGroupName}</#assign>
<#include "command_in_multiple_channel_groups_exception_text">

View File

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

View File

@@ -0,0 +1,3 @@
<#assign channelCoolDown>${fmtDuration(model.channelCoolDown)}</#assign>
<#assign memberCoolDown>${fmtDuration(model.memberCoolDown)}</#assign>
<#include "channel_group_provider_cool_down_display_text">

View File

@@ -0,0 +1,2 @@
Adds a command to a channel group. This can then be used for various purposes, for example to disable the command or set a cooldown for the command for the channels.
The command `disableCommand` does this under the hood as well.

View File

@@ -0,0 +1 @@
The name of the command to add to the channel group

View File

@@ -0,0 +1 @@
Clears the current cooldown restrictions on this server

View File

@@ -0,0 +1 @@
This command can be used to reset the currently active cooldowns on this server

View File

@@ -0,0 +1 @@
Changes the channel group and member cooldown in a channel group

View File

@@ -0,0 +1,2 @@
This command can be used to change the member and channel group cooldowns for a channel group.
This can be done by providing the channel group name and the two respective cooldowns with a duration format.

View File

@@ -0,0 +1 @@
Sets the cooldown for a command for the whole server

View File

@@ -0,0 +1 @@
This command can be used to set the cooldown of a command for the whole server

View File

@@ -0,0 +1 @@
The command to change the server cooldown for

View File

@@ -0,0 +1,2 @@
This command can be used to remove a command from a channel group, so it doesnt get affected by the changes of this channel group.
This can be for example command disabled and command cooldown configurations

View File

@@ -0,0 +1 @@
Channel is already part of channel group `${channelGroupName}`. This type of group allows the channels to be in only one group at a time.

View File

@@ -0,0 +1 @@
Please wait ${executeIn}.

View File

@@ -0,0 +1 @@
Command is already part of channel group `${channelGroupName}`. This type of group allows the commands to be in only one group at a time.

View File

@@ -0,0 +1 @@
Command is not in the given channel group.

View File

@@ -0,0 +1,2 @@
Channel cool down: ${channelCoolDown}
Member cool down: ${memberCoolDown}