#141 : Finished type simplifications
This commit is contained in:
+114
-95
@@ -325,22 +325,10 @@ export interface ODJsonConfig_DefaultOptionPingSettingsType {
|
||||
custom:string[]
|
||||
}
|
||||
|
||||
/**## ODJsonConfig_DefaultOptionTicketType `interface`
|
||||
* This interface is an object which has all ticket properties for options in the `options.json` config!
|
||||
/**## ODJsonConfig_DefaultOptionTicketChannelType `interface`
|
||||
* All settings related to the ticket channel itself in a ticket option.
|
||||
*/
|
||||
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:{
|
||||
export interface ODJsonConfig_DefaultOptionTicketChannelType {
|
||||
/**The prefix used in the name of this ticket channel. */
|
||||
prefix:string,
|
||||
/**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. */
|
||||
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. */
|
||||
dmMessage:{
|
||||
/**Enable this message. */
|
||||
@@ -495,24 +500,10 @@ export interface ODJsonConfig_DefaultPanelEmbedSettingsType {
|
||||
timestamp:boolean
|
||||
}
|
||||
|
||||
/**## ODJsonConfig_DefaultPanelType `interface`
|
||||
* This interface is an object which has all properties for panels in the `panels.json` config!
|
||||
/**## ODJsonConfig_DefaultPanelSettingsType `interface`
|
||||
* This interface is a collection of additional settings for extra customisation in a panel.
|
||||
*/
|
||||
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,
|
||||
settings:{
|
||||
export interface ODJsonConfig_DefaultPanelSettingsType {
|
||||
/**The placeholder used in the dropdown when enabled. */
|
||||
dropdownPlaceholder:string,
|
||||
|
||||
@@ -531,7 +522,27 @@ export interface ODJsonConfig_DefaultPanelType {
|
||||
describeOptionsInEmbedFields:boolean,
|
||||
/**Describe the options in the embed description. */
|
||||
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`
|
||||
@@ -544,6 +555,18 @@ export class ODJsonConfig_DefaultPanels extends ODJsonConfig {
|
||||
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`
|
||||
* 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,
|
||||
/**A placeholder for the question. */
|
||||
placeholder:string,
|
||||
/**Settings related to the length of the input. */
|
||||
length:{
|
||||
/**Enable text length verification. */
|
||||
enabled:boolean,
|
||||
/**The minimum text input length. */
|
||||
min:number,
|
||||
/**The maximum text input length. */
|
||||
max:number
|
||||
}
|
||||
/**A collection of settings related to length validation in a question. */
|
||||
length:ODJSonConfig_DefaultQuestionLengthSettings
|
||||
}
|
||||
|
||||
/**## ODJsonConfig_DefaultParagraphQuestionType `interface`
|
||||
@@ -585,15 +601,8 @@ export interface ODJsonConfig_DefaultParagraphQuestionType {
|
||||
required:boolean,
|
||||
/**A placeholder for the question. */
|
||||
placeholder:string,
|
||||
/**Settings related to the length of the input. */
|
||||
length:{
|
||||
/**Enable text length verification. */
|
||||
enabled:boolean,
|
||||
/**The minimum text input length. */
|
||||
min:number,
|
||||
/**The maximum text input length. */
|
||||
max:number
|
||||
}
|
||||
/**A collection of settings related to length validation in a question. */
|
||||
length:ODJSonConfig_DefaultQuestionLengthSettings
|
||||
}
|
||||
|
||||
/**## ODJsonConfig_DefaultQuestions `default_class`
|
||||
@@ -609,46 +618,10 @@ export class ODJsonConfig_DefaultQuestions extends ODJsonConfig {
|
||||
)[]
|
||||
}
|
||||
|
||||
/**## 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!
|
||||
/**## ODJsonConfig_DefaultTranscriptsTextLayout `interface`
|
||||
* This interface contains the layout of the text transcripts.
|
||||
*/
|
||||
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:{
|
||||
export interface ODJsonConfig_DefaultTranscriptsTextLayout {
|
||||
/**The layout/complexity of the text transcripts. */
|
||||
layout:"simple"|"normal"|"detailed",
|
||||
/**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",
|
||||
/**A custom name for the transcript file (when using `"custom"`) */
|
||||
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. */
|
||||
background:{
|
||||
/**Enable a custom background. */
|
||||
@@ -711,6 +687,49 @@ export class ODJsonConfig_DefaultTranscripts extends ODJsonConfig {
|
||||
/**A link to the custom favicon. */
|
||||
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