BREAKING: changed openticket to opendiscord in API
This commit is contained in:
@@ -512,7 +512,7 @@ export class ODFileManager extends ODManagerWithSafety<ODFile<string,any>> {
|
||||
return new ODFile("openticket:unknown-file",(instance,params,source,cancel) => {
|
||||
instance.setName("openticket_unknown-file.txt")
|
||||
instance.setDescription("❌ <ODError:Unknown File>")
|
||||
instance.setContents("Couldn't find file in registery `openticket.builders.files`")
|
||||
instance.setContents("Couldn't find file in registery `opendiscord.builders.files`")
|
||||
cancel()
|
||||
})
|
||||
},debug,"file")
|
||||
@@ -636,7 +636,7 @@ export class ODEmbedManager extends ODManagerWithSafety<ODEmbed<string,any>> {
|
||||
instance.setFooter("openticket:unknown-embed")
|
||||
instance.setColor("#ff0000")
|
||||
instance.setTitle("❌ <ODError:Unknown Embed>")
|
||||
instance.setDescription("Couldn't find embed in registery `openticket.builders.embeds`")
|
||||
instance.setDescription("Couldn't find embed in registery `opendiscord.builders.embeds`")
|
||||
cancel()
|
||||
})
|
||||
},debug,"embed")
|
||||
@@ -847,7 +847,7 @@ export class ODMessageManager extends ODManagerWithSafety<ODMessage<string,any>>
|
||||
constructor(debug:ODDebugger){
|
||||
super(() => {
|
||||
return new ODMessage("openticket:unknown-message",(instance,params,source,cancel) => {
|
||||
instance.setContent("**❌ <ODError:Unknown Message>**\nCouldn't find message in registery `openticket.builders.messages`")
|
||||
instance.setContent("**❌ <ODError:Unknown Message>**\nCouldn't find message in registery `opendiscord.builders.messages`")
|
||||
cancel()
|
||||
})
|
||||
},debug,"message")
|
||||
|
||||
@@ -20,14 +20,6 @@ export interface ODCheckerResult {
|
||||
* 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
|
||||
* //get checker for ./config/general.json => ODChecker class
|
||||
* const testChecker = openticket.checkers.get("openticket:general")
|
||||
*
|
||||
* //add a new checker with id "test" => ./config/test.json
|
||||
* const testConfig = new api.ODConfig("test","test.json")
|
||||
* const testChecker = new api.ODChecker("test",openticket.checkers.storage,0,testConfig,[])
|
||||
* openticket.checkers.add(testChecker)
|
||||
*/
|
||||
export class ODCheckerManager extends ODManager<ODChecker> {
|
||||
/**The global temporary storage shared between all config checkers. */
|
||||
@@ -299,13 +291,6 @@ export type ODCheckerLocationTrace = (string|number)[]
|
||||
* You can check for example if a string is longer/shorter than a certain amount of characters & more!
|
||||
*
|
||||
* You can use this class when you create your own custom config file & you want to check it for syntax errors.
|
||||
* @example
|
||||
* //create a new checker with id "test" => ./config/test.json
|
||||
* const testConfig = new api.ODConfig("test","test.json")
|
||||
* const testChecker = new api.ODChecker("test",openticket.checkers.storage,0,testConfig,new api.ODCheckerStructure())
|
||||
* openticket.checkers.add(testChecker)
|
||||
*
|
||||
* //you will still need to build the structure & insert it in the constructor
|
||||
*/
|
||||
export class ODChecker extends ODManagerData {
|
||||
/**The storage of this checker (reference for `ODCheckerManager.storage`) */
|
||||
|
||||
@@ -584,7 +584,7 @@ export class ODLiveStatusUrlSource extends ODLiveStatusSource {
|
||||
* It manages all LiveStatus sources and has the renderer for all LiveStatus messages.
|
||||
*
|
||||
* You can use this to customise or add stuff to the LiveStatus system.
|
||||
* Access it in the global `openticket.startscreen.livestatus` variable!
|
||||
* Access it in the global `opendiscord.startscreen.livestatus` variable!
|
||||
*/
|
||||
export class ODLiveStatusManager extends ODManager<ODLiveStatusSource> {
|
||||
/**The class responsible for rendering the livestatus messages. */
|
||||
@@ -616,7 +616,7 @@ export class ODLiveStatusManager extends ODManager<ODLiveStatusSource> {
|
||||
* It's responsible for rendering all LiveStatus messages to the console.
|
||||
*/
|
||||
export class ODLiveStatusRenderer {
|
||||
/**A reference to the ODConsoleManager or "openticket.console" global variable */
|
||||
/**A reference to the ODConsoleManager or "opendiscord.console" global variable */
|
||||
#console: ODConsoleManager
|
||||
|
||||
constructor(console:ODConsoleManager){
|
||||
|
||||
@@ -76,7 +76,7 @@ export class ODEvent extends ODManagerData {
|
||||
* This class is made to manage all events in the bot. You can compare it with the built-in node.js `EventEmitter`
|
||||
*
|
||||
* It's not recommended to create this class yourself. Plugin events should be registered in their `plugin.json` file instead.
|
||||
* All events are available in the `openticket.events` global!
|
||||
* All events are available in the `opendiscord.events` global!
|
||||
*/
|
||||
export class ODEventManager extends ODManager<ODEvent> {
|
||||
/**Reference to the Open Ticket debugger */
|
||||
|
||||
@@ -20,7 +20,7 @@ export interface ODUnknownCrashedPlugin {
|
||||
*
|
||||
* It manages all active plugins in the bot!
|
||||
* It also contains all "plugin classes" which are managers registered by plugins.
|
||||
* These are accessible via the `openticket.plugins.classes` global.
|
||||
* These are accessible via the `opendiscord.plugins.classes` global.
|
||||
*
|
||||
* Use `isPluginLoaded()` to check if a plugin has been loaded.
|
||||
*/
|
||||
@@ -60,7 +60,7 @@ export interface ODPluginData {
|
||||
enabled:boolean,
|
||||
/**The priority of this plugin. Higher priority will load before lower priority. */
|
||||
priority:number,
|
||||
/**A list of events to register to the `openticket.events` global before loading any plugins. This way, plugins with a higher priority are able to use events from this plugin as well! */
|
||||
/**A list of events to register to the `opendiscord.events` global before loading any plugins. This way, plugins with a higher priority are able to use events from this plugin as well! */
|
||||
events:string[]
|
||||
|
||||
/**Npm dependencies which are required for this plugin to work. */
|
||||
@@ -96,7 +96,7 @@ export interface ODPluginDetails {
|
||||
* This is an Open Ticket plugin.
|
||||
*
|
||||
* It represents a single plugin in the `./plugins/` directory.
|
||||
* All plugins are accessible via the `openticket.plugins` global.
|
||||
* All plugins are accessible via the `opendiscord.plugins` global.
|
||||
*
|
||||
* Don't re-execute plugins which are already enabled! It might break the bot or plugin.
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user