[OPB-39] fixing faq export not properly exporting image only embeds

fixing requiring alias values if the key is present
This commit is contained in:
Sheldan
2021-09-28 21:25:57 +02:00
parent c82ef9ac18
commit 60ac314ecc
2 changed files with 3 additions and 2 deletions

View File

@@ -65,7 +65,8 @@ public class FAQCommandConfigConverter {
private FaqCommandResponseMessageConfig convertCommandResponse(FAQCommandResponse response, Long botUserId) { private FaqCommandResponseMessageConfig convertCommandResponse(FAQCommandResponse response, Long botUserId) {
FaqCommandResponseEmbedConfig embedConfig = null; FaqCommandResponseEmbedConfig embedConfig = null;
if(response.getDescription() != null) { // one of those must not be null, for it to be considered a proper embed
if(response.getDescription() != null || response.getImageURL() != null) {
boolean useBot = response.getAuthorUserId().equals(botUserId); boolean useBot = response.getAuthorUserId().equals(botUserId);
FaqCommandResponseEmbedColorConfig colorConfig = FaqCommandResponseEmbedColorConfig FaqCommandResponseEmbedColorConfig colorConfig = FaqCommandResponseEmbedColorConfig
.builder() .builder()

View File

@@ -18,7 +18,7 @@
}, },
"aliases": { "aliases": {
"type": "array", "type": "array",
"minItems": 1, "minItems": 0,
"maxItems": 20, "maxItems": 20,
"items": { "items": {
"type": "string", "type": "string",