mirror of
https://github.com/Sheldan/abstracto-templates.git
synced 2026-04-14 03:46:00 +00:00
added templates for exceptions and refactored some existing ones
This commit is contained in:
@@ -0,0 +1,2 @@
|
||||
<#assign model=template.templateModel/>
|
||||
<#include "${template.templateName}"/>
|
||||
@@ -33,7 +33,7 @@
|
||||
</#if>
|
||||
**<@safe_include "help_command_embed_command_parameters"/>**:
|
||||
<#if command.parameters??>
|
||||
<#list command.parameters as parameter>
|
||||
<#list command.parameters as parameter><#assign parameter=parameter>
|
||||
<@safe_include "help_command_embed_command_description"/> `${parameter.name?js_string}`: <#if parameter.templated?? && parameter.templated><@safe_include "${command.name}_parameter_${parameter.name}"/><#else>${(parameter.description?js_string)!""}</#if>
|
||||
<@safe_include "help_command_embed_command_optional"/><#sep>
|
||||
|
||||
|
||||
@@ -1 +0,0 @@
|
||||
<#include "posttarget_invalid_post_target_response"> <#include "posttarget_invalid_target">
|
||||
@@ -1 +1,3 @@
|
||||
<#assign categoryId>${model.categoryId?c}</#assign>
|
||||
<#assign guildId>${model.guildId?c}</#assign>
|
||||
<#include "category_not_found_exception_text">
|
||||
@@ -0,0 +1 @@
|
||||
<#assign channelGroupName=model.channelGroup.groupName><#include "channel_already_in_channel_group_exception_text">
|
||||
@@ -1 +1 @@
|
||||
<#include "channel_group_exists_exception_text">
|
||||
<#assign channelGroupName=model.name><#include "channel_group_exists_exception_text">
|
||||
@@ -1 +1 @@
|
||||
<#include "channel_group_not_found_exception_text">
|
||||
<#assign name=model.name><#assign available>${model.available?join(", ")}</#assign><#include "channel_group_not_found_exception_text">
|
||||
@@ -1 +1,2 @@
|
||||
The channel ${channelId} was not found.
|
||||
<#assign channelId=model.channelId>
|
||||
<#include "channel_not_found_exception_text">
|
||||
@@ -0,0 +1 @@
|
||||
<#assign channelGroupName=model.channelGroup.groupName><#include "channel_not_in_channel_group_exception_text">
|
||||
@@ -0,0 +1 @@
|
||||
<#include "command_disabled_exception_text">
|
||||
@@ -1 +0,0 @@
|
||||
<#include "command_not_found_text">
|
||||
@@ -1 +1 @@
|
||||
"description": "<#include "command_parameter_value_wrong_type_exception_text">"
|
||||
<#include "command_parameter_value_wrong_type_exception_text">
|
||||
@@ -1 +1,2 @@
|
||||
<#assign key=model.key>
|
||||
<#include "config_key_not_found_exception_text">
|
||||
@@ -1 +0,0 @@
|
||||
<#include "core_user_in_server_not_found_exception_text">
|
||||
@@ -1 +0,0 @@
|
||||
<#include "could_not_find_role_text">
|
||||
@@ -1 +1,3 @@
|
||||
<#assign invalidFormat=model.invalidFormat>
|
||||
<#assign validFormats>${model.validFormats?join(", ")}</#assign>
|
||||
<#include "duration_invalid_time_format_exception_text">
|
||||
@@ -0,0 +1 @@
|
||||
"description": "<@safe_include "category_not_found_exception"/>"
|
||||
@@ -0,0 +1 @@
|
||||
"description": "<@safe_include "channel_already_in_channel_group_exception"/>"
|
||||
@@ -0,0 +1 @@
|
||||
"description": "<@safe_include "channel_group_exists_exception"/>"
|
||||
@@ -0,0 +1 @@
|
||||
"description": "<@safe_include "channel_group_not_found_exception"/>"
|
||||
@@ -0,0 +1 @@
|
||||
"description": "<@safe_include "channel_not_found_exception"/>"
|
||||
@@ -0,0 +1 @@
|
||||
"description": "<@safe_include "channel_not_in_channel_group_exception"/>"
|
||||
@@ -0,0 +1 @@
|
||||
"description": "<@safe_include "command_disabled_exception"/>"
|
||||
@@ -0,0 +1 @@
|
||||
"description": "<@safe_include "command_not_found_exception"/>"
|
||||
@@ -0,0 +1 @@
|
||||
"description": "<#include "command_parameter_value_wrong_type_exception"/>"
|
||||
@@ -0,0 +1 @@
|
||||
"description": "<@safe_include "config_key_not_found_exception"/>"
|
||||
@@ -0,0 +1 @@
|
||||
"description": "<@safe_include "duration_invalid_time_format_exception"/>"
|
||||
@@ -0,0 +1 @@
|
||||
"description": "<@safe_include "emote_defined_but_not_usable_exception"/>"
|
||||
@@ -0,0 +1 @@
|
||||
"description": "<@safe_include "emote_not_available_in_server_exception"/>"
|
||||
@@ -0,0 +1 @@
|
||||
"description": "<@safe_include "emote_not_defined_exception"/>"
|
||||
@@ -0,0 +1 @@
|
||||
"description": "<@safe_include "emote_not_found_exception"/>"
|
||||
@@ -0,0 +1 @@
|
||||
"description": "<@safe_include "emote_not_found_exception"/>"
|
||||
@@ -0,0 +1 @@
|
||||
"description": "<@safe_include "emote_not_usable_exception"/>"
|
||||
@@ -0,0 +1 @@
|
||||
"description": "<@safe_include "feature_disabled_exception"/>"
|
||||
@@ -0,0 +1 @@
|
||||
"description": "<@safe_include "feature_mode_not_correct_exception"/>"
|
||||
@@ -0,0 +1 @@
|
||||
"description": "<@safe_include "feature_mode_not_found_exception"/>"
|
||||
@@ -0,0 +1 @@
|
||||
"description": "<@safe_include "feature_not_found_exception"/>"
|
||||
@@ -0,0 +1 @@
|
||||
"description": "<@safe_include "guild_not_found_exception"/>"
|
||||
@@ -0,0 +1 @@
|
||||
"description": "<@safe_include "immune_role_exception"/>"
|
||||
@@ -0,0 +1 @@
|
||||
"description": "<@safe_include "incorrect_parameters_exception"/>"
|
||||
@@ -0,0 +1 @@
|
||||
"description": "<@safe_include "insufficient_parameters_exception"/>"
|
||||
@@ -0,0 +1 @@
|
||||
"description": "<@safe_include "insufficient_role_exception"/>"
|
||||
@@ -0,0 +1 @@
|
||||
"description": "<@safe_include "member_not_found_exception"/>"
|
||||
@@ -0,0 +1 @@
|
||||
"description": "<@safe_include "no_feature_command_found_exception/>"
|
||||
@@ -0,0 +1 @@
|
||||
"description": "<@safe_include "parameter_too_long_exception"/>"
|
||||
@@ -0,0 +1 @@
|
||||
"description": "<@safe_include "post_target_not_found_exception"/>"
|
||||
@@ -0,0 +1 @@
|
||||
"description": "<@safe_include "post_target_not_valid_exception"/>"
|
||||
@@ -0,0 +1 @@
|
||||
"description": "<@safe_include "role_disabled_exception"/>"
|
||||
@@ -0,0 +1 @@
|
||||
"description": "<@safe_include "role_not_found_in_db_exception"/>"
|
||||
@@ -0,0 +1 @@
|
||||
"description": "<@safe_include "role_not_found_in_guild_exception"/>"
|
||||
@@ -0,0 +1 @@
|
||||
"description": "<@safe_include "setup_no_channel_provided_exception"/>"
|
||||
@@ -0,0 +1 @@
|
||||
description": "<@safe_include "setup_step_exception">
|
||||
@@ -0,0 +1 @@
|
||||
"description": "<@safe_include "user_in_server_not_found_exception"/>"
|
||||
@@ -0,0 +1 @@
|
||||
<#assign emoteName=model.emote.name><#include "emote_defined_but_not_usable_exception_text">
|
||||
@@ -1 +1,2 @@
|
||||
"description": "<#include "emote_not_available_in_server_exception_message">"
|
||||
<#assign emoteId>${model.emoteId?c}</#assign>
|
||||
<#include "emote_not_available_in_server_exception_text">
|
||||
@@ -1 +1,2 @@
|
||||
<#assign emoteKey=model.emoteKey>
|
||||
<#include "emote_not_defined_exception_text">
|
||||
@@ -1 +1,3 @@
|
||||
<#assign emoteKey=model.emoteKey>
|
||||
<#assign available>${model.available?join(", ")}</#assign>
|
||||
<#include "emote_not_found_exception_text">
|
||||
@@ -1 +1,2 @@
|
||||
<#assign emoteId=model.emoteId>
|
||||
<#include "emote_not_found_in_db_exception_text">
|
||||
@@ -0,0 +1,3 @@
|
||||
<#assign emoteName=model.emote.name>
|
||||
<#assign emoteId=model.emote.id>
|
||||
<#include "emote_not_usable_exception_text">
|
||||
@@ -0,0 +1,3 @@
|
||||
<#assign featureName><#include "${model.featureConfig.feature.key}_feature"></#assign>
|
||||
<#assign featureKey>${model.featureConfig.feature.key}</#assign>
|
||||
<#include "feature_disabled_exception_text">
|
||||
@@ -1 +0,0 @@
|
||||
<#assign featureName><#include "${featureConfig.feature.key}_feature"></#assign><#assign featureKey>${featureConfig.feature.key}</#assign><#include "feature_disabled_text">
|
||||
@@ -0,0 +1,4 @@
|
||||
<#assign featureName><#include "${model.featureConfig.feature.key}_feature"></#assign>
|
||||
<#assign featureKey>${model.featureConfig.feature.key}</#assign>
|
||||
<#assign requiredModes><#list command.featureModeLimitations as mode>`${mode.key}`<sep>, </#list></#assign>
|
||||
<#include "feature_mode_not_correct_exception_text">
|
||||
@@ -1 +0,0 @@
|
||||
<#assign featureName><#include "${featureConfig.feature.key}_feature"></#assign><#assign featureKey>${featureConfig.feature.key}</#assign><#assign requiredModes><#list command.featureModeLimitations as mode>`${mode.key}`<sep>, </#list></#assign><#include "feature_mode_not_correct_text">
|
||||
@@ -1 +0,0 @@
|
||||
<#assign availableModes>${availableModes?join(", ")}</#assign><#include "feature_mode_not_found_text">
|
||||
@@ -0,0 +1,3 @@
|
||||
<#assign availableModes>${model.availableModes?join(", ")}</#assign>
|
||||
<#assign featureMode=model.featureMode>
|
||||
<#include "feature_mode_not_found_exception_text">
|
||||
@@ -1 +0,0 @@
|
||||
<#assign availableFeatures>${availableFeatures?join(", ")}</#assign><#include "feature_not_found_text">
|
||||
@@ -0,0 +1,3 @@
|
||||
<#assign availableFeatures>${model.availableFeatures?join(", ")}</#assign>
|
||||
<#assign featureName=model.featureName/>
|
||||
<#include "feature_not_found_exception_text">
|
||||
@@ -1,12 +1,20 @@
|
||||
{
|
||||
<#include "member_author">
|
||||
<#if user?has_content>
|
||||
<@member_author member=user.member/>,
|
||||
<#else>
|
||||
"author":
|
||||
{
|
||||
"name": "${fullUser.user.name?js_string}#${fullUser.user.discriminator}",
|
||||
"avatar": "${fullUser.user.effectiveAvatarUrl}"
|
||||
},
|
||||
</#if>
|
||||
<#include "exception_color">,
|
||||
"preventEmptyEmbed": "true",
|
||||
<#if template?has_content>
|
||||
<#if template.templateModel?has_content>
|
||||
<#assign model=template.templateModel/>
|
||||
<#include "${template.templateName}"/>
|
||||
<#include "${template.templateName}_embedded"/>
|
||||
</#if>
|
||||
<#elseif throwable.localizedMessage?has_content>
|
||||
"description": "${throwable.localizedMessage?js_string}"
|
||||
|
||||
@@ -1 +1,2 @@
|
||||
<#assign guildId=model.guildId>
|
||||
<#include "guild_not_found_exception_text">
|
||||
@@ -1 +0,0 @@
|
||||
<#assign roleName>${role.name}</#assign> <#include "immune_role_text">
|
||||
@@ -0,0 +1,2 @@
|
||||
<#assign roleName>${model.role.name}</#assign>
|
||||
<#include "immune_role_exception_text">
|
||||
@@ -1 +0,0 @@
|
||||
<#assign expectedType>${class.simpleName}</#assign><#include "incorrect_parameters_text">
|
||||
@@ -0,0 +1,3 @@
|
||||
<#assign expectedType>${model.clazz.simpleName}</#assign>
|
||||
<#assign parameterName=model.parameterName>
|
||||
<#include "incorrect_parameters_exception_text">
|
||||
@@ -1 +0,0 @@
|
||||
<#include "insufficient_parameters_text">
|
||||
@@ -0,0 +1 @@
|
||||
<#include "insufficient_parameters_exception_text">
|
||||
@@ -1 +0,0 @@
|
||||
<#assign roles><#list allowedRoles as role>${role.name}<#sep>,<#else><#include "insufficient_role_none_configured"></#list></#assign><#include "insufficient_role_text">
|
||||
@@ -0,0 +1,2 @@
|
||||
<#assign roles><#list model.allowedRoles as role>${role.name}<#sep>,<#else><#include "insufficient_role_none_configured"></#list></#assign>
|
||||
<#include "insufficient_role_exception_text">
|
||||
@@ -1 +0,0 @@
|
||||
<#include "no_feature_command_found_text">
|
||||
@@ -0,0 +1 @@
|
||||
<#include "no_feature_command_found_exception_text">
|
||||
@@ -1 +0,0 @@
|
||||
<#include "parameter_too_long_text">
|
||||
@@ -0,0 +1 @@
|
||||
<#assign parameterName=model.parameterName><#assign actualLength=model.actualLength><#assign maximumLength=model.maximumLength><#include "parameter_too_long_exception_text">
|
||||
@@ -1 +0,0 @@
|
||||
<#include "post_target_not_found_text">
|
||||
@@ -0,0 +1,2 @@
|
||||
<#assign postTargetKey=model.postTargetKey>
|
||||
<#include "post_target_not_found_exception_text">
|
||||
@@ -1 +0,0 @@
|
||||
<#include "post_target_not_valid_text">
|
||||
@@ -0,0 +1,3 @@
|
||||
<#assign availableTargets>${model.availableTargets?join(", ")}</#assign>
|
||||
<#assign postTargetKey=model.postTargetKey>
|
||||
<#include "post_target_not_valid_exception_text">
|
||||
@@ -1 +1 @@
|
||||
"description": "<@safe_include "role_disabled_exception_message"/>"
|
||||
<#include "role_disabled_exception_text">
|
||||
@@ -1 +1,2 @@
|
||||
<#assign roleId=model.roleId>
|
||||
<#include "role_not_found_in_db_exception_text">
|
||||
@@ -1 +1,3 @@
|
||||
<#assign roleId=model.roleId>
|
||||
<#assign serverId=model.serverId>
|
||||
<#include "role_not_found_in_guild_exception_text">
|
||||
@@ -1 +1,3 @@
|
||||
<#assign text><#if templateKey?has_content><#assign exceptionModel=templateModel><#include "${templateKey}"><#else>${message}</#if></#assign><#include "setup_step_exception_message">
|
||||
<#assign text><#if model.templateKey?has_content>
|
||||
<#assign exceptionModel=model.templateModel>
|
||||
<#include "${model.templateKey}"><#else>${model.message}</#if></#assign><#include "setup_step_exception_text">
|
||||
@@ -0,0 +1,2 @@
|
||||
<#assign userInServerId=model.userInServerId>
|
||||
<#include "user_in_server_not_found_exception_text">
|
||||
Reference in New Issue
Block a user