Added new API comments (part 4)
Added new API comments (part 4)
This commit is contained in:
@@ -52,22 +52,28 @@ export class ODConfigManager_Default extends ODConfigManager {
|
|||||||
* This interface is an object which has all properties for the status object in the `general.json` config!
|
* This interface is an object which has all properties for the status object in the `general.json` config!
|
||||||
*/
|
*/
|
||||||
export interface ODJsonConfig_DefaultStatusType {
|
export interface ODJsonConfig_DefaultStatusType {
|
||||||
|
/**Is the status enabled? */
|
||||||
enabled:boolean,
|
enabled:boolean,
|
||||||
|
/**The type of status (e.g. playing, listening, custom, ...) */
|
||||||
type:Exclude<ODClientActivityType,false>,
|
type:Exclude<ODClientActivityType,false>,
|
||||||
|
/**The text for the status. */
|
||||||
text:string,
|
text:string,
|
||||||
|
/**The status of the bot (e.g. online, invisible, idle, do not disturb) */
|
||||||
status:ODClientActivityStatus
|
status:ODClientActivityStatus
|
||||||
}
|
}
|
||||||
|
|
||||||
/**## ODJsonConfig_DefaultMessageSettingsType `interface`
|
/**## ODJsonConfig_DefaultMessageSettingsType `interface`
|
||||||
* This interface is an object which has all properties for the system/messages/... object in the `general.json` config!
|
* This interface is an object which has all properties for the "system"."messages".... object in the `general.json` config!
|
||||||
*/
|
*/
|
||||||
export interface ODJsonConfig_DefaultMessageSettingsType {
|
export interface ODJsonConfig_DefaultMessageSettingsType {
|
||||||
|
/**Enable sending DM logs to the ticket creator for this action. */
|
||||||
dm:boolean,
|
dm:boolean,
|
||||||
|
/**Enable sending logsto the log channel for this action. */
|
||||||
logs:boolean
|
logs:boolean
|
||||||
}
|
}
|
||||||
|
|
||||||
/**## ODJsonConfig_DefaultCmdPermissionSettingsType `type`
|
/**## ODJsonConfig_DefaultCmdPermissionSettingsType `type`
|
||||||
* This type is a collection of command permission settings for the system/permissions/... object in the `general.json` config!
|
* This type is a collection of command permission settings for the "system"."permissions".... object in the `general.json` config!
|
||||||
*/
|
*/
|
||||||
export type ODJsonConfig_DefaultCmdPermissionSettingsType = "admin"|"everyone"|"none"|string
|
export type ODJsonConfig_DefaultCmdPermissionSettingsType = "admin"|"everyone"|"none"|string
|
||||||
|
|
||||||
@@ -79,56 +85,96 @@ export type ODJsonConfig_DefaultCmdPermissionSettingsType = "admin"|"everyone"|"
|
|||||||
*/
|
*/
|
||||||
export class ODJsonConfig_DefaultGeneral extends ODJsonConfig {
|
export class ODJsonConfig_DefaultGeneral extends ODJsonConfig {
|
||||||
declare data: {
|
declare data: {
|
||||||
|
/**This object contains a few URLs and metadata for the config. */
|
||||||
_INFO:{
|
_INFO:{
|
||||||
|
/**A link to the Open Ticket documentation. */
|
||||||
support:string,
|
support:string,
|
||||||
|
/**A link to the DJdj Development discord server. */
|
||||||
discord:string,
|
discord:string,
|
||||||
|
/**The version of Open Ticket this config is compatible with. */
|
||||||
version:string
|
version:string
|
||||||
},
|
},
|
||||||
|
|
||||||
|
/**The token of the bot. (Empty when using `tokenFromENV`) */
|
||||||
token:string,
|
token:string,
|
||||||
|
/**Use the token from the `.env` file as `TOKEN=xxxxx`. */
|
||||||
tokenFromENV:boolean,
|
tokenFromENV:boolean,
|
||||||
|
|
||||||
|
/**The main (hex) color used in almost every embed in the bot. */
|
||||||
mainColor:discord.ColorResolvable,
|
mainColor:discord.ColorResolvable,
|
||||||
|
/**The language to use. Can be the id of the language or the id without the prefix when using `openticket:...`. */
|
||||||
language:string,
|
language:string,
|
||||||
|
/**The prefix used in all text-commands. */
|
||||||
prefix:string,
|
prefix:string,
|
||||||
|
/**The id of the discord server where the bot is used. */
|
||||||
serverId:string,
|
serverId:string,
|
||||||
|
/**A list of discord role ids which are able to access all tickets & commands. */
|
||||||
globalAdmins:string[],
|
globalAdmins:string[],
|
||||||
|
|
||||||
|
/**Are slash commands enabled? */
|
||||||
slashCommands:boolean,
|
slashCommands:boolean,
|
||||||
|
/**Are text commands enabled? */
|
||||||
textCommands:boolean,
|
textCommands:boolean,
|
||||||
|
|
||||||
|
/**All settings related to the status of the bot. */
|
||||||
status:ODJsonConfig_DefaultStatusType,
|
status:ODJsonConfig_DefaultStatusType,
|
||||||
|
|
||||||
|
/**All settings related to the ticket system. */
|
||||||
system:{
|
system:{
|
||||||
|
/**Remove all participants (except admins) from the ticket when it's closed. */
|
||||||
removeParticipantsOnClose:boolean,
|
removeParticipantsOnClose:boolean,
|
||||||
|
/**Reply with an ephemeral message when a ticket is created. */
|
||||||
replyOnTicketCreation:boolean,
|
replyOnTicketCreation:boolean,
|
||||||
|
/**Reply with an ephemeral message when reaction roles are changed. */
|
||||||
replyOnReactionRole:boolean,
|
replyOnReactionRole:boolean,
|
||||||
|
/**Use a translated config checker in the console. */
|
||||||
useTranslatedConfigChecker:boolean,
|
useTranslatedConfigChecker:boolean,
|
||||||
|
/**Prefer slash-commands over text-commands when displaying them in menu's and messages. */
|
||||||
preferSlashOverText:boolean,
|
preferSlashOverText:boolean,
|
||||||
|
/**Reply with "unknown command" when the prefix is used without a valid command. */
|
||||||
sendErrorOnUnknownCommand:boolean,
|
sendErrorOnUnknownCommand:boolean,
|
||||||
|
/**Display the question fields (in a ticket message) in code blocks. */
|
||||||
questionFieldsInCodeBlock:boolean,
|
questionFieldsInCodeBlock:boolean,
|
||||||
|
/**Disable the (✅❌) buttons and directly run the action. */
|
||||||
disableVerifyBars:boolean,
|
disableVerifyBars:boolean,
|
||||||
|
/**Display error embeds/messages with red instead of the default bot color. */
|
||||||
useRedErrorEmbeds:boolean,
|
useRedErrorEmbeds:boolean,
|
||||||
|
/**The emoji style used in the bot. This will affect all embeds, titles & messages in the bot. */
|
||||||
emojiStyle:"before"|"after"|"double"|"disabled",
|
emojiStyle:"before"|"after"|"double"|"disabled",
|
||||||
|
|
||||||
|
|
||||||
|
/**Enable/disable the ticket claim & unclaim button in the ticket message. */
|
||||||
enableTicketClaimButtons:boolean,
|
enableTicketClaimButtons:boolean,
|
||||||
|
/**Enable/disable the ticket close & re-open button in the ticket message. */
|
||||||
enableTicketCloseButtons:boolean,
|
enableTicketCloseButtons:boolean,
|
||||||
|
/**Enable/disable the ticket pin & unpin button in the ticket message. */
|
||||||
enableTicketPinButtons:boolean,
|
enableTicketPinButtons:boolean,
|
||||||
|
/**Enable/disable the ticket delete button in the ticket message. */
|
||||||
enableTicketDeleteButtons:boolean,
|
enableTicketDeleteButtons:boolean,
|
||||||
|
/**Enable/disable the "with reason" button for all actions in the ticket message. */
|
||||||
enableTicketActionWithReason:boolean,
|
enableTicketActionWithReason:boolean,
|
||||||
|
/**Enable/disable the delete without transcript feature (button & /delete command). */
|
||||||
enableDeleteWithoutTranscript:boolean,
|
enableDeleteWithoutTranscript:boolean,
|
||||||
|
|
||||||
|
/**All settings related to the log channel. */
|
||||||
logs:{
|
logs:{
|
||||||
|
/**Enable logging. Individual actions should still be added via the `"system"."messages"..."logs"` */
|
||||||
enabled:boolean,
|
enabled:boolean,
|
||||||
|
/**The channel to send logs to. */
|
||||||
channel:string
|
channel:string
|
||||||
},
|
},
|
||||||
|
|
||||||
|
/**All settings related to global ticket limits. */
|
||||||
limits:{
|
limits:{
|
||||||
|
/**Enable global ticket limits. */
|
||||||
enabled:boolean,
|
enabled:boolean,
|
||||||
|
/**The maximum amount of tickets that are allowed in the server at the same time. */
|
||||||
globalMaximum:number,
|
globalMaximum:number,
|
||||||
|
/**The maximum amount of tickets that a user is allowed to create at the same time. */
|
||||||
userMaximum:number
|
userMaximum:number
|
||||||
},
|
},
|
||||||
|
|
||||||
|
/**Configure permissions for all Open Ticket commands & actions. */
|
||||||
permissions:{
|
permissions:{
|
||||||
help:ODJsonConfig_DefaultCmdPermissionSettingsType,
|
help:ODJsonConfig_DefaultCmdPermissionSettingsType,
|
||||||
panel:ODJsonConfig_DefaultCmdPermissionSettingsType,
|
panel:ODJsonConfig_DefaultCmdPermissionSettingsType,
|
||||||
@@ -151,6 +197,7 @@ export class ODJsonConfig_DefaultGeneral extends ODJsonConfig {
|
|||||||
autodelete:ODJsonConfig_DefaultCmdPermissionSettingsType
|
autodelete:ODJsonConfig_DefaultCmdPermissionSettingsType
|
||||||
},
|
},
|
||||||
|
|
||||||
|
/**Configure dm & log messages for all Open Ticket commands & actions. */
|
||||||
messages:{
|
messages:{
|
||||||
creation:ODJsonConfig_DefaultMessageSettingsType,
|
creation:ODJsonConfig_DefaultMessageSettingsType,
|
||||||
closing:ODJsonConfig_DefaultMessageSettingsType,
|
closing:ODJsonConfig_DefaultMessageSettingsType,
|
||||||
@@ -174,22 +221,32 @@ export class ODJsonConfig_DefaultGeneral extends ODJsonConfig {
|
|||||||
* This interface is an object which has all basic properties for options in the `options.json` config!
|
* This interface is an object which has all basic properties for options in the `options.json` config!
|
||||||
*/
|
*/
|
||||||
export interface ODJsonConfig_DefaultOptionType {
|
export interface ODJsonConfig_DefaultOptionType {
|
||||||
|
/**The id of this option. */
|
||||||
id:string,
|
id:string,
|
||||||
|
/**The name of this option. */
|
||||||
name:string,
|
name:string,
|
||||||
|
/**The description of this option. */
|
||||||
description:string,
|
description:string,
|
||||||
|
/**The type of this option. This type also determines the other option-specific variables. */
|
||||||
type:"ticket"|"website"|"role",
|
type:"ticket"|"website"|"role",
|
||||||
|
/**All settings related to the button for the 3 option types. */
|
||||||
button:{
|
button:{
|
||||||
|
/**The emoji of the button. (can also be empty) */
|
||||||
emoji:string,
|
emoji:string,
|
||||||
|
/**The label of the button (can also be empty) */
|
||||||
label:string
|
label:string
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**## ODJsonConfig_DefaultOptionButtonSettingsType `interface`
|
/**## ODJsonConfig_DefaultOptionButtonSettingsType `interface`
|
||||||
* This interface is an object which has all button settings for ticket options in the `options.json` config!
|
* This interface is an object which has all button settings for ticket & reaction role options in the `options.json` config!
|
||||||
*/
|
*/
|
||||||
export interface ODJsonConfig_DefaultOptionButtonSettingsType {
|
export interface ODJsonConfig_DefaultOptionButtonSettingsType {
|
||||||
|
/**The emoji of the button. (can also be empty) */
|
||||||
emoji:string,
|
emoji:string,
|
||||||
|
/**The label of the button (can also be empty) */
|
||||||
label:string,
|
label:string,
|
||||||
|
/**The color of the button (not available in options with the 'website' type!) */
|
||||||
color:ODValidButtonColor
|
color:ODValidButtonColor
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -197,14 +254,27 @@ export interface ODJsonConfig_DefaultOptionButtonSettingsType {
|
|||||||
* This interface is an object which has all message embed settings for ticket options in the `options.json` config!
|
* This interface is an object which has all message embed settings for ticket options in the `options.json` config!
|
||||||
*/
|
*/
|
||||||
export interface ODJsonConfig_DefaultOptionEmbedSettingsType {
|
export interface ODJsonConfig_DefaultOptionEmbedSettingsType {
|
||||||
|
/**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,
|
||||||
|
|
||||||
|
/**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,
|
||||||
fields:{name:string, value:string, inline:boolean}[],
|
/**A list of fields displayed in the embed. */
|
||||||
|
fields:{
|
||||||
|
/**The name of this field. */
|
||||||
|
name:string,
|
||||||
|
/**The value of this field. => empty not allowed */
|
||||||
|
value:string,
|
||||||
|
inline:boolean
|
||||||
|
}[],
|
||||||
timestamp:boolean
|
timestamp:boolean
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user