v3.2.2 push 2

This commit is contained in:
DJj123dj
2023-02-24 15:02:53 +01:00
parent dc14a39c4e
commit 4702c633ec
5 changed files with 22 additions and 5 deletions
+2 -1
View File
@@ -33,7 +33,8 @@ Take a look at all the features and discover the possibilities!
</details> </details>
## preview ## preview
Images coming soon Images coming soon<br>
You can already see some images at our [documentation!](https://docs.openticket.dj-dj.be)
## credits ## credits
+5
View File
@@ -27,6 +27,7 @@
"answerInEphemeralOnOpen":true "answerInEphemeralOnOpen":true
}, },
"SUPPORT":"Take look at our wiki: https://docs.openticket.dj-dj.be or join our discord server: https://discord.dj-dj.be if you need support!",
"options":[ "options":[
{ {
"id":"general", "id":"general",
@@ -48,6 +49,10 @@
"enable":false, "enable":false,
"url":"https://www.example.com/catmemes/cat.png" "url":"https://www.example.com/catmemes/cat.png"
}, },
"image":{
"enable":false,
"url":"https://www.dj-dj.be/wp-content/uploads/2022/09/pfp-cropped.png"
},
"closedCategory":{ "closedCategory":{
"enable":false, "enable":false,
+9
View File
@@ -237,6 +237,14 @@ exports.checker = async () => {
createError("'"+path+"/thumbnail' | there is no thumbnail object!") createError("'"+path+"/thumbnail' | there is no thumbnail object!")
} }
//image
if (option.image){
checkType(option.image.enable,"boolean",path+"/image/enable")
checkType(option.image.url,"string",path+"/image/url")
}else{
createError("'"+path+"/image' | there is no image object!")
}
//closedCategory //closedCategory
if (option.closedCategory){ if (option.closedCategory){
checkType(option.closedCategory.enable,"boolean",path/"/closedCategory/enable") checkType(option.closedCategory.enable,"boolean",path/"/closedCategory/enable")
@@ -453,6 +461,7 @@ exports.checker = async () => {
} }
checkType(config.system.showSlashcmdsInHelp,"boolean","system/showSlashcmdsInHelp") checkType(config.system.showSlashcmdsInHelp,"boolean","system/showSlashcmdsInHelp")
checkType(config.system.answerInEphemeralOnOpen,"boolean","system/answerInEphemeralOnOpen")
//options //options
+1
View File
@@ -185,6 +185,7 @@ module.exports = () => {
} }
if (currentTicketOptions.thumbnail.enable) ticketEmbed.setThumbnail(currentTicketOptions.thumbnail.url) if (currentTicketOptions.thumbnail.enable) ticketEmbed.setThumbnail(currentTicketOptions.thumbnail.url)
if (currentTicketOptions.image.enable) ticketEmbed.setImage(currentTicketOptions.image.url)
ticketChannel.send({ ticketChannel.send({
content:"<@"+interaction.member.id+"> @here", content:"<@"+interaction.member.id+"> @here",
+5 -4
View File
@@ -6,7 +6,7 @@ const l = bot.language
//================== //==================
//OTTicketOptions //OTTicketOptions
/**@typedef {{id: String,name: String,description: String,icon: String,label: String,type: "ticket"|"role"|"website",color: "red"|"green"|"blue"|"gray",adminroles: String[],channelprefix: String,category: String,message: String,enableDmOnOpen: Boolean,ticketmessage: String, thumbnail:{enable:Boolean,url:String}, closedCategory:{enable:Boolean,id:String}}} OTTicketOptions */ /**@typedef {{id: String,name: String,description: String,icon: String,label: String,type: "ticket"|"role"|"website",color: "red"|"green"|"blue"|"gray",adminroles: String[],channelprefix: String,category: String,message: String,enableDmOnOpen: Boolean,ticketmessage: String, thumbnail:{enable:Boolean,url:String}, image:{enable:Boolean,url:String}, closedCategory:{enable:Boolean,id:String}}} OTTicketOptions */
//OTRoleOptions //OTRoleOptions
/**@typedef {{id: String,name: String,description: String,icon: String,label: String,type: "ticket"|"role"|"website",color:"red"|"green"|"blue"|"gray"|"none",roles:String[],mode:"add&remove"|"remove"|"add",enableDmOnOpen:Boolean}} OTRoleOptions */ /**@typedef {{id: String,name: String,description: String,icon: String,label: String,type: "ticket"|"role"|"website",color:"red"|"green"|"blue"|"gray"|"none",roles:String[],mode:"add&remove"|"remove"|"add",enableDmOnOpen:Boolean}} OTRoleOptions */
@@ -18,8 +18,11 @@ const l = bot.language
//OTConfigMessage //OTConfigMessage
/**@typedef {{id: string, name: string, description: string, dropdown: boolean, enableFooter: boolean, footer: string, enableThumbnail: boolean, thumbnail: string, enableCustomColor: boolean, color: string, options: string[], other:{enableTicketExplaination: boolean, enableMaxTicketsWarning: boolean, customDropdownPlaceholder:{enable:Boolean,text:String}, customCategoryText:{enable:Boolean,text:String}, embedTitleURL:{enable:Boolean,url:String} } }} OTConfigMessage*/ /**@typedef {{id: string, name: string, description: string, dropdown: boolean, enableFooter: boolean, footer: string, enableThumbnail: boolean, thumbnail: string, enableCustomColor: boolean, color: string, options: string[], other:{enableTicketExplaination: boolean, enableMaxTicketsWarning: boolean, customDropdownPlaceholder:{enable:Boolean,text:String}, customCategoryText:{enable:Boolean,text:String}, embedTitleURL:{enable:Boolean,url:String} } }} OTConfigMessage*/
//OTAllOptions
/**@typedef {{id: String,name: String,description: String,icon: String,label: String,type: "ticket"|"role"|"website",color:"red"|"green"|"blue"|"gray"|"none",roles:String[],mode:"add&remove"|"remove"|"add",adminroles: String[],channelprefix: String,category: String,message: String,enableDmOnOpen: Boolean,ticketmessage: String, thumbnail:{enable:Boolean,url:String}, image:{enable:Boolean,url:String}, url:String, closedCategory:{enable:Boolean,id:String}}} OTAllOptions */
//StringOptions //StringOptions
/**@typedef {"id"|"name"|"description"|"icon"|"label"|"type"|"color"|"adminroles"|"channelprefix"|"category"|"message"|"enableDmOnOpen"|"ticketmessage"|"thumbnail"|"closedCategory"} OTTicketStringOptions */ /**@typedef {"id"|"name"|"description"|"icon"|"label"|"type"|"color"|"adminroles"|"channelprefix"|"category"|"message"|"enableDmOnOpen"|"ticketmessage"|"thumbnail"|"image"|"closedCategory"} OTTicketStringOptions */
/**@typedef {"id"|"name"|"description"|"icon"|"label"|"type"|"color"|"roles"|"mode"|"enableDmOnOpen"} OTRoleStringOptions */ /**@typedef {"id"|"name"|"description"|"icon"|"label"|"type"|"color"|"roles"|"mode"|"enableDmOnOpen"} OTRoleStringOptions */
/**@typedef {"id"|"name"|"description"|"icon"|"label"|"type"|"url"} OTWebsiteStringOptions */ /**@typedef {"id"|"name"|"description"|"icon"|"label"|"type"|"url"} OTWebsiteStringOptions */
@@ -168,8 +171,6 @@ this.websiteType = {}
this.messageType = {} this.messageType = {}
//OTAllOptions
/**@typedef {{id: String,name: String,description: String,icon: String,label: String,type: "ticket"|"role"|"website",color:"red"|"green"|"blue"|"gray"|"none",roles:String[],mode:"add&remove"|"remove"|"add",adminroles: String[],channelprefix: String,category: String,message: String,enableDmOnOpen: Boolean,ticketmessage: String, thumbnail:{enable:Boolean,url:String}, url:String, closedCategory:{enable:Boolean,id:String}}} OTAllOptions */
/** /**
* *