Bugfixes
This commit is contained in:
@@ -51,7 +51,7 @@
|
|||||||
"thumbnail":"", //Image URL. Leave empty to disable
|
"thumbnail":"", //Image URL. Leave empty to disable
|
||||||
/* Embed fields. Set to empty list [] to disable. */
|
/* Embed fields. Set to empty list [] to disable. */
|
||||||
"fields":[
|
"fields":[
|
||||||
{"name":"Field name","value":"Field value","inline":false}
|
{"name":"FIELD_NAME","value":"FIELD_VALUE","inline":false}
|
||||||
],
|
],
|
||||||
"timestamp":false
|
"timestamp":false
|
||||||
}
|
}
|
||||||
@@ -63,14 +63,14 @@
|
|||||||
"embed":{
|
"embed":{
|
||||||
"enabled":true,
|
"enabled":true,
|
||||||
"title":"Question Ticket", //Leave empty to disable
|
"title":"Question Ticket", //Leave empty to disable
|
||||||
"description":"Thank you for creating a ticket in our server.\nOur support team will assist you as soon as possible. (leave empty to disable)", //Leave empty to disable
|
"description":"Thank you for creating a ticket in our server.\nOur support team will assist you as soon as possible.", //Leave empty to disable
|
||||||
"customColor":"#f8ab00 (leave empty to disable)", //Leave empty to use default color
|
"customColor":"#f8ab00", //Leave empty to use default color
|
||||||
|
|
||||||
"image":"https://www.example.com/image.png (leave empty to disable)", //Image URL. Leave empty to disable
|
"image":"", //Image URL. Leave empty to disable
|
||||||
"thumbnail":"https://www.example.com/image.png (leave empty to disable)", //Image URL. Leave empty to disable
|
"thumbnail":"", //Image URL. Leave empty to disable
|
||||||
/* Embed fields. Set to empty list [] to disable. */
|
/* Embed fields. Set to empty list [] to disable. */
|
||||||
"fields":[
|
"fields":[
|
||||||
{"name":"Field name","value":"Field value","inline":false}
|
{"name":"FIELD_NAME","value":"FIELD_VALUE","inline":false}
|
||||||
],
|
],
|
||||||
"timestamp":false
|
"timestamp":false
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -114,10 +114,11 @@ export async function registerModalComponents(){
|
|||||||
title:question.get("opendiscord:name").value,
|
title:question.get("opendiscord:name").value,
|
||||||
description:(question.get("opendiscord:description").value) ? question.get("opendiscord:description").value : undefined,
|
description:(question.get("opendiscord:description").value) ? question.get("opendiscord:description").value : undefined,
|
||||||
})
|
})
|
||||||
|
const minimumFilesIfRequired = (question.get("opendiscord:required").value) ? 1 : 0
|
||||||
component.setComponent(new api.ODFileUploadComponent(question.id.value,{
|
component.setComponent(new api.ODFileUploadComponent(question.id.value,{
|
||||||
customId:question.id.value,
|
customId:question.id.value,
|
||||||
required:question.get("opendiscord:required").value,
|
required:question.get("opendiscord:required").value,
|
||||||
minAmount:(question.get("opendiscord:limits-enabled").value) ? question.get("opendiscord:limits-min").value : undefined,
|
minAmount:(question.get("opendiscord:limits-enabled").value) ? Math.max(minimumFilesIfRequired,question.get("opendiscord:limits-min").value) : undefined,
|
||||||
maxAmount:(question.get("opendiscord:limits-enabled").value) ? question.get("opendiscord:limits-max").value : undefined,
|
maxAmount:(question.get("opendiscord:limits-enabled").value) ? question.get("opendiscord:limits-max").value : undefined,
|
||||||
}))
|
}))
|
||||||
modal.addComponent(component,"end")
|
modal.addComponent(component,"end")
|
||||||
|
|||||||
@@ -71,11 +71,16 @@ export function describePanelOptions(mode:"fields"|"text", panel:api.ODPanel): {
|
|||||||
hasWebsite = true
|
hasWebsite = true
|
||||||
ticketOnly = false
|
ticketOnly = false
|
||||||
roleOnly = false
|
roleOnly = false
|
||||||
}else if (!dropdownMode && opt instanceof api.ODRoleOption){
|
}else if (opt instanceof api.ODRoleOption){
|
||||||
options.push(opt)
|
options.push(opt)
|
||||||
hasRole = true
|
hasRole = true
|
||||||
ticketOnly = false
|
ticketOnly = false
|
||||||
websiteOnly = false
|
websiteOnly = false
|
||||||
|
}else if (opt instanceof api.ODSubPanelOption){
|
||||||
|
options.push(opt)
|
||||||
|
ticketOnly = false
|
||||||
|
websiteOnly = false
|
||||||
|
roleOnly = false
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
@@ -130,7 +135,7 @@ export function describePanelOptions(mode:"fields"|"text", panel:api.ODPanel): {
|
|||||||
return {name:utilities.emojiTitle(emoji,name),value:description}
|
return {name:utilities.emojiTitle(emoji,name),value:description}
|
||||||
|
|
||||||
}else{
|
}else{
|
||||||
//auto-generated plugin option
|
//auto-generated option (+ sub-panels)
|
||||||
const emoji = opt.get("opendiscord:button-emoji") as api.ODOptionData<string>|null
|
const emoji = opt.get("opendiscord:button-emoji") as api.ODOptionData<string>|null
|
||||||
const name = opt.get("opendiscord:name") as api.ODOptionData<string>|null
|
const name = opt.get("opendiscord:name") as api.ODOptionData<string>|null
|
||||||
const description = opt.get("opendiscord:description") as api.ODOptionData<string>|null
|
const description = opt.get("opendiscord:description") as api.ODOptionData<string>|null
|
||||||
@@ -184,7 +189,7 @@ export function describePanelOptions(mode:"fields"|"text", panel:api.ODPanel): {
|
|||||||
else return "**"+utilities.emojiTitle(emoji,name)+"**\n"+description
|
else return "**"+utilities.emojiTitle(emoji,name)+"**\n"+description
|
||||||
|
|
||||||
}else{
|
}else{
|
||||||
//auto-generated plugin option
|
//auto-generated option (+ sub-panels)
|
||||||
const emoji = opt.get("opendiscord:button-emoji") as api.ODOptionData<string>|null
|
const emoji = opt.get("opendiscord:button-emoji") as api.ODOptionData<string>|null
|
||||||
const name = opt.get("opendiscord:name") as api.ODOptionData<string>|null
|
const name = opt.get("opendiscord:name") as api.ODOptionData<string>|null
|
||||||
const description = opt.get("opendiscord:description") as api.ODOptionData<string>|null
|
const description = opt.get("opendiscord:description") as api.ODOptionData<string>|null
|
||||||
|
|||||||
Reference in New Issue
Block a user