mirror of
https://github.com/Sheldan/OnePlusBot.git
synced 2026-03-30 08:24:47 +00:00
[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:
@@ -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()
|
||||||
|
|||||||
@@ -18,7 +18,7 @@
|
|||||||
},
|
},
|
||||||
"aliases": {
|
"aliases": {
|
||||||
"type": "array",
|
"type": "array",
|
||||||
"minItems": 1,
|
"minItems": 0,
|
||||||
"maxItems": 20,
|
"maxItems": 20,
|
||||||
"items": {
|
"items": {
|
||||||
"type": "string",
|
"type": "string",
|
||||||
|
|||||||
Reference in New Issue
Block a user