#141 : Finished type simplifications
This commit is contained in:
+112
-93
@@ -325,22 +325,10 @@ export interface ODJsonConfig_DefaultOptionPingSettingsType {
|
|||||||
custom:string[]
|
custom:string[]
|
||||||
}
|
}
|
||||||
|
|
||||||
/**## ODJsonConfig_DefaultOptionTicketType `interface`
|
/**## ODJsonConfig_DefaultOptionTicketChannelType `interface`
|
||||||
* This interface is an object which has all ticket properties for options in the `options.json` config!
|
* All settings related to the ticket channel itself in a ticket option.
|
||||||
*/
|
*/
|
||||||
export interface ODJsonConfig_DefaultOptionTicketType extends ODJsonConfig_DefaultOptionType {
|
export interface ODJsonConfig_DefaultOptionTicketChannelType {
|
||||||
type:"ticket",
|
|
||||||
button:ODJsonConfig_DefaultOptionButtonSettingsType,
|
|
||||||
/**A list of discord role ids which are able to access this ticket type & use commands. */
|
|
||||||
ticketAdmins:string[],
|
|
||||||
/**A list of discord role ids which are able to access this ticket type but can't write in the chat. */
|
|
||||||
readonlyAdmins:string[],
|
|
||||||
/**When enabled, blacklisted users can still create this ticket type. (used for appeals, etc) */
|
|
||||||
allowCreationByBlacklistedUsers:boolean,
|
|
||||||
/**A list of valid question ids from the `questions.json` config. */
|
|
||||||
questions:string[],
|
|
||||||
/**All settings related to the ticket channel itself. */
|
|
||||||
channel:{
|
|
||||||
/**The prefix used in the name of this ticket channel. */
|
/**The prefix used in the name of this ticket channel. */
|
||||||
prefix:string,
|
prefix:string,
|
||||||
/**The type of suffix used in the name of this ticket channel. */
|
/**The type of suffix used in the name of this ticket channel. */
|
||||||
@@ -360,7 +348,24 @@ export interface ODJsonConfig_DefaultOptionTicketType extends ODJsonConfig_Defau
|
|||||||
}[],
|
}[],
|
||||||
/**The channel description/topic shown at the top of the channel in discord. */
|
/**The channel description/topic shown at the top of the channel in discord. */
|
||||||
description:string
|
description:string
|
||||||
},
|
}
|
||||||
|
|
||||||
|
/**## ODJsonConfig_DefaultOptionTicketType `interface`
|
||||||
|
* This interface is an object which has all ticket properties for options in the `options.json` config!
|
||||||
|
*/
|
||||||
|
export interface ODJsonConfig_DefaultOptionTicketType extends ODJsonConfig_DefaultOptionType {
|
||||||
|
type:"ticket",
|
||||||
|
button:ODJsonConfig_DefaultOptionButtonSettingsType,
|
||||||
|
/**A list of discord role ids which are able to access this ticket type & use commands. */
|
||||||
|
ticketAdmins:string[],
|
||||||
|
/**A list of discord role ids which are able to access this ticket type but can't write in the chat. */
|
||||||
|
readonlyAdmins:string[],
|
||||||
|
/**When enabled, blacklisted users can still create this ticket type. (used for appeals, etc) */
|
||||||
|
allowCreationByBlacklistedUsers:boolean,
|
||||||
|
/**A list of valid question ids from the `questions.json` config. */
|
||||||
|
questions:string[],
|
||||||
|
/**All settings related to the ticket channel itself. */
|
||||||
|
channel:ODJsonConfig_DefaultOptionTicketChannelType,
|
||||||
/**All settings related to the message sent in DM to the creator when the ticket is created. */
|
/**All settings related to the message sent in DM to the creator when the ticket is created. */
|
||||||
dmMessage:{
|
dmMessage:{
|
||||||
/**Enable this message. */
|
/**Enable this message. */
|
||||||
@@ -495,24 +500,10 @@ export interface ODJsonConfig_DefaultPanelEmbedSettingsType {
|
|||||||
timestamp:boolean
|
timestamp:boolean
|
||||||
}
|
}
|
||||||
|
|
||||||
/**## ODJsonConfig_DefaultPanelType `interface`
|
/**## ODJsonConfig_DefaultPanelSettingsType `interface`
|
||||||
* This interface is an object which has all properties for panels in the `panels.json` config!
|
* This interface is a collection of additional settings for extra customisation in a panel.
|
||||||
*/
|
*/
|
||||||
export interface ODJsonConfig_DefaultPanelType {
|
export interface ODJsonConfig_DefaultPanelSettingsType {
|
||||||
/**The id of this panel. */
|
|
||||||
id:string,
|
|
||||||
/**The name of this panel. */
|
|
||||||
name:string,
|
|
||||||
/**When enabled, the panel uses a dropdown instead of buttons. */
|
|
||||||
dropdown:boolean,
|
|
||||||
/**A list of valid options ids from the `options.json` config. */
|
|
||||||
options:string[],
|
|
||||||
|
|
||||||
/**The raw text contents of this panel. (empty for embed only) */
|
|
||||||
text:string,
|
|
||||||
/**The embed of this panel. */
|
|
||||||
embed:ODJsonConfig_DefaultPanelEmbedSettingsType,
|
|
||||||
settings:{
|
|
||||||
/**The placeholder used in the dropdown when enabled. */
|
/**The placeholder used in the dropdown when enabled. */
|
||||||
dropdownPlaceholder:string,
|
dropdownPlaceholder:string,
|
||||||
|
|
||||||
@@ -532,6 +523,26 @@ export interface ODJsonConfig_DefaultPanelType {
|
|||||||
/**Describe the options in the embed description. */
|
/**Describe the options in the embed description. */
|
||||||
describeOptionsInEmbedDescription:boolean
|
describeOptionsInEmbedDescription:boolean
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**## ODJsonConfig_DefaultPanelType `interface`
|
||||||
|
* This interface is an object which has all properties for panels in the `panels.json` config!
|
||||||
|
*/
|
||||||
|
export interface ODJsonConfig_DefaultPanelType {
|
||||||
|
/**The id of this panel. */
|
||||||
|
id:string,
|
||||||
|
/**The name of this panel. */
|
||||||
|
name:string,
|
||||||
|
/**When enabled, the panel uses a dropdown instead of buttons. */
|
||||||
|
dropdown:boolean,
|
||||||
|
/**A list of valid options ids from the `options.json` config. */
|
||||||
|
options:string[],
|
||||||
|
|
||||||
|
/**The raw text contents of this panel. (empty for embed only) */
|
||||||
|
text:string,
|
||||||
|
/**The embed of this panel. */
|
||||||
|
embed:ODJsonConfig_DefaultPanelEmbedSettingsType,
|
||||||
|
/**A collection of additional settings for extra customisation in a panel. */
|
||||||
|
settings:ODJsonConfig_DefaultPanelSettingsType
|
||||||
}
|
}
|
||||||
|
|
||||||
/**## ODJsonConfig_DefaultPanels `default_class`
|
/**## ODJsonConfig_DefaultPanels `default_class`
|
||||||
@@ -544,6 +555,18 @@ export class ODJsonConfig_DefaultPanels extends ODJsonConfig {
|
|||||||
declare data: ODJsonConfig_DefaultPanelType[]
|
declare data: ODJsonConfig_DefaultPanelType[]
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**## ODJSonConfig_DefaultQuestionLengthSettings `interface`
|
||||||
|
* This interface is a collection of settings related to length validation in a question.
|
||||||
|
*/
|
||||||
|
export interface ODJSonConfig_DefaultQuestionLengthSettings {
|
||||||
|
/**Enable text length verification. */
|
||||||
|
enabled:boolean,
|
||||||
|
/**The minimum text input length. */
|
||||||
|
min:number,
|
||||||
|
/**The maximum text input length. */
|
||||||
|
max:number
|
||||||
|
}
|
||||||
|
|
||||||
/**## ODJsonConfig_DefaultShortQuestionType `interface`
|
/**## ODJsonConfig_DefaultShortQuestionType `interface`
|
||||||
* This interface is an object which has all properties for short questions in the `questions.json` config!
|
* This interface is an object which has all properties for short questions in the `questions.json` config!
|
||||||
*/
|
*/
|
||||||
@@ -559,15 +582,8 @@ export interface ODJsonConfig_DefaultShortQuestionType {
|
|||||||
required:boolean,
|
required:boolean,
|
||||||
/**A placeholder for the question. */
|
/**A placeholder for the question. */
|
||||||
placeholder:string,
|
placeholder:string,
|
||||||
/**Settings related to the length of the input. */
|
/**A collection of settings related to length validation in a question. */
|
||||||
length:{
|
length:ODJSonConfig_DefaultQuestionLengthSettings
|
||||||
/**Enable text length verification. */
|
|
||||||
enabled:boolean,
|
|
||||||
/**The minimum text input length. */
|
|
||||||
min:number,
|
|
||||||
/**The maximum text input length. */
|
|
||||||
max:number
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**## ODJsonConfig_DefaultParagraphQuestionType `interface`
|
/**## ODJsonConfig_DefaultParagraphQuestionType `interface`
|
||||||
@@ -585,15 +601,8 @@ export interface ODJsonConfig_DefaultParagraphQuestionType {
|
|||||||
required:boolean,
|
required:boolean,
|
||||||
/**A placeholder for the question. */
|
/**A placeholder for the question. */
|
||||||
placeholder:string,
|
placeholder:string,
|
||||||
/**Settings related to the length of the input. */
|
/**A collection of settings related to length validation in a question. */
|
||||||
length:{
|
length:ODJSonConfig_DefaultQuestionLengthSettings
|
||||||
/**Enable text length verification. */
|
|
||||||
enabled:boolean,
|
|
||||||
/**The minimum text input length. */
|
|
||||||
min:number,
|
|
||||||
/**The maximum text input length. */
|
|
||||||
max:number
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**## ODJsonConfig_DefaultQuestions `default_class`
|
/**## ODJsonConfig_DefaultQuestions `default_class`
|
||||||
@@ -609,46 +618,10 @@ export class ODJsonConfig_DefaultQuestions extends ODJsonConfig {
|
|||||||
)[]
|
)[]
|
||||||
}
|
}
|
||||||
|
|
||||||
/**## ODJsonConfig_DefaultTranscripts `default_class`
|
/**## ODJsonConfig_DefaultTranscriptsTextLayout `interface`
|
||||||
* This is a special class that adds type definitions & typescript to the ODJsonConfig class.
|
* This interface contains the layout of the text transcripts.
|
||||||
* It doesn't add any extra features!
|
|
||||||
*
|
|
||||||
* This default class is made for the `transcripts.json` config!
|
|
||||||
*/
|
*/
|
||||||
export class ODJsonConfig_DefaultTranscripts extends ODJsonConfig {
|
export interface ODJsonConfig_DefaultTranscriptsTextLayout {
|
||||||
declare data: {
|
|
||||||
/**All general settings related to transcripts. */
|
|
||||||
general:{
|
|
||||||
/**Are transcripts enabled? */
|
|
||||||
enabled:boolean,
|
|
||||||
|
|
||||||
/**Enable sending the generated transcript in a channel. */
|
|
||||||
enableChannel:boolean,
|
|
||||||
/**Enable sending the generated transcript to the DM of the ticket creator. */
|
|
||||||
enableCreatorDM:boolean,
|
|
||||||
/**Enable sending the generated transcript to the DM of the participants. */
|
|
||||||
enableParticipantDM:boolean,
|
|
||||||
/**Enable sending the generated transcript to the DM of all admins which were active in the ticket. */
|
|
||||||
enableActiveAdminDM:boolean,
|
|
||||||
/**Enable sending the generated transcript to the DM of all admins which were assigned to the ticket. */
|
|
||||||
enableEveryAdminDM:boolean,
|
|
||||||
|
|
||||||
/**A discord channel id for the `"enableChannel"` setting. */
|
|
||||||
channel:string,
|
|
||||||
/**Want to use text or HTML transcripts? */
|
|
||||||
mode:"html"|"text"
|
|
||||||
},
|
|
||||||
/**All settings related to the embed from the transcripts. (UNIMPLEMENTED!!) */
|
|
||||||
embedSettings:{
|
|
||||||
/**Unimplemented feature */
|
|
||||||
customColor:discord.ColorResolvable,
|
|
||||||
/**Unimplemented feature */
|
|
||||||
listAllParticipants:boolean,
|
|
||||||
/**Unimplemented feature */
|
|
||||||
includeTicketStats:boolean
|
|
||||||
},
|
|
||||||
/**The layout of the text transcripts. */
|
|
||||||
textTranscriptStyle:{
|
|
||||||
/**The layout/complexity of the text transcripts. */
|
/**The layout/complexity of the text transcripts. */
|
||||||
layout:"simple"|"normal"|"detailed",
|
layout:"simple"|"normal"|"detailed",
|
||||||
/**Include stats in the transcript. */
|
/**Include stats in the transcript. */
|
||||||
@@ -666,9 +639,12 @@ export class ODJsonConfig_DefaultTranscripts extends ODJsonConfig {
|
|||||||
fileMode:"custom"|"channel-name"|"channel-id"|"user-name"|"user-id",
|
fileMode:"custom"|"channel-name"|"channel-id"|"user-name"|"user-id",
|
||||||
/**A custom name for the transcript file (when using `"custom"`) */
|
/**A custom name for the transcript file (when using `"custom"`) */
|
||||||
customFileName:string
|
customFileName:string
|
||||||
},
|
}
|
||||||
/**The layout of the HTML transcripts. */
|
|
||||||
htmlTranscriptStyle:{
|
/**## ODJsonConfig_DefaultTranscriptsHtmlLayout `interface`
|
||||||
|
* This interface contains the layout of the HTML transcripts.
|
||||||
|
*/
|
||||||
|
export interface ODJsonConfig_DefaultTranscriptsHtmlLayout {
|
||||||
/**Settings related to the background. */
|
/**Settings related to the background. */
|
||||||
background:{
|
background:{
|
||||||
/**Enable a custom background. */
|
/**Enable a custom background. */
|
||||||
@@ -712,5 +688,48 @@ export class ODJsonConfig_DefaultTranscripts extends ODJsonConfig {
|
|||||||
imageUrl:string
|
imageUrl:string
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**## ODJsonConfig_DefaultTranscripts `default_class`
|
||||||
|
* This is a special class that adds type definitions & typescript to the ODJsonConfig class.
|
||||||
|
* It doesn't add any extra features!
|
||||||
|
*
|
||||||
|
* This default class is made for the `transcripts.json` config!
|
||||||
|
*/
|
||||||
|
export class ODJsonConfig_DefaultTranscripts extends ODJsonConfig {
|
||||||
|
declare data: {
|
||||||
|
/**All general settings related to transcripts. */
|
||||||
|
general:{
|
||||||
|
/**Are transcripts enabled? */
|
||||||
|
enabled:boolean,
|
||||||
|
|
||||||
|
/**Enable sending the generated transcript in a channel. */
|
||||||
|
enableChannel:boolean,
|
||||||
|
/**Enable sending the generated transcript to the DM of the ticket creator. */
|
||||||
|
enableCreatorDM:boolean,
|
||||||
|
/**Enable sending the generated transcript to the DM of the participants. */
|
||||||
|
enableParticipantDM:boolean,
|
||||||
|
/**Enable sending the generated transcript to the DM of all admins which were active in the ticket. */
|
||||||
|
enableActiveAdminDM:boolean,
|
||||||
|
/**Enable sending the generated transcript to the DM of all admins which were assigned to the ticket. */
|
||||||
|
enableEveryAdminDM:boolean,
|
||||||
|
|
||||||
|
/**A discord channel id for the `"enableChannel"` setting. */
|
||||||
|
channel:string,
|
||||||
|
/**Want to use text or HTML transcripts? */
|
||||||
|
mode:"html"|"text"
|
||||||
|
},
|
||||||
|
/**All settings related to the embed from the transcripts. (UNIMPLEMENTED!!) */
|
||||||
|
embedSettings:{
|
||||||
|
/**Unimplemented feature */
|
||||||
|
customColor:discord.ColorResolvable,
|
||||||
|
/**Unimplemented feature */
|
||||||
|
listAllParticipants:boolean,
|
||||||
|
/**Unimplemented feature */
|
||||||
|
includeTicketStats:boolean
|
||||||
|
},
|
||||||
|
/**The layout of the text transcripts. */
|
||||||
|
textTranscriptStyle:ODJsonConfig_DefaultTranscriptsTextLayout,
|
||||||
|
/**The layout of the HTML transcripts. */
|
||||||
|
htmlTranscriptStyle:ODJsonConfig_DefaultTranscriptsHtmlLayout
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user