Added new API comments (part 5)

This commit is contained in:
DJj123dj
2025-01-14 17:18:47 +01:00
parent 9a73ee0d01
commit 138378ac31
+144 -2
View File
@@ -275,6 +275,7 @@ export interface ODJsonConfig_DefaultOptionEmbedSettingsType {
value:string, value:string,
inline:boolean inline:boolean
}[], }[],
/**Enable setting the timestamp of the embed to the current time. */
timestamp:boolean timestamp:boolean
} }
@@ -282,8 +283,11 @@ export interface ODJsonConfig_DefaultOptionEmbedSettingsType {
* This interface is an object which has all message ping settings for ticket options in the `options.json` config! * This interface is an object which has all message ping settings for ticket options in the `options.json` config!
*/ */
export interface ODJsonConfig_DefaultOptionPingSettingsType { export interface ODJsonConfig_DefaultOptionPingSettingsType {
/**Ping `@here`. */
"@here":boolean, "@here":boolean,
/**Ping `@everyone`. */
"@everyone":boolean, "@everyone":boolean,
/**A list of custom discord role ids to ping. */
custom:string[] custom:string[]
} }
@@ -293,49 +297,92 @@ export interface ODJsonConfig_DefaultOptionPingSettingsType {
export interface ODJsonConfig_DefaultOptionTicketType extends ODJsonConfig_DefaultOptionType { export interface ODJsonConfig_DefaultOptionTicketType extends ODJsonConfig_DefaultOptionType {
type:"ticket", type:"ticket",
button:ODJsonConfig_DefaultOptionButtonSettingsType, button:ODJsonConfig_DefaultOptionButtonSettingsType,
/**A list of discord role ids which are able to access this ticket type & use commands. */
ticketAdmins:string[], 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[], readonlyAdmins:string[],
/**When enabled, blacklisted users can still create this ticket type. (used for appeals, etc) */
allowCreationByBlacklistedUsers:boolean, allowCreationByBlacklistedUsers:boolean,
/**A list of valid question ids from the `questions.json` config. */
questions:string[], questions:string[],
/**All settings related to the ticket channel itself. */
channel:{ 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. */
suffix:"user-name"|"user-id"|"random-number"|"random-hex"|"counter-dynamic"|"counter-fixed", suffix:"user-name"|"user-id"|"random-number"|"random-hex"|"counter-dynamic"|"counter-fixed",
/**An optional discord category id to create this ticket in. */
category:string, category:string,
/**An optional discord category id to move this ticket to when closed. */
closedCategory:string, closedCategory:string,
/**An optional discord category id to create this ticket in when the primary one is full (max. 50 tickets). */
backupCategory:string, backupCategory:string,
claimedCategory:{user:string, category:string}[], /**A list of discord category ids to move this ticket to when claimed by a specific user. */
claimedCategory:{
/**The user which claimed the ticket. */
user:string,
/**The category to move the ticket to when claimed by this user. */
category:string
}[],
/**The channel description/topic shown at the top of the channel in discord. */
description:string description:string
}, },
/**All settings related to the message sent in DM to the creator when the ticket is created. */
dmMessage:{ dmMessage:{
/**Enable this message. */
enabled:boolean, enabled:boolean,
/**The raw text contents of this message. (empty for embed only) */
text:string, text:string,
/**The embed of this message. */
embed:ODJsonConfig_DefaultOptionEmbedSettingsType embed:ODJsonConfig_DefaultOptionEmbedSettingsType
}, },
/**All settings related to the message sent in the ticket channel when the ticket is created. */
ticketMessage:{ ticketMessage:{
/**Enable this message. */
enabled:boolean, enabled:boolean,
/**The raw text contents of this message. (empty for embed only) */
text:string, text:string,
/**The embed of this message. */
embed:ODJsonConfig_DefaultOptionEmbedSettingsType, embed:ODJsonConfig_DefaultOptionEmbedSettingsType,
/**Additional ping/mention settings for this ticket channel. */
ping:ODJsonConfig_DefaultOptionPingSettingsType ping:ODJsonConfig_DefaultOptionPingSettingsType
}, },
/**All settings related to autoclosing this ticket type. */
autoclose:{ autoclose:{
/**Enable autoclosing when the ticket is inactive for the set duration of time. */
enableInactiveHours:boolean, enableInactiveHours:boolean,
/**The amount of hours this ticket is required to be inactive for. */
inactiveHours:number, inactiveHours:number,
/**Enable autoclosing when the creator of the ticket leaves the server. */
enableUserLeave:boolean, enableUserLeave:boolean,
/**Disable autoclosing when the ticket is claimed by someone. */
disableOnClaim:boolean disableOnClaim:boolean
}, },
/**All settings related to autodeleting this ticket type. */
autodelete:{ autodelete:{
/**Enable autodeleting when the ticket is inactive for the set duration of time. */
enableInactiveDays:boolean, enableInactiveDays:boolean,
/**The amount of days this ticket is required to be inactive for. */
inactiveDays:number, inactiveDays:number,
/**Enable autodeleting when the creator of the ticket leaves the server. */
enableUserLeave:boolean, enableUserLeave:boolean,
/**Disable autodeleting when the ticket is claimed by someone. */
disableOnClaim:boolean disableOnClaim:boolean
}, },
/**All settings related to the cooldown of this ticket type */
cooldown:{ cooldown:{
/**Enable cooldown (per user) */
enabled:boolean, enabled:boolean,
/**The amount of minutes a user needs to wait before being able to create a ticket again. */
cooldownMinutes:number cooldownMinutes:number
}, },
/**All settings related to the limits of this ticket type */
limits:{ limits:{
/**Enable option ticket limits. */
enabled:boolean, enabled:boolean,
/**The maximum amount of tickets of this type that are allowed in the server at the same time. */
globalMaximum:number, globalMaximum:number,
/**The maximum amount of tickets of this type that a user is allowed to create at the same time. */
userMaximum:number userMaximum:number
} }
} }
@@ -345,6 +392,7 @@ export interface ODJsonConfig_DefaultOptionTicketType extends ODJsonConfig_Defau
*/ */
export interface ODJsonConfig_DefaultOptionWebsiteType extends ODJsonConfig_DefaultOptionType { export interface ODJsonConfig_DefaultOptionWebsiteType extends ODJsonConfig_DefaultOptionType {
type:"website", type:"website",
/**The URL this button will point to. */
url:string url:string
} }
@@ -354,9 +402,13 @@ export interface ODJsonConfig_DefaultOptionWebsiteType extends ODJsonConfig_Defa
export interface ODJsonConfig_DefaultOptionRoleType extends ODJsonConfig_DefaultOptionType { export interface ODJsonConfig_DefaultOptionRoleType extends ODJsonConfig_DefaultOptionType {
type:"role", type:"role",
button:ODJsonConfig_DefaultOptionButtonSettingsType, button:ODJsonConfig_DefaultOptionButtonSettingsType,
/**All roles which will be affected by this button. */
roles:string[], roles:string[],
/**The mode determines what will happen with the affected roles on the user. */
mode:OTRoleUpdateMode, mode:OTRoleUpdateMode,
/**A list of roles to remove from the user when given at least one of the affected roles. */
removeRolesOnAdd:string[], removeRolesOnAdd:string[],
/**Automatically add these roles when the user joins the server. */
addOnMemberJoin:boolean addOnMemberJoin:boolean
} }
@@ -378,18 +430,34 @@ export class ODJsonConfig_DefaultOptions extends ODJsonConfig {
* This interface is an object which has all message embed settings for panels in the `panels.json` config! * This interface is an object which has all message embed settings for panels in the `panels.json` config!
*/ */
export interface ODJsonConfig_DefaultPanelEmbedSettingsType { export interface ODJsonConfig_DefaultPanelEmbedSettingsType {
/**Is this embed enabled? */
enabled:boolean, enabled:boolean,
/**The title of the embed. */
title:string, title:string,
/**The description of this embed. */
description:string, description:string,
/**A custom color for this embed. (The default bot color is used when empty) */
customColor:discord.ColorResolvable, customColor:discord.ColorResolvable,
/**An optional URL used in the title of the embed. */
url:string, url:string,
/**A URL to an image displayed in the embed. */
image:string, image:string,
/**A URL to a thumbnail displayed in the embed. */
thumbnail:string, thumbnail:string,
/**The footer of this embed. */
footer:string, footer:string,
fields:{name:string,value:string,inline:boolean}[], /**A list of fields displayed in the embed. (except when using "describeOptionsInEmbedFields") */
fields:{
/**The name of this field. */
name:string,
/**The value of this field. => empty not allowed */
value:string,
inline:boolean
}[],
/**Enable setting the timestamp of the embed to the current time. */
timestamp:boolean timestamp:boolean
} }
@@ -397,23 +465,37 @@ export interface ODJsonConfig_DefaultPanelEmbedSettingsType {
* This interface is an object which has all properties for panels in the `panels.json` config! * This interface is an object which has all properties for panels in the `panels.json` config!
*/ */
export interface ODJsonConfig_DefaultPanelType { export interface ODJsonConfig_DefaultPanelType {
/**The id of this panel. */
id:string, id:string,
/**The name of this panel. */
name:string, name:string,
/**When enabled, the panel uses a dropdown instead of buttons. */
dropdown:boolean, dropdown:boolean,
/**A list of valid options ids from the `options.json` config. */
options:string[], options:string[],
/**The raw text contents of this panel. (empty for embed only) */
text:string, text:string,
/**The embed of this panel. */
embed:ODJsonConfig_DefaultPanelEmbedSettingsType, embed:ODJsonConfig_DefaultPanelEmbedSettingsType,
settings:{ settings:{
/**The placeholder used in the dropdown when enabled. */
dropdownPlaceholder:string, dropdownPlaceholder:string,
/**Enable a max tickets warning in the text contents. */
enableMaxTicketsWarningInText:boolean, enableMaxTicketsWarningInText:boolean,
/**Enable a max tickets warning in the embed. */
enableMaxTicketsWarningInEmbed:boolean, enableMaxTicketsWarningInEmbed:boolean,
/**The layout/complexity of the describe options feature. */
describeOptionsLayout:"simple"|"normal"|"detailed", describeOptionsLayout:"simple"|"normal"|"detailed",
/**A custom title for the describe options feature. */
describeOptionsCustomTitle:string, describeOptionsCustomTitle:string,
/**Describe the options in the text contents. */
describeOptionsInText:boolean, describeOptionsInText:boolean,
/**Describe the options in the embed fields. */
describeOptionsInEmbedFields:boolean, describeOptionsInEmbedFields:boolean,
/**Describe the options in the embed description. */
describeOptionsInEmbedDescription:boolean describeOptionsInEmbedDescription:boolean
} }
} }
@@ -432,15 +514,24 @@ export class ODJsonConfig_DefaultPanels extends ODJsonConfig {
* 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!
*/ */
export interface ODJsonConfig_DefaultShortQuestionType { export interface ODJsonConfig_DefaultShortQuestionType {
/**The id of this question. */
id:string, id:string,
/**The name of this question. */
name:string, name:string,
/**The type of this question. */
type:"short", type:"short",
/**Is this question required? */
required:boolean, required:boolean,
/**A placeholder for the question. */
placeholder:string, placeholder:string,
/**Settings related to the length of the input. */
length:{ length:{
/**Enable text length verification. */
enabled:boolean, enabled:boolean,
/**The minimum text input length. */
min:number, min:number,
/**The maximum text input length. */
max:number max:number
} }
} }
@@ -449,15 +540,24 @@ export interface ODJsonConfig_DefaultShortQuestionType {
* This interface is an object which has all properties for paragraph questions in the `questions.json` config! * This interface is an object which has all properties for paragraph questions in the `questions.json` config!
*/ */
export interface ODJsonConfig_DefaultParagraphQuestionType { export interface ODJsonConfig_DefaultParagraphQuestionType {
/**The id of this question. */
id:string, id:string,
/**The name of this question. */
name:string, name:string,
/**The type of this question. */
type:"paragraph", type:"paragraph",
/**Is this question required? */
required:boolean, required:boolean,
/**A placeholder for the question. */
placeholder:string, placeholder:string,
/**Settings related to the length of the input. */
length:{ length:{
/**Enable text length verification. */
enabled:boolean, enabled:boolean,
/**The minimum text input length. */
min:number, min:number,
/**The maximum text input length. */
max:number max:number
} }
} }
@@ -483,56 +583,98 @@ export class ODJsonConfig_DefaultQuestions extends ODJsonConfig {
*/ */
export class ODJsonConfig_DefaultTranscripts extends ODJsonConfig { export class ODJsonConfig_DefaultTranscripts extends ODJsonConfig {
declare data: { declare data: {
/**All general settings related to transcripts. */
general:{ general:{
/**Are transcripts enabled? */
enabled:boolean, enabled:boolean,
/**Enable sending the generated transcript in a channel. */
enableChannel:boolean, enableChannel:boolean,
/**Enable sending the generated transcript to the DM of the ticket creator. */
enableCreatorDM:boolean, enableCreatorDM:boolean,
/**Enable sending the generated transcript to the DM of the participants. */
enableParticipantDM:boolean, enableParticipantDM:boolean,
/**Enable sending the generated transcript to the DM of all admins which were active in the ticket. */
enableActiveAdminDM:boolean, enableActiveAdminDM:boolean,
/**Enable sending the generated transcript to the DM of all admins which were assigned to the ticket. */
enableEveryAdminDM:boolean, enableEveryAdminDM:boolean,
/**A discord channel id for the `"enableChannel"` setting. */
channel:string, channel:string,
/**Want to use text or HTML transcripts? */
mode:"html"|"text" mode:"html"|"text"
}, },
/**All settings related to the embed from the transcripts. (UNIMPLEMENTED!!) */
embedSettings:{ embedSettings:{
/**Unimplemented feature */
customColor:discord.ColorResolvable, customColor:discord.ColorResolvable,
/**Unimplemented feature */
listAllParticipants:boolean, listAllParticipants:boolean,
/**Unimplemented feature */
includeTicketStats:boolean includeTicketStats:boolean
}, },
/**The layout of the text transcripts. */
textTranscriptStyle:{ textTranscriptStyle:{
/**The layout/complexity of the text transcripts. */
layout:"simple"|"normal"|"detailed", layout:"simple"|"normal"|"detailed",
/**Include stats in the transcript. */
includeStats:boolean, includeStats:boolean,
/**Include user & message ids in the transcript. */
includeIds:boolean, includeIds:boolean,
/**Include embeds in the transcript. */
includeEmbeds:boolean, includeEmbeds:boolean,
/**Include files in the transcript. */
includeFiles:boolean, includeFiles:boolean,
/**Include bot messages in the transcript. */
includeBotMessages:boolean, includeBotMessages:boolean,
/**How to name the transcript file? */
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"`) */
customFileName:string customFileName:string
}, },
/**The layout of the HTML transcripts. */
htmlTranscriptStyle:{ htmlTranscriptStyle:{
/**Settings related to the background. */
background:{ background:{
/**Enable a custom background. */
enableCustomBackground:boolean, enableCustomBackground:boolean,
/**The background (hex) color. */
backgroundColor:string, backgroundColor:string,
/**The background image url. */
backgroundImage:string backgroundImage:string
}, },
/**Settings related to the header. */
header:{ header:{
/**Enable a custom header. */
enableCustomHeader:boolean, enableCustomHeader:boolean,
/**The background (hex) color of the header. */
backgroundColor:string, backgroundColor:string,
/**The deco color (horizontal line) of the header. */
decoColor:string, decoColor:string,
/**The text color of the header. */
textColor:string textColor:string
}, },
/**Settings related to the stats section. */
stats:{ stats:{
/**Enable a custom stats section. */
enableCustomStats:false, enableCustomStats:false,
/**The background color of the stats section. */
backgroundColor:string, backgroundColor:string,
/**The key text color of the stats section. */
keyTextColor:string, keyTextColor:string,
/**The value text color of the stats section. */
valueTextColor:string, valueTextColor:string,
/**The background color of the hide button in the stats section. */
hideBackgroundColor:string, hideBackgroundColor:string,
/**The text color of the hide button in the stats section. */
hideTextColor:string hideTextColor:string
}, },
/**Settings related to the favicon. */
favicon:{ favicon:{
/**Enable a custom background. */
enableCustomFavicon:boolean, enableCustomFavicon:boolean,
/**A link to the custom favicon. */
imageUrl:string imageUrl:string
} }
} }