This commit is contained in:
DJj123dj
2026-05-25 14:34:21 +02:00
parent 6c994f6f86
commit adfcb1c82f
3 changed files with 16 additions and 10 deletions
+6 -6
View File
@@ -51,7 +51,7 @@
"thumbnail":"", //Image URL. Leave empty to disable
/* Embed fields. Set to empty list [] to disable. */
"fields":[
{"name":"Field name","value":"Field value","inline":false}
{"name":"FIELD_NAME","value":"FIELD_VALUE","inline":false}
],
"timestamp":false
}
@@ -63,14 +63,14 @@
"embed":{
"enabled":true,
"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
"customColor":"#f8ab00 (leave empty to disable)", //Leave empty to use default color
"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 use default color
"image":"https://www.example.com/image.png (leave empty to disable)", //Image URL. Leave empty to disable
"thumbnail":"https://www.example.com/image.png (leave empty to disable)", //Image URL. Leave empty to disable
"image":"", //Image URL. Leave empty to disable
"thumbnail":"", //Image URL. Leave empty to disable
/* Embed fields. Set to empty list [] to disable. */
"fields":[
{"name":"Field name","value":"Field value","inline":false}
{"name":"FIELD_NAME","value":"FIELD_VALUE","inline":false}
],
"timestamp":false
},
+2 -1
View File
@@ -114,10 +114,11 @@ export async function registerModalComponents(){
title:question.get("opendiscord:name").value,
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,{
customId:question.id.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,
}))
modal.addComponent(component,"end")
+8 -3
View File
@@ -71,11 +71,16 @@ export function describePanelOptions(mode:"fields"|"text", panel:api.ODPanel): {
hasWebsite = true
ticketOnly = false
roleOnly = false
}else if (!dropdownMode && opt instanceof api.ODRoleOption){
}else if (opt instanceof api.ODRoleOption){
options.push(opt)
hasRole = true
ticketOnly = 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}
}else{
//auto-generated plugin option
//auto-generated option (+ sub-panels)
const emoji = opt.get("opendiscord:button-emoji") 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
@@ -184,7 +189,7 @@ export function describePanelOptions(mode:"fields"|"text", panel:api.ODPanel): {
else return "**"+utilities.emojiTitle(emoji,name)+"**\n"+description
}else{
//auto-generated plugin option
//auto-generated option (+ sub-panels)
const emoji = opt.get("opendiscord:button-emoji") 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