ODSlashCommandManager_Default class
We are still working the API Reference! This page might be incomplete or doesn't contain all details!
Overview
This is a special class that adds type definitions & typescript to the ODSlashCommandManager class. It doesn't add any extra features!
This default class is made for the global variable opendiscord.client.slashCommands!
Methods
Properties
inherited commandManager type ➜ null|discord.ApplicationCommandManager
Discord.js application commands manager.
inherited comparator class ➜ api.ODSlashCommandComparator
A utility class used to compare 2 slash commands with each other.
inherited listenerLimit number ➜ number
Set the soft limit for maximum amount of listeners. A warning will be shown when there are more listeners than this limit.
inherited manager class ➜ api.ODClientManager
Refrerence to discord.js client.
inherited redirects class ➜ api.ODManagerRedirectHelper
Handle all redirects in this ODManager
Methods
constructor() function ➜ api.ODSlashCommandManager_Default
(no description)
View Parameters (2)
debug: class ➜api.ODDebugger- Parameter Description Lorem Ipsum.manager: class ➜api.ODClientManager- Parameter Description Lorem Ipsum.
inherited protected _change() function ➜ void
Trigger an onChange() event in the parent ODManager of this class.
inherited add() function ➜ boolean
Add data to the manager. The id will be fetched from the data class! You can optionally select to overwrite existing data!
View Parameters (2)
data: type ➜api.ODSlashCommand|(api.ODSlashCommand[])- Parameter Description Lorem Ipsum.overwrite: boolean ➜boolean- Parameter Description Lorem Ipsum.
inherited changed() function ➜ void
(❌ SYSTEM ONLY!!) Set the callback executed when a value inside this class changes.
inherited createCmd() function ➜ Promise
Create a slash command. (SYSTEM ONLY) => Use ODSlashCommandManager for registering commands the default way!
View Parameters (1)
cmd: class ➜api.ODSlashCommand- Parameter Description Lorem Ipsum.
inherited createNewCommands() function ➜ Promise
Create all commands that are not registered yet.
View Parameters (2)
instances: array ➜api.ODSlashCommand[]- Parameter Description Lorem Ipsum.progress: class ➜api.ODManualProgressBar- Parameter Description Lorem Ipsum.
exists() function ➜ boolean
Check if data that matches the ODId exists. Returns a boolean.
View Parameters (1)
id: type ➜keyof api.ODSlashCommandManagerIds_Default- Parameter Description Lorem Ipsum.
get() function ➜ null|api.ODSlashCommand
Get data that matches the ODId. Returns the found data.
View Parameters (1)
id: type ➜api.ODValidId- Parameter Description Lorem Ipsum.
inherited getAll() function ➜ api.ODSlashCommand[]
Get all data inside this manager
inherited getAllRegisteredCommands() function ➜ Promise
Get all registered & unregistered slash commands.
View Parameters (1)
guildId: string ➜string- Parameter Description Lorem Ipsum.
inherited getFiltered() function ➜ api.ODSlashCommand[]
Get all data that matches inside the filter function
View Parameters (1)
predicate: function ➜(value:api.ODSlashCommand, index:number, array:api.ODSlashCommand[]) => unknown- Parameter Description Lorem Ipsum.
inherited getIds() function ➜ api.ODId[]
Get a list of all the ids inside this manager
inherited getLength() function ➜ number
Get the length of the data inside this manager
inherited getRegex() function ➜ api.ODSlashCommand[]
Get all data that matches the regex
View Parameters (1)
regex: type ➜RegExp- Parameter Description Lorem Ipsum.
inherited loopAll() function ➜ Promise
Run an iterator over all data in this manager. This method also supports async-await behaviour!
View Parameters (1)
cb: function ➜(data:api.ODSlashCommand, id:api.ODId) => api.ODPromiseVoid- Parameter Description Lorem Ipsum.
inherited onAdd() function ➜ void
Listen for when data is added to this manager.
View Parameters (1)
callback: type ➜api.ODManagerAddCallback- Parameter Description Lorem Ipsum.
inherited onChange() function ➜ void
Listen for when data is changed in this manager.
View Parameters (1)
callback: type ➜api.ODManagerCallback- Parameter Description Lorem Ipsum.
onInteraction() function ➜ void
Callback on interaction from one or multiple slash commands.
View Parameters (2)
commandName: type ➜keyof api.ODSlashCommandManagerIds_Default- Parameter Description Lorem Ipsum.callback: type ➜api.ODSlashCommandInteractionCallback- Parameter Description Lorem Ipsum.
inherited onRemove() function ➜ void
Listen for when data is removed from this manager.
View Parameters (1)
callback: type ➜api.ODManagerCallback- Parameter Description Lorem Ipsum.
remove() function ➜ null|api.ODSlashCommand
Remove data that matches the ODId. Returns the removed data.
View Parameters (1)
id: type ➜api.ODValidId- Parameter Description Lorem Ipsum.
inherited removeUnusedCommands() function ➜ Promise
Remove all commands that are registered but unused by Open Ticket.
View Parameters (3)
instances: array ➜api.ODSlashCommandUniversalCommand[]- Parameter Description Lorem Ipsum.guildId: string ➜string- Parameter Description Lorem Ipsum.progress: class ➜api.ODManualProgressBar- Parameter Description Lorem Ipsum.
inherited startListeningToInteractions() function ➜ void
Start listening to the discord.js client interactionCreate event.
inherited updateExistingCommands() function ➜ Promise
Update all commands that are already registered.
View Parameters (2)
instances: array ➜api.ODSlashCommand[]- Parameter Description Lorem Ipsum.progress: class ➜api.ODManualProgressBar- Parameter Description Lorem Ipsum.
inherited useDebug() function ➜ void
Use the Open Ticket debugger in this manager for logs
View Parameters (2)
debug: class ➜api.ODDebugger- Parameter Description Lorem Ipsum.debugname: string ➜string- Parameter Description Lorem Ipsum.
Defaults
We're still working on this part of the documentation!
Examples
We're still working on this part of the documentation!