mirror of
https://github.com/Sheldan/abstracto.git
synced 2026-04-17 04:29:13 +00:00
[AB-xxx] adding support to have a different template for user command descriptions
enabling user command for currency conversion command
This commit is contained in:
@@ -127,6 +127,7 @@ public class ConvertCurrency extends AbstractConditionableCommand {
|
|||||||
.enabled(true)
|
.enabled(true)
|
||||||
.rootCommandName(WebServicesSlashCommandNames.CONVERSION)
|
.rootCommandName(WebServicesSlashCommandNames.CONVERSION)
|
||||||
.commandName("currency")
|
.commandName("currency")
|
||||||
|
.userInstallable(true)
|
||||||
.build();
|
.build();
|
||||||
|
|
||||||
return CommandConfiguration.builder()
|
return CommandConfiguration.builder()
|
||||||
|
|||||||
@@ -78,7 +78,10 @@ public class SlashCommandServiceBean implements SlashCommandService {
|
|||||||
String internalCommandName = commandConfiguration.getName();
|
String internalCommandName = commandConfiguration.getName();
|
||||||
if(!isTemplated) {
|
if(!isTemplated) {
|
||||||
description = commandConfiguration.getDescription();
|
description = commandConfiguration.getDescription();
|
||||||
} else {
|
} else if(commandConfiguration.isUserInstallable() && userCommandsOnly) {
|
||||||
|
description = templateService.renderSimpleTemplate(internalCommandName + "_description_user", serverId);
|
||||||
|
}
|
||||||
|
else {
|
||||||
description = templateService.renderSimpleTemplate(internalCommandName + "_description", serverId);
|
description = templateService.renderSimpleTemplate(internalCommandName + "_description", serverId);
|
||||||
}
|
}
|
||||||
String rootName = userCommandsOnly ? StringUtils.defaultString(slashConfig.getUserSlashCompatibleRootName(), slashConfig.getSlashCompatibleRootName()) : slashConfig.getSlashCompatibleRootName();
|
String rootName = userCommandsOnly ? StringUtils.defaultString(slashConfig.getUserSlashCompatibleRootName(), slashConfig.getSlashCompatibleRootName()) : slashConfig.getSlashCompatibleRootName();
|
||||||
|
|||||||
@@ -33,7 +33,7 @@
|
|||||||
<connection>scm:git:${project.scm.url}</connection>
|
<connection>scm:git:${project.scm.url}</connection>
|
||||||
<developerConnection>scm:git:${project.scm.url}</developerConnection>
|
<developerConnection>scm:git:${project.scm.url}</developerConnection>
|
||||||
<url>https://github.com/Sheldan/abstracto.git</url>
|
<url>https://github.com/Sheldan/abstracto.git</url>
|
||||||
<tag>v1.5.62</tag>
|
<tag>v1.6.0</tag>
|
||||||
</scm>
|
</scm>
|
||||||
|
|
||||||
<repositories>
|
<repositories>
|
||||||
|
|||||||
Reference in New Issue
Block a user