Added new API comments (part 11)

This commit is contained in:
JasperAtSchool
2025-01-28 14:22:26 +01:00
parent 58fb7b7512
commit f6c70fa62a
31 changed files with 270 additions and 270 deletions
+2 -2
View File
@@ -6,7 +6,7 @@ import { ODWorkerManager, ODWorkerCallback, ODWorker } from "./worker"
import { ODDebugger } from "./console"
/**## ODActionImplementation `class`
* This is an open ticket action implementation.
* This is an Open Ticket action implementation.
*
* It is a basic implementation of the `ODWorkerManager` used by all `ODAction` classes.
*
@@ -28,7 +28,7 @@ export class ODActionImplementation<Source extends string,Params extends object,
}
/**## ODActionManager `class`
* This is an open ticket action manager.
* This is an Open Ticket action manager.
*
* It contains all Open Ticket actions. You can compare actions with some sort of "procedure".
* It's a complicated task that is divided into multiple functions.
+15 -15
View File
@@ -21,9 +21,9 @@ export type ODOptionalPromise<T> = T|Promise<T>
export type ODValidButtonColor = "gray"|"red"|"green"|"blue"
/**## ODValidId `type`
* This is a valid open ticket identifier. It can be an `ODId` or `string`!
* This is a valid Open Ticket identifier. It can be an `ODId` or `string`!
*
* You will see this type in many functions from open ticket.
* You will see this type in many functions from Open Ticket.
*/
export type ODValidId = string|ODId
@@ -41,7 +41,7 @@ export type ODValidJsonType = string|number|boolean|object|ODValidJsonType[]|nul
export type ODInterfaceWithPartialProperty<Interface,Key extends keyof Interface> = Omit<Interface,Key> & Partial<Pick<Interface,Key>>
/**## ODId `class`
* This is an open ticket identifier.
* This is an Open Ticket identifier.
*
* It can only contain the following characters: `a-z`, `A-Z`, `0-9`, `:`, `-` & `_`
*
@@ -99,7 +99,7 @@ export class ODId {
}
/**## ODManagerChangeHelper `class`
* This is an open ticket manager change helper.
* This is an Open Ticket manager change helper.
*
* It is used to let the "onChange" event in the `ODManager` class work.
* You can use this class when extending your own `ODManager`
@@ -124,7 +124,7 @@ export class ODManagerChangeHelper {
}
/**## ODManagerRedirectHelper `class`
* This is open ticket ticket manager redirect helper.
* This is Open Ticket ticket manager redirect helper.
*
* It is used to redirect a source to another source when the id isn't found.
*
@@ -163,7 +163,7 @@ export class ODManagerRedirectHelper {
}
/**## ODManagerData `class`
* This is open ticket manager data.
* This is Open Ticket manager data.
*
* It provides a template for all classes that are used in the `ODManager`.
*
@@ -190,7 +190,7 @@ export type ODManagerCallback<DataType extends ODManagerData> = (data:DataType)
export type ODManagerAddCallback<DataType extends ODManagerData> = (data:DataType, overwritten:boolean) => void
/**## ODManager `class`
* This is an open ticket manager.
* This is an Open Ticket manager.
*
* It can be used to store & manage classes based on their `ODId`.
* It is somewhat the same as the default JS `Map()`.
@@ -199,7 +199,7 @@ export type ODManagerAddCallback<DataType extends ODManagerData> = (data:DataTyp
* This class has many useful functions based on `ODId` (add, get, remove, getAll, getFiltered, exists, loopAll, ...)
*/
export class ODManager<DataType extends ODManagerData> extends ODManagerChangeHelper {
/**Alias to open ticket debugger. */
/**Alias to Open Ticket debugger. */
#debug?: ODDebugger
/**The message to send when debugging this manager. */
#debugname?: string
@@ -383,7 +383,7 @@ export class ODManager<DataType extends ODManagerData> extends ODManagerChangeHe
await cb(data,data.id)
}
}
/**Use the open ticket debugger in this manager for logs*/
/**Use the Open Ticket debugger in this manager for logs*/
useDebug(debug?:ODDebugger, debugname?:string){
this.#debug = debug
this.#debugname = debugname
@@ -403,7 +403,7 @@ export class ODManager<DataType extends ODManagerData> extends ODManagerChangeHe
}
/**## ODManagerWithSafety `class`
* This is an open ticket safe manager.
* This is an Open Ticket safe manager.
*
* It functions exactly the same as a normal `ODManager`, but it has 1 function extra!
* The `getSafe()` function will always return data, because when it doesn't find an id, it returns pre-configured backup data.
@@ -435,7 +435,7 @@ export class ODManagerWithSafety<DataType extends ODManagerData> extends ODManag
}
/**## ODVersionManager `class`
* A open ticket version manager.
* A Open Ticket version manager.
*
* It is used to manage different `ODVersion`'s from the bot. You will use it to check which version of the bot is used.
*/
@@ -446,11 +446,11 @@ export class ODVersionManager extends ODManager<ODVersion> {
}
/**## ODVersion `class`
* This is an open ticket version.
* This is an Open Ticket version.
*
* It has many features like comparing versions & checking if they are compatible.
*
* You can use it in your own plugin, but most of the time you will use it to check the open ticket version!
* You can use it in your own plugin, but most of the time you will use it to check the Open Ticket version!
*/
export class ODVersion extends ODManagerData {
/**The first number of the version (example: `v1.2.3` => `1`) */
@@ -726,7 +726,7 @@ export class ODEnvHelper {
/**## ODSystemError `class`
* A wrapper for the node.js `Error` class that makes the error look better in the console!
*
* This wrapper is made for open ticket system errors! **It can only be used by open ticket itself!**
* This wrapper is made for Open Ticket system errors! **It can only be used by Open Ticket itself!**
*/
export class ODSystemError extends Error {
/**This variable gets detected by the error handling system to know how to render it */
@@ -742,7 +742,7 @@ export class ODSystemError extends Error {
/**## ODPluginError `class`
* A wrapper for the node.js `Error` class that makes the error look better in the console!
*
* This wrapper is made for open ticket plugin errors! **It can only be used by plugins!**
* This wrapper is made for Open Ticket plugin errors! **It can only be used by plugins!**
*/
export class ODPluginError extends Error {
/**This variable gets detected by the error handling system to know how to render it */
+20 -20
View File
@@ -7,7 +7,7 @@ import { ODWorkerManager, ODWorkerCallback, ODWorker } from "./worker"
import { ODDebugger } from "./console"
/**## ODBuilderImplementation `class`
* This is an open ticket builder implementation.
* This is an Open Ticket builder implementation.
*
* It is a basic implementation of the `ODWorkerManager` used by all `ODBuilder` classes.
*
@@ -48,7 +48,7 @@ export class ODBuilderImplementation<Instance,Source extends string,Params,Build
}
/**## ODBuilderManager `class`
* This is an open ticket builder manager.
* This is an Open Ticket builder manager.
*
* It contains all Open Ticket builders. You can find messages, embeds, files & dropdowns, buttons & modals all here!
*
@@ -96,7 +96,7 @@ export interface ODComponentBuildResult {
}
/**## ODButtonManager `class`
* This is an open ticket button manager.
* This is an Open Ticket button manager.
*
* It contains all Open Ticket button builders. Here, you can add your own buttons or edit existing ones!
*
@@ -147,7 +147,7 @@ export interface ODButtonData {
}
/**## ODButtonInstance `class`
* This is an open ticket button instance.
* This is an Open Ticket button instance.
*
* It contains all properties & functions to build a button!
*/
@@ -201,7 +201,7 @@ export class ODButtonInstance {
}
/**## ODButton `class`
* This is an open ticket button builder.
* This is an Open Ticket button builder.
*
* With this class, you can create a button to use in a message.
* The only difference with normal buttons is that this one can be edited by Open Ticket plugins!
@@ -246,7 +246,7 @@ export class ODButton<Source extends string,Params> extends ODBuilderImplementat
}
/**## ODDropdownManager `class`
* This is an open ticket dropdown manager.
* This is an Open Ticket dropdown manager.
*
* It contains all Open Ticket dropdown builders. Here, you can add your own dropdowns or edit existing ones!
*
@@ -309,7 +309,7 @@ export interface ODDropdownData {
}
/**## ODDropdownInstance `class`
* This is an open ticket dropdown instance.
* This is an Open Ticket dropdown instance.
*
* It contains all properties & functions to build a dropdown!
*/
@@ -394,7 +394,7 @@ export class ODDropdownInstance {
}
/**## ODDropdown `class`
* This is an open ticket dropdown builder.
* This is an Open Ticket dropdown builder.
*
* With this class, you can create a dropdown to use in a message.
* The only difference with normal dropdowns is that this one can be edited by Open Ticket plugins!
@@ -500,7 +500,7 @@ export class ODDropdown<Source extends string,Params> extends ODBuilderImplement
}
/**## ODFileManager `class`
* This is an open ticket file manager.
* This is an Open Ticket file manager.
*
* It contains all Open Ticket file builders. Here, you can add your own files or edit existing ones!
*
@@ -544,7 +544,7 @@ export interface ODFileBuildResult {
}
/**## ODFileInstance `class`
* This is an open ticket file instance.
* This is an Open Ticket file instance.
*
* It contains all properties & functions to build a file!
*/
@@ -585,7 +585,7 @@ export class ODFileInstance {
}
/**## ODFile `class`
* This is an open ticket file builder.
* This is an Open Ticket file builder.
*
* With this class, you can create a file to use in a message.
* The only difference with normal files is that this one can be edited by Open Ticket plugins!
@@ -623,7 +623,7 @@ export class ODFile<Source extends string,Params> extends ODBuilderImplementatio
}
/**## ODEmbedManager `class`
* This is an open ticket embed manager.
* This is an Open Ticket embed manager.
*
* It contains all Open Ticket embed builders. Here, you can add your own embeds or edit existing ones!
*
@@ -686,7 +686,7 @@ export interface ODEmbedBuildResult {
}
/**## ODEmbedInstance `class`
* This is an open ticket embed instance.
* This is an Open Ticket embed instance.
*
* It contains all properties & functions to build an embed!
*/
@@ -786,7 +786,7 @@ export class ODEmbedInstance {
}
/**## ODEmbed `class`
* This is an open ticket embed builder.
* This is an Open Ticket embed builder.
*
* With this class, you can create a embed to use in a message.
* The only difference with normal embeds is that this one can be edited by Open Ticket plugins!
@@ -837,7 +837,7 @@ export class ODEmbed<Source extends string,Params> extends ODBuilderImplementati
}
/**## ODMessageManager `class`
* This is an open ticket message manager.
* This is an Open Ticket message manager.
*
* It contains all Open Ticket message builders. Here, you can add your own messages or edit existing ones!
*
@@ -899,7 +899,7 @@ export interface ODMessageBuildSentResult<InGuild extends boolean> {
}
/**## ODMessageInstance `class`
* This is an open ticket message instance.
* This is an Open Ticket message instance.
*
* It contains all properties & functions to build a message!
*/
@@ -1002,7 +1002,7 @@ export class ODMessageInstance {
}
/**## ODMessage `class`
* This is an open ticket message builder.
* This is an Open Ticket message builder.
*
* With this class, you can create a message to send in a discord channel.
* The only difference with normal messages is that this one can be edited by Open Ticket plugins!
@@ -1078,7 +1078,7 @@ export class ODMessage<Source extends string,Params> extends ODBuilderImplementa
}
/**## ODModalManager `class`
* This is an open ticket modal manager.
* This is an Open Ticket modal manager.
*
* It contains all Open Ticket modal builders. Here, you can add your own modals or edit existing ones!
*
@@ -1149,7 +1149,7 @@ export interface ODModalBuildResult {
}
/**## ODModalInstance `class`
* This is an open ticket modal instance.
* This is an Open Ticket modal instance.
*
* It contains all properties & functions to build a modal!
*/
@@ -1196,7 +1196,7 @@ export class ODModalInstance {
}
/**## ODModal `class`
* This is an open ticket modal builder.
* This is an Open Ticket modal builder.
*
* With this class, you can create a modal to use as response in interactions.
* The only difference with normal modals is that this one can be edited by Open Ticket plugins!
+27 -27
View File
@@ -15,9 +15,9 @@ export interface ODCheckerResult {
}
/**## ODCheckerManager `class`
* This is an open ticket checker manager.
* This is an Open Ticket checker manager.
*
* It manages all config checkers in the bot and allows plugins to access config checkers from open ticket & other plugins!
* It manages all config checkers in the bot and allows plugins to access config checkers from Open Ticket & other plugins!
*
* You can use this class to get/add a config checker (`ODChecker`) in your plugin!
* @example
@@ -93,7 +93,7 @@ export class ODCheckerManager extends ODManager<ODChecker> {
}
/**## ODCheckerStorage `class`
* This is an open ticket checker storage.
* This is an Open Ticket checker storage.
*
* It stores temporary data to share between config checkers!
* (e.g. The `messages.json` needs to access the `"id"` from `options.json`)
@@ -145,7 +145,7 @@ export class ODCheckerStorage {
}
/**## ODCheckerRenderer `class`
* This is an open ticket checker renderer.
* This is an Open Ticket checker renderer.
*
* It's responsible for rendering the config checker result in the console.
* This class doesn't provide any components! You need to create them by extending this class
@@ -169,7 +169,7 @@ export class ODCheckerRenderer {
}
/**## ODCheckerTranslationRegister `class`
* This is an open ticket checker translation register.
* This is an Open Ticket checker translation register.
*
* It's used to store & manage the translation for each message from the config checker!
* Most translations are stored by message id, but there are some exceptions like the additional text on the checker report.
@@ -227,7 +227,7 @@ export class ODCheckerTranslationRegister {
}
/**## ODCheckerFunction `class`
* This is an open ticket config checker function.
* This is an Open Ticket config checker function.
*
* It is a global function that will be executed after all config checkers. It can do additional checks for invalid/missing configurations.
* It's mostly used for things that need to be checked globally!
@@ -243,7 +243,7 @@ export class ODCheckerFunction extends ODManagerData {
}
/**## ODCheckerFunctionManager `class`
* This is an open ticket config checker function manager.
* This is an Open Ticket config checker function manager.
*
* It manages all `ODCheckerFunction`'s and it has some extra shortcuts for frequently used methods.
*/
@@ -293,7 +293,7 @@ export class ODCheckerFunctionManager extends ODManager<ODCheckerFunction> {
export type ODCheckerLocationTrace = (string|number)[]
/**## ODChecker `class`
* This is an open ticket config checker.
* This is an Open Ticket config checker.
*
* It checks a specific config file for invalid/missing configurations. This data can then be used to show to the user what's wrong!
* You can check for example if a string is longer/shorter than a certain amount of characters & more!
@@ -405,7 +405,7 @@ export interface ODCheckerStructureOptions {
}
/**## ODCheckerStructure `class`
* This is an open ticket config checker structure.
* This is an Open Ticket config checker structure.
*
* This class will check for a single variable in a config file, customise it in the settings!
* If you want prebuilt checkers (for strings, booleans, numbers, ...), check the other `ODCheckerStructure`'s!
@@ -423,7 +423,7 @@ export class ODCheckerStructure {
this.options = options
}
/**Check a variable if it matches all settings in this checker. This function is automatically executed by open ticket! */
/**Check a variable if it matches all settings in this checker. This function is automatically executed by Open Ticket! */
check(checker:ODChecker, value:ODValidJsonType, locationTrace:ODCheckerLocationTrace): boolean {
if (typeof this.options.custom != "undefined"){
return this.options.custom(checker,value,locationTrace,this.id,(this.options.docs ?? null))
@@ -440,7 +440,7 @@ export interface ODCheckerObjectStructureOptions extends ODCheckerStructureOptio
}
/**## ODCheckerObjectStructure `class`
* This is an open ticket config checker structure.
* This is an Open Ticket config checker structure.
*
* This class will check for an object variable in a config file, customise it in the settings!
* A checker for the children can be set in the settings.
@@ -514,7 +514,7 @@ export interface ODCheckerStringStructureOptions extends ODCheckerStructureOptio
}
/**## ODCheckerStringStructure `class`
* This is an open ticket config checker structure.
* This is an Open Ticket config checker structure.
*
* This class will check for a string variable in a config file, customise it in the settings!
*/
@@ -599,7 +599,7 @@ export interface ODCheckerNumberStructureOptions extends ODCheckerStructureOptio
}
/**## ODCheckerNumberStructure `class`
* This is an open ticket config checker structure.
* This is an Open Ticket config checker structure.
*
* This class will check for a number variable in a config file, customise it in the settings!
*/
@@ -681,7 +681,7 @@ export interface ODCheckerBooleanStructureOptions extends ODCheckerStructureOpti
}
/**## ODCheckerBooleanStructure `class`
* This is an open ticket config checker structure.
* This is an Open Ticket config checker structure.
*
* This class will check for a boolean variable in a config file, customise it in the settings!
*/
@@ -732,7 +732,7 @@ export interface ODCheckerArrayStructureOptions extends ODCheckerStructureOption
}
/**## ODCheckerArrayStructure `class`
* This is an open ticket config checker structure.
* This is an Open Ticket config checker structure.
*
* This class will check for an array variable in a config file, customise it in the settings!
*/
@@ -835,7 +835,7 @@ export interface ODCheckerNullStructureOptions extends ODCheckerStructureOptions
}
/**## ODCheckerNullStructure `class`
* This is an open ticket config checker structure.
* This is an Open Ticket config checker structure.
*
* This class will check for a null variable in a config file, customise it in the settings!
*/
@@ -885,7 +885,7 @@ export interface ODCheckerTypeSwitchStructureOptions extends ODCheckerStructureO
}
/**## ODCheckerTypeSwitchStructure `class`
* This is an open ticket config checker structure.
* This is an Open Ticket config checker structure.
*
* This class will switch checkers based on the type of the variable in a config file, customise it in the settings!
*/
@@ -948,7 +948,7 @@ export interface ODCheckerObjectSwitchStructureOptions extends ODCheckerStructur
}
/**## ODCheckerObjectSwitchStructure `class`
* This is an open ticket config checker structure.
* This is an Open Ticket config checker structure.
*
* This class will switch object checkers based on a variable match in one of the objects, customise it in the settings!
*/
@@ -1011,7 +1011,7 @@ export interface ODCheckerEnabledObjectStructureOptions extends ODCheckerStructu
}
/**## ODCheckerEnabledObjectStructure `class`
* This is an open ticket config checker structure.
* This is an Open Ticket config checker structure.
*
* This class will enable an object checker based on a variable match in the object, customise it in the settings!
*/
@@ -1049,7 +1049,7 @@ export class ODCheckerEnabledObjectStructure extends ODCheckerStructure {
}
/**## ODCheckerCustomStructure_DiscordId `class`
* This is an open ticket custom checker structure.
* This is an Open Ticket custom checker structure.
*
* This class extends a primitive config checker & adds another layer of checking in the `custom` function.
* You can compare it to a blueprint for a specific checker.
@@ -1089,7 +1089,7 @@ export class ODCheckerCustomStructure_DiscordId extends ODCheckerStringStructure
}
/**## ODCheckerCustomStructure_DiscordIdArray `class`
* This is an open ticket custom checker structure.
* This is an Open Ticket custom checker structure.
*
* This class extends a primitive config checker & adds another layer of checking in the `custom` function.
* You can compare it to a blueprint for a specific checker.
@@ -1113,7 +1113,7 @@ export class ODCheckerCustomStructure_DiscordIdArray extends ODCheckerArrayStruc
}
/**## ODCheckerCustomStructure_DiscordToken `class`
* This is an open ticket custom checker structure.
* This is an Open Ticket custom checker structure.
*
* This class extends a primitive config checker & adds another layer of checking in the `custom` function.
* You can compare it to a blueprint for a specific checker.
@@ -1138,7 +1138,7 @@ export class ODCheckerCustomStructure_DiscordToken extends ODCheckerStringStruct
}
/**## ODCheckerCustomStructure_DiscordToken `class`
* This is an open ticket custom checker structure.
* This is an Open Ticket custom checker structure.
*
* This class extends a primitive config checker & adds another layer of checking in the `custom` function.
* You can compare it to a blueprint for a specific checker.
@@ -1172,7 +1172,7 @@ export class ODCheckerCustomStructure_HexColor extends ODCheckerStringStructure
}
/**## ODCheckerCustomStructure_EmojiString `class`
* This is an open ticket custom checker structure.
* This is an Open Ticket custom checker structure.
*
* This class extends a primitive config checker & adds another layer of checking in the `custom` function.
* You can compare it to a blueprint for a specific checker.
@@ -1239,7 +1239,7 @@ export interface ODCheckerCustomStructureOptions_UrlString {
}
/**## ODCheckerCustomStructure_UrlString `class`
* This is an open ticket custom checker structure.
* This is an Open Ticket custom checker structure.
*
* This class extends a primitive config checker & adds another layer of checking in the `custom` function.
* You can compare it to a blueprint for a specific checker.
@@ -1343,7 +1343,7 @@ export class ODCheckerCustomStructure_UrlString extends ODCheckerStringStructure
}
/**## ODCheckerCustomStructure_UniqueId `class`
* This is an open ticket custom checker structure.
* This is an Open Ticket custom checker structure.
*
* This class extends a primitive config checker & adds another layer of checking in the `custom` function.
* You can compare it to a blueprint for a specific checker.
@@ -1382,7 +1382,7 @@ export class ODCheckerCustomStructure_UniqueId extends ODCheckerStringStructure
}
/**## ODCheckerCustomStructure_UniqueIdArray `class`
* This is an open ticket custom checker structure.
* This is an Open Ticket custom checker structure.
*
* This class extends a primitive config checker & adds another layer of checking in the `custom` function.
* You can compare it to a blueprint for a specific checker.
+11 -11
View File
@@ -26,14 +26,14 @@ export type ODClientPartials = ("User"|"Channel"|"GuildMember"|"Message"|"Reacti
export type ODClientPermissions = ("CreateInstantInvite"|"KickMembers"|"BanMembers"|"Administrator"|"ManageChannels"|"ManageGuild"|"AddReactions"|"ViewAuditLog"|"PrioritySpeaker"|"Stream"|"ViewChannel"|"SendMessages"|"SendTTSMessages"|"ManageMessages"|"EmbedLinks"|"AttachFiles"|"ReadMessageHistory"|"MentionEveryone"|"UseExternalEmojis"|"ViewGuildInsights"|"Connect"|"Speak"|"MuteMembers"|"DeafenMembers"|"MoveMembers"|"UseVAD"|"ChangeNickname"|"ManageNicknames"|"ManageRoles"|"ManageWebhooks"|"ManageGuildExpressions"|"UseApplicationCommands"|"RequestToSpeak"|"ManageEvents"|"ManageThreads"|"CreatePublicThreads"|"CreatePrivateThreads"|"UseExternalStickers"|"SendMessagesInThreads"|"UseEmbeddedActivities"|"ModerateMembers"|"ViewCreatorMonetizationAnalytics"|"UseSoundboard"|"UseExternalSounds"|"SendVoiceMessages")
/**## ODClientManager `class`
* This is an open ticket client manager.
* This is an Open Ticket client manager.
*
* It is responsible for managing the discord.js client. Here, you can set the status, register slash commands and much more!
*
* If you want, you can also listen for custom events on the `ODClientManager.client` variable (`discord.Client`)
*/
export class ODClientManager {
/**Alias to open ticket debugger. */
/**Alias to Open Ticket debugger. */
#debug: ODDebugger
/**List of required bot intents. Add intents to this list using the `onClientLoad` event. */
@@ -68,7 +68,7 @@ export class ODClientManager {
/**The main server of the bot. Provided by serverId in the config */
mainServer: discord.Guild|null = null
/**(❌ DO NOD OVERWRITE ❌) Internal open ticket function to continue the startup when the client is ready! */
/**(❌ DO NOD OVERWRITE ❌) Internal Open Ticket function to continue the startup when the client is ready! */
readyListener: (() => Promise<void>)|null = null
/**The status manager is responsible for setting the bot status. */
activity: ODClientActivityManager
@@ -333,14 +333,14 @@ export type ODClientActivityStatus = ("online"|"invisible"|"idle"|"dnd")
/**## ODClientActivityManager `class`
* This is an open ticket client activity manager.
* This is an Open Ticket client activity manager.
*
* It's responsible for managing the client status. Here, you can set the activity & status of the bot.
*
* It also has a built-in refresh function, so the status will refresh every 10 minutes to keep it visible.
*/
export class ODClientActivityManager {
/**Alias to open ticket debugger. */
/**Alias to Open Ticket debugger. */
#debug: ODDebugger
/**Copy of discord.js client */
@@ -765,14 +765,14 @@ export type ODSlashCommandRegisteredResult = {
}
/**## ODSlashCommandManager `class`
* This is an open ticket client slash manager.
* This is an Open Ticket client slash manager.
*
* It's responsible for managing all the slash commands from the client.
*
* Here, you can add & remove slash commands & the bot will do the (de)registering.
*/
export class ODSlashCommandManager extends ODManager<ODSlashCommand> {
/**Alias to open ticket debugger. */
/**Alias to Open Ticket debugger. */
#debug: ODDebugger
/**Refrerence to discord.js client. */
@@ -933,7 +933,7 @@ export class ODSlashCommandManager extends ODManager<ODSlashCommand> {
export type ODSlashCommandUpdateFunction = (command:ODSlashCommandUniversalCommand) => boolean
/**## ODSlashCommand `class`
* This is an open ticket slash command.
* This is an Open Ticket slash command.
*
* When registered, you can listen for this command using the `ODCommandResponder`. The advantages of using this class for creating a slash command are:
* - automatic option parsing (even for channels, users, roles & mentions)!
@@ -1106,7 +1106,7 @@ export interface ODTextCommandBuilder {
}
/**## ODTextCommand `class`
* This is an open ticket text command.
* This is an Open Ticket text command.
*
* When registered, you can listen for this command using the `ODCommandResponder`. The advantages of using this class for creating a text command are:
* - automatic option parsing (even for channels, users, roles & mentions)!
@@ -1263,14 +1263,14 @@ export type ODTextCommandError = (
export type ODTextCommandErrorCallback = (error:ODTextCommandError) => void
/**## ODTextCommandManager `class`
* This is an open ticket client text manager.
* This is an Open Ticket client text manager.
*
* It's responsible for managing all the text commands from the client.
*
* Here, you can add & remove text commands & the bot will do the (de)registering.
*/
export class ODTextCommandManager extends ODManager<ODTextCommand> {
/**Alias to open ticket debugger. */
/**Alias to Open Ticket debugger. */
#debug: ODDebugger
/**Copy of discord.js client. */
manager: ODClientManager
+2 -2
View File
@@ -6,7 +6,7 @@ import { ODDebugger } from "./console"
/**## ODCode `class`
* This is an open ticket code runner.
* This is an Open Ticket code runner.
*
* Using this, you're able to execute a function just before the startup screen. (90% of the code is already loaded)
* You can also specify a priority to change the execution order.
@@ -31,7 +31,7 @@ export class ODCode extends ODManagerData {
}
/**## ODCodeManager `class`
* This is an open ticket code manager.
* This is an Open Ticket code manager.
*
* It manages & executes `ODCode`'s in the correct order.
*
+3 -3
View File
@@ -7,7 +7,7 @@ import { ODDebugger } from "./console"
import fs from "fs"
/**## ODConfigManager `class`
* This is an open ticket config manager.
* This is an Open Ticket config manager.
*
* It manages all config files in the bot and allows plugins to access config files from Open Ticket & other plugins!
*
@@ -30,7 +30,7 @@ export class ODConfigManager extends ODManager<ODConfig> {
}
/**## ODConfig `class`
* This is an open ticket config helper.
* This is an Open Ticket config helper.
* This class doesn't do anything at all, it just gives a template & basic methods for a config. Use `ODJsonConfig` instead!
*
* You can use this class if you want to create your own config implementation (e.g. `yml`, `xml`,...)!
@@ -55,7 +55,7 @@ export class ODConfig extends ODManagerData {
}
/**## ODJsonConfig `class`
* This is an open ticket JSON config.
* This is an Open Ticket JSON config.
* You can use this class to get & edit variables from the config files or to create your own JSON config!
* @example
* //create a config from: ./config/test.json with the id "some-config"
+17 -17
View File
@@ -25,7 +25,7 @@ export interface ODConsoleMessageParam {
}
/**## ODConsoleMessage `class`
* This is an open ticket console message.
* This is an Open Ticket console message.
*
* It is used to create beautiful & styled logs in the console with a prefix, message & parameters.
* It also has full color support using `ansis` and parameters are parsed for you!
@@ -117,7 +117,7 @@ export class ODConsoleMessage {
}
/**## ODConsoleInfoMessage `class`
* This is an open ticket console info message.
* This is an Open Ticket console info message.
*
* It is the same as a normal `ODConsoleMessage`, but it has a predefined prefix & color scheme for the "INFO" messages!
*/
@@ -128,7 +128,7 @@ export class ODConsoleInfoMessage extends ODConsoleMessage {
}
/**## ODConsoleSystemMessage `class`
* This is an open ticket console system message.
* This is an Open Ticket console system message.
*
* It is the same as a normal `ODConsoleMessage`, but it has a predefined prefix & color scheme for the "SYSTEM" messages!
*/
@@ -139,7 +139,7 @@ export class ODConsoleSystemMessage extends ODConsoleMessage {
}
/**## ODConsolePluginMessage `class`
* This is an open ticket console plugin message.
* This is an Open Ticket console plugin message.
*
* It is the same as a normal `ODConsoleMessage`, but it has a predefined prefix & color scheme for the "PLUGIN" messages!
*/
@@ -150,7 +150,7 @@ export class ODConsolePluginMessage extends ODConsoleMessage {
}
/**## ODConsoleDebugMessage `class`
* This is an open ticket console debug message.
* This is an Open Ticket console debug message.
*
* It is the same as a normal `ODConsoleMessage`, but it has a predefined prefix & color scheme for the "DEBUG" messages!
*/
@@ -161,7 +161,7 @@ export class ODConsoleDebugMessage extends ODConsoleMessage {
}
/**## ODConsoleWarningMessage `class`
* This is an open ticket console warning message.
* This is an Open Ticket console warning message.
*
* It is the same as a normal `ODConsoleMessage`, but it has a predefined prefix & color scheme for the "WARNING" messages!
*/
@@ -172,7 +172,7 @@ export class ODConsoleWarningMessage extends ODConsoleMessage {
}
/**## ODConsoleErrorMessage `class`
* This is an open ticket console error message.
* This is an Open Ticket console error message.
*
* It is the same as a normal `ODConsoleMessage`, but it has a predefined prefix & color scheme for the "ERROR" messages!
*/
@@ -183,7 +183,7 @@ export class ODConsoleErrorMessage extends ODConsoleMessage {
}
/**## ODError `class`
* This is an open ticket error.
* This is an Open Ticket error.
*
* It is used to render and log Node.js errors & crashes in a styled way to the console & `otdebug.txt` file!
*/
@@ -227,7 +227,7 @@ export class ODError {
export type ODConsoleMessageTypes = "info"|"system"|"plugin"|"debug"|"warning"|"error"
/**## ODConsoleManager `class`
* This is the open ticket console manager.
* This is the Open Ticket console manager.
*
* It handles the entire console system of Open Ticket. It's also the place where you need to log `ODConsoleMessage`'s.
* This manager keeps a short history of messages sent to the console which is configurable by plugins.
@@ -285,7 +285,7 @@ export class ODConsoleManager {
}
/**## ODDebugFileManager `class`
* This is the open ticket debug file manager.
* This is the Open Ticket debug file manager.
*
* It manages the Open Ticket debug file (`otdebug.txt`) which keeps a history of all system logs.
* There are even internal logs that aren't logged to the console which are available in this file!
@@ -398,7 +398,7 @@ export class ODDebugFileManager {
}
/**## ODDebugger `class`
* This is the open ticket debugger.
* This is the Open Ticket debugger.
*
* It is a simple wrapper around the `ODConsoleManager` to handle debugging (primarily for `ODManagers`).
* Messages created using this debugger are only logged to the debug file unless specified otherwise.
@@ -408,7 +408,7 @@ export class ODDebugFileManager {
* Using this system, all additions & removals inside a manager are logged to the debug file. This makes searching for errors a lot easier!
*/
export class ODDebugger {
/**An alias to the open ticket console manager. */
/**An alias to the Open Ticket console manager. */
console: ODConsoleManager
/**When enabled, debug logs are also shown in the console. */
visible: boolean = false
@@ -475,7 +475,7 @@ export interface ODLiveStatusSourceData {
}
/**## ODLiveStatusSource `class`
* This is the open ticket livestatus source.
* This is the Open Ticket livestatus source.
*
* It is an empty template for a livestatus source.
* By default, you should use `ODLiveStatusUrlSource` or `ODLiveStatusFileSource`,
@@ -526,7 +526,7 @@ export class ODLiveStatusSource extends ODManagerData {
}
/**## ODLiveStatusFileSource `class`
* This is the open ticket livestatus file source.
* This is the Open Ticket livestatus file source.
*
* It is a LiveStatus source that will read the data from a local file.
*
@@ -545,7 +545,7 @@ export class ODLiveStatusFileSource extends ODLiveStatusSource {
}
/**## ODLiveStatusUrlSource `class`
* This is the open ticket livestatus url source.
* This is the Open Ticket livestatus url source.
*
* It is a LiveStatus source that will read the data from a http URL (json file).
*
@@ -579,7 +579,7 @@ export class ODLiveStatusUrlSource extends ODLiveStatusSource {
}
/**## ODLiveStatusManager `class`
* This is the open ticket livestatus manager.
* This is the Open Ticket livestatus manager.
*
* It manages all LiveStatus sources and has the renderer for all LiveStatus messages.
*
@@ -611,7 +611,7 @@ export class ODLiveStatusManager extends ODManager<ODLiveStatusSource> {
}
/**## ODLiveStatusRenderer `class`
* This is the open ticket livestatus renderer.
* This is the Open Ticket livestatus renderer.
*
* It's responsible for rendering all LiveStatus messages to the console.
*/
+7 -7
View File
@@ -5,7 +5,7 @@ import { ODId, ODValidId, ODManager, ODSystemError, ODManagerData } from "./base
import { ODDebugger } from "./console"
/**## ODCooldownManager `class`
* This is an open ticket cooldown manager.
* This is an Open Ticket cooldown manager.
*
* It is responsible for managing all cooldowns in Open Ticket. An example of this is the ticket creation cooldown.
*
@@ -24,7 +24,7 @@ export class ODCooldownManager extends ODManager<ODCooldown<object>> {
}
/**## ODCooldownData `class`
* This is open ticket cooldown data.
* This is Open Ticket cooldown data.
*
* It contains the instance of an active cooldown (e.g. for a user). It is handled by the cooldown itself.
*/
@@ -42,7 +42,7 @@ export class ODCooldownData<Data extends object> extends ODManagerData {
}
/**## ODCooldown `class`
* This is an open ticket cooldown.
* This is an Open Ticket cooldown.
*
* It doesn't do anything on it's own, but it provides the methods that are used to interact with a cooldown.
* This class can be extended from to create a working cooldown.
@@ -77,7 +77,7 @@ export class ODCooldown<Data extends object> extends ODManagerData {
}
/**## ODCounterCooldown `class`
* This is an open ticket counter cooldown.
* This is an Open Ticket counter cooldown.
*
* It is is a cooldown based on a counter. When the number exceeds the limit, the cooldown is activated.
* The number will automatically be decreased with a set amount & interval.
@@ -154,7 +154,7 @@ export class ODCounterCooldown extends ODCooldown<{value:number}> {
}
/**## ODIncrementalCounterCooldown `class`
* This is an open ticket incremental counter cooldown.
* This is an Open Ticket incremental counter cooldown.
*
* It is is a cooldown based on an incremental counter. It is exactly the same as the normal counter,
* with the only difference being that it still increments when the limit is already exeeded.
@@ -232,7 +232,7 @@ export class ODIncrementalCounterCooldown extends ODCooldown<{value:number}> {
}
/**## ODTimeoutCooldown `class`
* This is an open ticket timeout cooldown.
* This is an Open Ticket timeout cooldown.
*
* It is a cooldown based on a timer. When triggered/updated, the cooldown is activated for the set amount of time.
* After the timer has timed out, the cooldown will be deleted.
@@ -288,7 +288,7 @@ export class ODTimeoutCooldown extends ODCooldown<{date:number}> {
}
/**## ODIncrementalTimeoutCooldown `class`
* This is an open ticket incremental timeout cooldown.
* This is an Open Ticket incremental timeout cooldown.
*
* It is is a cooldown based on an incremental timer. It is exactly the same as the normal timer,
* with the only difference being that it adds additional time when triggered/updated while the cooldown is already active.
+4 -4
View File
@@ -8,7 +8,7 @@ import { ODDebugger } from "./console"
import * as fjs from "formatted-json-stringify"
/**## ODDatabaseManager `class`
* This is an open ticket database manager.
* This is an Open Ticket database manager.
*
* It manages all databases in the bot and allows to permanently store data from the bot!
*
@@ -32,7 +32,7 @@ export class ODDatabaseManager extends ODManager<ODDatabase> {
}
/**## ODDatabase `class`
* This is an open ticket database template.
* This is an Open Ticket database template.
* This class doesn't do anything at all, it just gives a template & basic methods for a database. Use `ODJsonDatabase` instead!
*
* You can use this class if you want to create your own database implementation (e.g. `mongodb`, `mysql`,...)!
@@ -79,7 +79,7 @@ export class ODDatabase extends ODManagerData {
export type ODJsonDatabaseStructure = {category:string, key:string, value:ODValidJsonType}[]
/**## ODJsonDatabase `class`
* This is an open ticket JSON database.
* This is an Open Ticket JSON database.
* It stores data in a `json` file as a large `Array` using the `category`, `key`, `value` strategy.
* You can store the following types: `string`, `number`, `boolean`, `array`, `object` & `null`!
*
@@ -179,7 +179,7 @@ export class ODJsonDatabase extends ODDatabase {
/**## ODFormattedJsonDatabase `class`
* This is an open ticket Formatted JSON database.
* This is an Open Ticket Formatted JSON database.
* It stores data in a `json` file as a large `Array` using the `category`, `key`, `value` strategy.
* You can store the following types: `string`, `number`, `boolean`, `array`, `object` & `null`!
*
+62 -62
View File
@@ -20,31 +20,31 @@ export interface ODDefaults {
/**Don't crash the bot when a plugin crashes! */
softPluginLoading:boolean,
/**Load the default open ticket plugin classes. */
/**Load the default Open Ticket plugin classes. */
pluginClassLoading:boolean,
/**Load the default open ticket flags. */
/**Load the default Open Ticket flags. */
flagLoading:boolean,
/**Enable the default initializer for open ticket flags. */
/**Enable the default initializer for Open Ticket flags. */
flagInitiating:boolean,
/**Load the default open ticket progress bar renderers. */
/**Load the default Open Ticket progress bar renderers. */
progressBarRendererLoading:boolean,
/**Load the default open ticket progress bars. */
/**Load the default Open Ticket progress bars. */
progressBarLoading:boolean,
/**Load the default open ticket configs. */
/**Load the default Open Ticket configs. */
configLoading:boolean,
/**Enable the default initializer for open ticket config. */
/**Enable the default initializer for Open Ticket config. */
configInitiating:boolean,
/**Load the default open ticket databases. */
/**Load the default Open Ticket databases. */
databaseLoading:boolean,
/**Enable the default initializer for open ticket database. */
/**Enable the default initializer for Open Ticket database. */
databaseInitiating:boolean,
/**Load the default open ticket sessions. */
/**Load the default Open Ticket sessions. */
sessionLoading:boolean,
/**Load the default open ticket languages. */
/**Load the default Open Ticket languages. */
languageLoading:boolean,
/**Enable the default initializer for open ticket languages. */
/**Enable the default initializer for Open Ticket languages. */
languageInitiating:boolean,
/**Enable selecting the current language from `config/general.json`. */
languageSelection:boolean,
@@ -53,13 +53,13 @@ export interface ODDefaults {
/****[NOT FOR PLUGIN TRANSLATIONS]** The full list of available languages (used in the default config checker). */
languageList:string[],
/**Load the default open ticket config checker. */
/**Load the default Open Ticket config checker. */
checkerLoading:boolean,
/**Load the default open ticket config checker functions. */
/**Load the default Open Ticket config checker functions. */
checkerFunctionLoading:boolean,
/**Enable the default execution of the config checkers. */
checkerExecution:boolean,
/**Load the default open ticket config checker translations. */
/**Load the default Open Ticket config checker translations. */
checkerTranslationLoading:boolean,
/**Enable the default rendering of the config checkers. */
checkerRendering:boolean,
@@ -68,111 +68,111 @@ export interface ODDefaults {
/**Render the checker even when there are no errors & warnings. */
checkerRenderEmpty:boolean,
/**Load the default open ticket client configuration. */
/**Load the default Open Ticket client configuration. */
clientLoading:boolean,
/**Load the default open ticket client initialization. */
/**Load the default Open Ticket client initialization. */
clientInitiating:boolean,
/**Load the default open ticket client ready actions (status, commands, permissions, ...). */
/**Load the default Open Ticket client ready actions (status, commands, permissions, ...). */
clientReady:boolean,
/**Create a warning when the bot is present in multiple guilds. */
clientMultiGuildWarning:boolean,
/**Load the default open ticket client activity (from `config/general.json`). */
/**Load the default Open Ticket client activity (from `config/general.json`). */
clientActivityLoading:boolean,
/**Load the default open ticket client activity initialization (& status refresh). */
/**Load the default Open Ticket client activity initialization (& status refresh). */
clientActivityInitiating:boolean,
/**Load the default open ticket slash commands. */
/**Load the default Open Ticket slash commands. */
slashCommandLoading:boolean,
/**Load the default open ticket slash command registerer (register slash cmds in discord). */
/**Load the default Open Ticket slash command registerer (register slash cmds in discord). */
slashCommandRegistering:boolean,
/**When enabled, the bot is forced to re-register all slash commands in the server. This can be used in case of a auto-update malfunction. */
forceSlashCommandRegistration:boolean,
/**When enabled, the bot is allowed to unregister all slash commands which aren't used in Open Ticket. Disable this if you don't want to use the Open Ticket `ODSlashCommand` classes. */
allowSlashCommandRemoval:boolean,
/**Load the default open ticket text commands. */
/**Load the default Open Ticket text commands. */
textCommandLoading:boolean,
/**Load the default open ticket questions (from `config/questions.json`) */
/**Load the default Open Ticket questions (from `config/questions.json`) */
questionLoading:boolean,
/**Load the default open ticket options (from `config/options.json`) */
/**Load the default Open Ticket options (from `config/options.json`) */
optionLoading:boolean,
/**Load the default open ticket panels (from `config/panels.json`) */
/**Load the default Open Ticket panels (from `config/panels.json`) */
panelLoading:boolean,
/**Load the default open ticket tickets (from `database/tickets.json`) */
/**Load the default Open Ticket tickets (from `database/tickets.json`) */
ticketLoading:boolean,
/**Load the default open ticket reaction roles (from `config/options.json`) */
/**Load the default Open Ticket reaction roles (from `config/options.json`) */
roleLoading:boolean,
/**Load the default open ticket blacklist (from `database/users.json`) */
/**Load the default Open Ticket blacklist (from `database/users.json`) */
blacklistLoading:boolean,
/**Load the default open ticket transcript compilers. */
/**Load the default Open Ticket transcript compilers. */
transcriptCompilerLoading:boolean,
/**Load the default open ticket transcript history (from `database/transcripts.json`) */
/**Load the default Open Ticket transcript history (from `database/transcripts.json`) */
transcriptHistoryLoading:boolean,
/**Load the default open ticket button builders. */
/**Load the default Open Ticket button builders. */
buttonBuildersLoading:boolean,
/**Load the default open ticket dropdown builders. */
/**Load the default Open Ticket dropdown builders. */
dropdownBuildersLoading:boolean,
/**Load the default open ticket file builders. */
/**Load the default Open Ticket file builders. */
fileBuildersLoading:boolean,
/**Load the default open ticket embed builders. */
/**Load the default Open Ticket embed builders. */
embedBuildersLoading:boolean,
/**Load the default open ticket message builders. */
/**Load the default Open Ticket message builders. */
messageBuildersLoading:boolean,
/**Load the default open ticket modal builders. */
/**Load the default Open Ticket modal builders. */
modalBuildersLoading:boolean,
/**Load the default open ticket command responders. */
/**Load the default Open Ticket command responders. */
commandRespondersLoading:boolean,
/**Load the default open ticket button responders. */
/**Load the default Open Ticket button responders. */
buttonRespondersLoading:boolean,
/**Load the default open ticket dropdown responders. */
/**Load the default Open Ticket dropdown responders. */
dropdownRespondersLoading:boolean,
/**Load the default open ticket modal responders. */
/**Load the default Open Ticket modal responders. */
modalRespondersLoading:boolean,
/**Set the time (in ms) before open ticket sends an error message when no reply is sent in a responder. */
/**Set the time (in ms) before Open Ticket sends an error message when no reply is sent in a responder. */
responderTimeoutMs:number,
/**Load the default open ticket actions. */
/**Load the default Open Ticket actions. */
actionsLoading:boolean,
/**Load the default open ticket verify bars. */
/**Load the default Open Ticket verify bars. */
verifyBarsLoading:boolean,
/**Load the default open ticket permissions. */
/**Load the default Open Ticket permissions. */
permissionsLoading:boolean,
/**Load the default open ticket posts. */
/**Load the default Open Ticket posts. */
postsLoading:boolean,
/**Initiate the default open ticket posts. */
/**Initiate the default Open Ticket posts. */
postsInitiating:boolean,
/**Load the default open ticket cooldowns. */
/**Load the default Open Ticket cooldowns. */
cooldownsLoading:boolean,
/**Initiate the default open ticket cooldowns. */
/**Initiate the default Open Ticket cooldowns. */
cooldownsInitiating:boolean,
/**Load the default open ticket help menu categories. */
/**Load the default Open Ticket help menu categories. */
helpMenuCategoryLoading:boolean,
/**Load the default open ticket help menu components. */
/**Load the default Open Ticket help menu components. */
helpMenuComponentLoading:boolean,
/**Load the default open ticket stat scopes. */
/**Load the default Open Ticket stat scopes. */
statScopesLoading:boolean,
/**Load the default open ticket stats. */
/**Load the default Open Ticket stats. */
statLoading:boolean,
/**Initiate the default open ticket stats. */
/**Initiate the default Open Ticket stats. */
statInitiating:boolean,
/**Load the default open ticket code/functions. */
/**Load the default Open Ticket code/functions. */
codeLoading:boolean,
/**Execute the default open ticket code/functions. */
/**Execute the default Open Ticket code/functions. */
codeExecution:boolean,
/**Load the default open ticket livestatus. */
/**Load the default Open Ticket livestatus. */
liveStatusLoading:boolean,
/**Load the default open ticket startscreen. */
/**Load the default Open Ticket startscreen. */
startScreenLoading:boolean,
/**Render the default open ticket startscreen. */
/**Render the default Open Ticket startscreen. */
startScreenRendering:boolean,
/**Load the emoji style from the open ticket general config. */
/**Load the emoji style from the Open Ticket general config. */
emojiTitleStyleLoading:boolean,
/**The emoji style to use in embed & message titles using `utilities.emoijTitle()` */
emojiTitleStyle:"disabled"|"before"|"after"|"double",
@@ -217,9 +217,9 @@ export type ODDefaultsStringArray = {
}[keyof ODDefaults]
/**## ODDefaultsManager `class`
* This is an open ticket defaults manager.
* This is an Open Ticket defaults manager.
*
* It manages all settings in open ticket that are not meant to be in the config.
* It manages all settings in Open Ticket that are not meant to be in the config.
* Here you can disable certain default features to replace them or to specifically enable them!
*
* You are unable to add your own defaults, you can only edit Open Ticket defaults!
+4 -4
View File
@@ -5,13 +5,13 @@ import { ODManagerData, ODManager, ODValidId } from "./base"
import { ODConsoleWarningMessage, ODDebugger } from "./console"
/**## ODEvent `class`
* This is an open ticket event.
* This is an Open Ticket event.
*
* This class is made to work with the `ODEventManager` to handle events.
* The function of this specific class is to manage all listeners for a specifc event!
*/
export class ODEvent extends ODManagerData {
/**Alias to open ticket debugger. */
/**Alias to Open Ticket debugger. */
#debug?: ODDebugger
/**The list of permanent listeners. */
listeners: Function[] = []
@@ -20,7 +20,7 @@ export class ODEvent extends ODManagerData {
/**The max listener limit before a possible memory leak will be announced */
listenerLimit: number = 25
/**Use the open ticket debugger in this manager for logs*/
/**Use the Open Ticket debugger in this manager for logs*/
useDebug(debug:ODDebugger|null){
this.#debug = debug ?? undefined
}
@@ -71,7 +71,7 @@ export class ODEvent extends ODManagerData {
}
/**## ODEventManager `class`
* This is an open ticket event manager.
* This is an Open Ticket event manager.
*
* This class is made to manage all events in the bot. You can compare it with the built-in node.js `EventEmitter`
*
+2 -2
View File
@@ -5,7 +5,7 @@ import { ODId, ODValidId, ODManager, ODManagerData } from "./base"
import { ODDebugger } from "./console"
/**## ODFlag `class`
* This is an open ticket flag.
* This is an Open Ticket flag.
*
* A flag is a boolean that can be specified by a parameter in the console.
* It's useful for small settings that are only required once in a while.
@@ -54,7 +54,7 @@ export class ODFlag extends ODManagerData {
}
/**## ODFlagManager `class`
* This is an open ticket flag manager.
* This is an Open Ticket flag manager.
*
* This class is responsible for managing & initiating all flags of the bot.
* It also contains a shortcut for initiating all flags.
+6 -6
View File
@@ -10,7 +10,7 @@ import { ODDebugger } from "./console"
export type ODHelpMenuComponentRenderer = (page:number, category:number, location:number, mode:"slash"|"text") => string|Promise<string>
/**## ODHelpMenuComponent `class`
* This is an open ticket help menu component.
* This is an Open Ticket help menu component.
*
* It can render something on the Open Ticket help menu.
*/
@@ -28,7 +28,7 @@ export class ODHelpMenuComponent extends ODManagerData {
}
/**## ODHelpMenuTextComponent `class`
* This is an open ticket help menu text component.
* This is an Open Ticket help menu text component.
*
* It can render a static piece of text on the Open Ticket help menu.
*/
@@ -69,7 +69,7 @@ export interface ODHelpMenuCommandComponentSettings {
}
/**## ODHelpMenuCommandComponent `class`
* This is an open ticket help menu command component.
* This is an Open Ticket help menu command component.
*
* It contains a useful helper to render a command in the Open Ticket help menu.
*/
@@ -93,7 +93,7 @@ export class ODHelpMenuCommandComponent extends ODHelpMenuComponent {
}
/**## ODHelpMenuCategory `class`
* This is an open ticket help menu category.
* This is an Open Ticket help menu category.
*
* Every category in the help menu is an embed field by default.
* Try to limit the amount of components per category.
@@ -148,7 +148,7 @@ export class ODHelpMenuCategory extends ODManager<ODHelpMenuComponent> {
export type ODHelpMenuRenderResult = {name:string, value:string}[][]
/**## ODHelpMenuManager `class`
* This is an open ticket help menu manager.
* This is an Open Ticket help menu manager.
*
* It is responsible for rendering the entire help menu content.
* You are also able to configure the amount of categories per page here.
@@ -156,7 +156,7 @@ export type ODHelpMenuRenderResult = {name:string, value:string}[][]
* Fewer Categories == More Clean Menu
*/
export class ODHelpMenuManager extends ODManager<ODHelpMenuCategory> {
/**Alias to open ticket debugger. */
/**Alias to Open Ticket debugger. */
#debug: ODDebugger
/**The amount of categories per-page. */
categoriesPerPage: number = 3
+3 -3
View File
@@ -23,7 +23,7 @@ export interface ODLanguageMetadata {
}
/**## ODLanguageManager `class`
* This is an open ticket language manager.
* This is an Open Ticket language manager.
*
* It manages all languages in the bot and manages translation for you!
* Get a translation via the `getTranslation()` or `getTranslationWithParams()` methods.
@@ -144,7 +144,7 @@ export class ODLanguageManager extends ODManager<ODLanguage> {
}
/**## ODLanguage `class`
* This is an open ticket language file.
* This is an Open Ticket language file.
*
* It contains metadata and all translation strings available in this language.
* Register this class to an `ODLanguageManager` to use it!
@@ -173,7 +173,7 @@ export class ODLanguage extends ODManagerData {
}
/**## ODJsonLanguage `class`
* This is an open ticket JSON language file.
* This is an Open Ticket JSON language file.
*
* It contains metadata and all translation strings from a certain JSON file (in `./languages/`).
* Register this class to an `ODLanguageManager` to use it!
+2 -2
View File
@@ -48,7 +48,7 @@ export enum ODPermissionLevel {
}
/**## ODPermission `class`
* This is an open ticket permission.
* This is an Open Ticket permission.
*
* It defines a single permission level for a specific scope (global/channel & user/role)
* These permissions only apply to commands & interactions.
@@ -101,7 +101,7 @@ export interface ODPermissionSettings {
export type ODPermissionCalculationCallback = (user:discord.User, channel?:discord.Channel|null, guild?:discord.Guild|null, settings?:ODPermissionSettings|null) => Promise<ODPermissionResult>
/**## ODPermissionManager `class`
* This is an open ticket permission manager.
* This is an Open Ticket permission manager.
*
* It manages all permissions in the bot!
* Use the `getPermissions()` and `hasPermissions()` methods to get user perms.
+3 -3
View File
@@ -16,7 +16,7 @@ export interface ODUnknownCrashedPlugin {
}
/**## ODPluginManager `class`
* This is an open ticket plugin manager.
* This is an Open Ticket plugin manager.
*
* It manages all active plugins in the bot!
* It also contains all "plugin classes" which are managers registered by plugins.
@@ -93,7 +93,7 @@ export interface ODPluginDetails {
}
/**## ODPlugin `class`
* This is an open ticket plugin.
* This is an Open Ticket plugin.
*
* It represents a single plugin in the `./plugins/` directory.
* All plugins are accessible via the `openticket.plugins` global.
@@ -218,7 +218,7 @@ export class ODPlugin extends ODManagerData {
}
/**## ODPluginClassManager `class`
* This is an open ticket plugin class manager.
* This is an Open Ticket plugin class manager.
*
* It manages all managers registered by plugins!
* Plugins are able to register their own managers, handlers, functions, classes, ... here.
+2 -2
View File
@@ -7,7 +7,7 @@ import { ODDebugger } from "./console"
import * as discord from "discord.js"
/**## ODPostManager `class`
* This is an open ticket post manager.
* This is an Open Ticket post manager.
*
* It manages `ODPosts`'s for you.
*
@@ -36,7 +36,7 @@ export class ODPostManager extends ODManager<ODPost<discord.GuildBasedChannel>>
}
/**## ODPost `class`
* This is an open ticket post class.
* This is an Open Ticket post class.
*
* A post is just a shortcut to a static discord channel or category.
* This can be used to get a specific channel over and over again!
+6 -6
View File
@@ -6,7 +6,7 @@ import { ODDebugger } from "./console"
import readline from "readline"
/**## ODProgressBarRendererManager `class`
* This is an open ticket progress bar renderer manager.
* This is an Open Ticket progress bar renderer manager.
*
* It is responsible for managing all console progress bar renderers in Open Ticket.
*
@@ -19,7 +19,7 @@ export class ODProgressBarRendererManager extends ODManager<ODProgressBarRendere
}
/**## ODProgressBarManager `class`
* This is an open ticket progress bar manager.
* This is an Open Ticket progress bar manager.
*
* It is responsible for managing all console progress bars in Open Ticket. An example of this is the slash command registration progress bar.
*
@@ -40,7 +40,7 @@ export class ODProgressBarManager extends ODManager<ODProgressBar> {
export type ODProgressBarRenderFunc<Settings extends {}> = (settings:Settings,min:number,max:number,value:number,prefix:string|null,suffix:string|null) => string
/**## ODProgressBarRenderer `class`
* This is an open ticket console progress bar renderer.
* This is an Open Ticket console progress bar renderer.
*
* It is used to render a progress bar in the console of the bot.
*
@@ -76,7 +76,7 @@ export class ODProgressBarRenderer<Settings extends {}> extends ODManagerData {
}
/**## ODProgressBar `class`
* This is an open ticket console progress bar.
* This is an Open Ticket console progress bar.
*
* It is used to create a simple or advanced progress bar in the console of the bot.
* These progress bars are not visible in the `otdebug.txt` file and should only be used as extra visuals.
@@ -160,7 +160,7 @@ export class ODProgressBar extends ODManagerData {
}
/**## ODTimedProgressBar `class`
* This is an open ticket timed console progress bar.
* This is an Open Ticket timed console progress bar.
*
* It is used to create a simple timed progress bar in the console.
* You can set a fixed duration (milliseconds) in the constructor.
@@ -204,7 +204,7 @@ export class ODTimedProgressBar extends ODProgressBar {
}
/**## ODManualProgressBar `class`
* This is an open ticket manual console progress bar.
* This is an Open Ticket manual console progress bar.
*
* It is used to create a simple manual progress bar in the console.
* You can update the progress manually using `update()`.
+17 -17
View File
@@ -9,7 +9,7 @@ import { ODClientManager, ODSlashCommand, ODTextCommand, ODTextCommandInteractio
import { ODDropdownData, ODMessageBuildResult, ODMessageBuildSentResult, ODModalBuildResult } from "./builder"
/**## ODResponderImplementation `class`
* This is an open ticket responder implementation.
* This is an Open Ticket responder implementation.
*
* It is a basic implementation of the `ODWorkerManager` used by all `ODResponder` classes.
*
@@ -39,7 +39,7 @@ export class ODResponderImplementation<Instance,Source extends string,Params> ex
export type ODResponderTimeoutErrorCallback<Instance, Source extends "slash"|"text"|"button"|"dropdown"|"modal"|"other"> = (instance:Instance, source:Source) => void|Promise<void>
/**## ODResponderManager `class`
* This is an open ticket responder manager.
* This is an Open Ticket responder manager.
*
* It contains all Open Ticket responders. Responders can respond to an interaction, button, dropdown, modal or command.
*
@@ -71,7 +71,7 @@ export class ODResponderManager {
}
/**## ODCommandResponderManager `class`
* This is an open ticket command responder manager.
* This is an Open Ticket command responder manager.
*
* It contains all Open Ticket command responders. These can respond to text & slash commands.
*
@@ -125,7 +125,7 @@ export class ODCommandResponderManager extends ODManager<ODCommandResponder<"sla
}
/**## ODCommandResponderInstanceOptions `class`
* This is an open ticket command responder instance options manager.
* This is an Open Ticket command responder instance options manager.
*
* This class will manage all options & subcommands from slash & text commands.
*/
@@ -331,7 +331,7 @@ export class ODCommandResponderInstanceOptions {
/**## ODCommandResponderInstance `class`
* This is an open ticket command responder instance.
* This is an Open Ticket command responder instance.
*
* An instance is an active slash interaction or used text command. You can reply to the command using `reply()` for both slash & text commands.
*/
@@ -427,7 +427,7 @@ export class ODCommandResponderInstance {
}
/**## ODCommandResponder `class`
* This is an open ticket command responder.
* This is an Open Ticket command responder.
*
* This class manages all workers which are executed when the related command is triggered.
*/
@@ -448,7 +448,7 @@ export class ODCommandResponder<Source extends "slash"|"text",Params> extends OD
}
/**## ODButtonResponderManager `class`
* This is an open ticket button responder manager.
* This is an Open Ticket button responder manager.
*
* It contains all Open Ticket button responders. These can respond to button interactions.
*
@@ -500,7 +500,7 @@ export class ODButtonResponderManager extends ODManager<ODButtonResponder<"butto
}
/**## ODButtonResponderInstance `class`
* This is an open ticket button responder instance.
* This is an Open Ticket button responder instance.
*
* An instance is an active button interaction. You can reply to the button using `reply()`.
*/
@@ -631,7 +631,7 @@ export class ODButtonResponderInstance {
}
/**## ODButtonResponder `class`
* This is an open ticket button responder.
* This is an Open Ticket button responder.
*
* This class manages all workers which are executed when the related button is triggered.
*/
@@ -644,7 +644,7 @@ export class ODButtonResponder<Source extends string,Params> extends ODResponder
}
/**## ODDropdownResponderManager `class`
* This is an open ticket dropdown responder manager.
* This is an Open Ticket dropdown responder manager.
*
* It contains all Open Ticket dropdown responders. These can respond to dropdown interactions.
*
@@ -696,7 +696,7 @@ export class ODDropdownResponderManager extends ODManager<ODDropdownResponder<"d
}
/**## ODDropdownResponderInstanceValues `class`
* This is an open ticket dropdown responder instance values manager.
* This is an Open Ticket dropdown responder instance values manager.
*
* This class will manage all values from the dropdowns & select menus.
*/
@@ -770,7 +770,7 @@ export class ODDropdownResponderInstanceValues {
}
/**## ODDropdownResponderInstance `class`
* This is an open ticket dropdown responder instance.
* This is an Open Ticket dropdown responder instance.
*
* An instance is an active dropdown interaction. You can reply to the dropdown using `reply()`.
*/
@@ -918,7 +918,7 @@ export class ODDropdownResponderInstance {
}
/**## ODDropdownResponder `class`
* This is an open ticket dropdown responder.
* This is an Open Ticket dropdown responder.
*
* This class manages all workers which are executed when the related dropdown is triggered.
*/
@@ -931,7 +931,7 @@ export class ODDropdownResponder<Source extends string,Params> extends ODRespond
}
/**## ODModalResponderManager `class`
* This is an open ticket modal responder manager.
* This is an Open Ticket modal responder manager.
*
* It contains all Open Ticket modal responders. These can respond to modal interactions.
*
@@ -983,7 +983,7 @@ export class ODModalResponderManager extends ODManager<ODModalResponder<"modal",
}
/**## ODModalResponderInstanceValues `class`
* This is an open ticket modal responder instance values manager.
* This is an Open Ticket modal responder instance values manager.
*
* This class will manage all fields from the modals.
*/
@@ -1010,7 +1010,7 @@ export class ODModalResponderInstanceValues {
}
/**## ODModalResponderInstance `class`
* This is an open ticket modal responder instance.
* This is an Open Ticket modal responder instance.
*
* An instance is an active modal interaction. You can reply to the modal using `reply()`.
*/
@@ -1101,7 +1101,7 @@ export class ODModalResponderInstance {
}
/**## ODModalResponder `class`
* This is an open ticket modal responder.
* This is an Open Ticket modal responder.
*
* This class manages all workers which are executed when the related modal is triggered.
*/
+3 -3
View File
@@ -6,9 +6,9 @@ import { ODDebugger } from "./console"
import * as crypto from "crypto"
/**## ODSessionManager `class`
* This is an open ticket session manager.
* This is an Open Ticket session manager.
*
* It contains all sessions in open ticket. Sessions are a sort of temporary storage which will be cleared when the bot stops.
* It contains all sessions in Open Ticket. Sessions are a sort of temporary storage which will be cleared when the bot stops.
* Data in sessions have a randomly generated key which will always be unique.
*
* Visit the `ODSession` class for more info
@@ -39,7 +39,7 @@ export interface ODSessionInstance {
export type ODSessionTimeoutCallback = (id:string, timeout:"default"|"custom", data:any, creation:Date) => void
/**## ODSession `class`
* This is an open ticket session.
* This is an Open Ticket session.
*
* It can be used to create 100% unique id's for usage in the bot. An id can also store additional data which isn't saved to the filesystem.
* You can almost compare it to the PHP session system.
+10 -10
View File
@@ -13,7 +13,7 @@ import ansis from "ansis"
export type ODStartScreenComponentRenderCallback = (location:number) => string|Promise<string>
/**## ODStartScreenManager `class`
* This is an open ticket startscreen manager.
* This is an Open Ticket startscreen manager.
*
* This class is responsible for managing & rendering the startscreen of the bot.
* The startscreen is the part you see when the bot has started up successfully. (e.g. the Open Ticket logo, logs, livestatus, flags, ...)
@@ -57,7 +57,7 @@ export class ODStartScreenManager extends ODManager<ODStartScreenComponent> {
}
/**## ODStartScreenComponent `class`
* This is an open ticket startscreen component.
* This is an Open Ticket startscreen component.
*
* This component can be rendered to the start screen of the bot.
* An optional priority can be specified to choose the location of the component.
@@ -100,7 +100,7 @@ export interface ODStartScreenProperty {
}
/**## ODStartScreenLogoComponent `class`
* This is an open ticket startscreen logo component.
* This is an Open Ticket startscreen logo component.
*
* This component will render an ASCII art logo (from an array) to the startscreen. Every property in the array is another row.
* An optional priority can be specified to choose the location of the component.
@@ -140,7 +140,7 @@ export interface ODStartScreenHeaderAlignmentSettings {
}
/**## ODStartScreenHeaderComponent `class`
* This is an open ticket startscreen header component.
* This is an Open Ticket startscreen header component.
*
* This component will render a header to the startscreen. Properties can be aligned left, right or centered.
* An optional priority can be specified to choose the location of the component.
@@ -192,7 +192,7 @@ export class ODStartScreenHeaderComponent extends ODStartScreenComponent {
}
/**## ODStartScreenCategoryComponent `class`
* This is an open ticket startscreen category component.
* This is an Open Ticket startscreen category component.
*
* This component will render a category to the startscreen. This will only render the category name. You'll need to provide your own renderer for the contents.
* An optional priority can be specified to choose the location of the component.
@@ -216,7 +216,7 @@ export class ODStartScreenCategoryComponent extends ODStartScreenComponent {
}
/**## ODStartScreenPropertiesCategoryComponent `class`
* This is an open ticket startscreen properties category component.
* This is an Open Ticket startscreen properties category component.
*
* This component will render a properties category to the startscreen. This will list the properties in the category.
* An optional priority can be specified to choose the location of the component.
@@ -238,7 +238,7 @@ export class ODStartScreenPropertiesCategoryComponent extends ODStartScreenCateg
}
/**## ODStartScreenFlagsCategoryComponent `class`
* This is an open ticket startscreen flags category component.
* This is an Open Ticket startscreen flags category component.
*
* This component will render a flags category to the startscreen. This will list the enabled flags in the category.
* An optional priority can be specified to choose the location of the component.
@@ -256,7 +256,7 @@ export class ODStartScreenFlagsCategoryComponent extends ODStartScreenCategoryCo
}
/**## ODStartScreenPluginsCategoryComponent `class`
* This is an open ticket startscreen plugins category component.
* This is an Open Ticket startscreen plugins category component.
*
* This component will render a plugins category to the startscreen. This will list the enabled, disabled & crashed plugins in the category.
* An optional priority can be specified to choose the location of the component.
@@ -283,7 +283,7 @@ export class ODStartScreenPluginsCategoryComponent extends ODStartScreenCategory
}
/**## ODStartScreenLiveStatusCategoryComponent `class`
* This is an open ticket startscreen livestatus category component.
* This is an Open Ticket startscreen livestatus category component.
*
* This component will render a livestatus category to the startscreen. This will list the livestatus messages in the category.
* An optional priority can be specified to choose the location of the component.
@@ -302,7 +302,7 @@ export class ODStartScreenLiveStatusCategoryComponent extends ODStartScreenCateg
}
/**## ODStartScreenLogsCategoryComponent `class`
* This is an open ticket startscreen logs category component.
* This is an Open Ticket startscreen logs category component.
*
* This component will render a logs category to the startscreen. This will only render the logs category name.
* An optional priority can be specified to choose the location of the component.
+9 -9
View File
@@ -24,7 +24,7 @@ export type ODStatsManagerInitCallback = (database:ODJsonDatabaseStructure, dele
export type ODStatScopeSetMode = "set"|"increase"|"decrease"
/**## ODStatsManager `class`
* This is an open ticket stats manager.
* This is an Open Ticket stats manager.
*
* This class is responsible for managing all stats of the bot.
* Stats are categorized in "scopes" which can be accessed in this manager.
@@ -32,9 +32,9 @@ export type ODStatScopeSetMode = "set"|"increase"|"decrease"
* Stats can be accessed in the individual scopes.
*/
export class ODStatsManager extends ODManager<ODStatScope> {
/**Alias to open ticket debugger. */
/**Alias to Open Ticket debugger. */
#debug: ODDebugger
/**Alias to open ticket stats database. */
/**Alias to Open Ticket stats database. */
database: ODDatabase|null = null
/**All the listeners for the init event. */
#initListeners: ODStatsManagerInitCallback[] = []
@@ -97,7 +97,7 @@ export class ODStatsManager extends ODManager<ODStatScope> {
}
/**## ODStatScope `class`
* This is an open ticket stat scope.
* This is an Open Ticket stat scope.
*
* A scope can contain multiple stats. Every scope is seperated from other scopes.
* Here, you can read & write the values of all stats.
@@ -109,7 +109,7 @@ export class ODStatScope extends ODManager<ODStat> {
id: ODId
/**Is this stat scope already initialized? */
ready: boolean = false
/**Alias to open ticket stats database. */
/**Alias to Open Ticket stats database. */
database: ODDatabase|null = null
/**The name of this scope (used in embed title) */
name:string
@@ -202,7 +202,7 @@ export class ODStatScope extends ODManager<ODStat> {
}
/**## ODStatGlobalScope `class`
* This is an open ticket stat global scope.
* This is an Open Ticket stat global scope.
*
* A scope can contain multiple stats. Every scope is seperated from other scopes.
* Here, you can read & write the values of all stats.
@@ -230,7 +230,7 @@ export class ODStatGlobalScope extends ODStatScope {
export type ODStatRenderer = (value:ODValidStatValue, scopeId:string, guild:discord.Guild, channel:discord.TextBasedChannel, user:discord.User) => string|Promise<string>
/**## ODStat `class`
* This is an open ticket statistic.
* This is an Open Ticket statistic.
*
* This single statistic doesn't do anything except defining the rules of this statistic.
* Use it in a stats scope to register a new statistic. A statistic can also include a priority to choose the render priority.
@@ -254,7 +254,7 @@ export class ODStat extends ODManagerData {
}
/**## ODBasicStat `class`
* This is an open ticket basic statistic.
* This is an Open Ticket basic statistic.
*
* This single statistic will store a number, boolean or string in the database.
* Use it to create a simple statistic for any stats scope.
@@ -277,7 +277,7 @@ export class ODBasicStat extends ODStat {
export type ODDynamicStatRenderer = (scopeId:string, guild:discord.Guild, channel:discord.TextBasedChannel, user:discord.User) => string|Promise<string>
/**## ODDynamicStat `class`
* This is an open ticket dynamic statistic.
* This is an Open Ticket dynamic statistic.
*
* A dynamic statistic does not store anything in the database! Instead, it will execute a function to return a custom result.
* This can be used to show statistics which are not stored in the database.
+2 -2
View File
@@ -9,7 +9,7 @@ import * as discord from "discord.js"
import { ODWorkerManager } from "./worker"
/**## ODVerifyBar `class`
* This is an open ticket verifybar.
* This is an Open Ticket verifybar.
*
* It is contains 2 sets of workers and a lot of utilities for the (✅ ❌) verifybars in the bot.
*
@@ -47,7 +47,7 @@ export class ODVerifyBar extends ODManagerData {
}
/**## ODVerifyBarManager `class`
* This is an open ticket verifybar manager.
* This is an Open Ticket verifybar manager.
*
* It contains all (✅ ❌) verifybars in the bot.
* The `ODVerifyBar` classes contain `ODWorkerManager`'s that will be fired when the continue/stop buttons are pressed.
+2 -2
View File
@@ -9,7 +9,7 @@ import { ODId, ODManager, ODManagerData, ODValidId } from "./base"
export type ODWorkerCallback<Instance, Source extends string, Params> = (instance:Instance, params:Params, source:Source, cancel:() => void) => void|Promise<void>
/**## ODWorker `class`
* This is an open ticket worker.
* This is an Open Ticket worker.
*
* You can compare it with a normal javascript callback, but slightly more advanced!
*
@@ -32,7 +32,7 @@ export class ODWorker<Instance, Source extends string, Params> extends ODManager
}
/**## ODWorker `class`
* This is an open ticket worker manager.
* This is an Open Ticket worker manager.
*
* It manages & executes `ODWorker`'s in the correct order.
*