[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:
Sheldan
2025-02-04 23:01:50 +01:00
parent ce234f986e
commit 5ba2f2a2f8
3 changed files with 6 additions and 2 deletions

View File

@@ -78,7 +78,10 @@ public class SlashCommandServiceBean implements SlashCommandService {
String internalCommandName = commandConfiguration.getName();
if(!isTemplated) {
description = commandConfiguration.getDescription();
} else {
} else if(commandConfiguration.isUserInstallable() && userCommandsOnly) {
description = templateService.renderSimpleTemplate(internalCommandName + "_description_user", serverId);
}
else {
description = templateService.renderSimpleTemplate(internalCommandName + "_description", serverId);
}
String rootName = userCommandsOnly ? StringUtils.defaultString(slashConfig.getUserSlashCompatibleRootName(), slashConfig.getSlashCompatibleRootName()) : slashConfig.getSlashCompatibleRootName();