Skip to content

Commit

Permalink
Docs build for branch master: 5109e75
Browse files Browse the repository at this point in the history
  • Loading branch information
khaazz committed Mar 21, 2020
1 parent 5109e75 commit bc7ad8f
Show file tree
Hide file tree
Showing 6 changed files with 80 additions and 73 deletions.
21 changes: 14 additions & 7 deletions docs/Commands/Command.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,9 @@
| [aliases] | <code>Array.&lt;String&gt;</code> | <code>[]</code> | Array of commands aliases (including the command label) |
| [enabled] | <code>Boolean</code> | <code>module.enabled</code> | Whether the command is enabled |
| [serverBypass] | <code>Boolean</code> | <code>module.serverBypass</code> | Whether the command can be disabled |
| [isSubcmd] | <code>Boolean</code> | <code>false</code> | Whether the command IS a subcommand |
| [parentCommand] | [<code>Command</code>](#Command) | <code></code> | Reference to the parent command (if isSubcmd = true) |
| [parentCommand] | [<code>Command</code>](#Command) | <code></code> | Reference to the parent command |
| [hasSubcmd] | <code>Boolean</code> | <code>false</code> | Whether the command HAS subcommands |
| subcmds | <code>Array.&lt;Object&gt;</code> | | Array of subcommand objects (deleted after init) |
| [subCommands] | <code>CommandCollection</code> | <code></code> | Collection of subcommands |
| [subCommandsAliases] | <code>Map</code> | <code></code> | Map of subcommand aliases |
| [subCommands] | <code>CommandRegistry</code> | <code></code> | Registry of subcommands |
| info | <code>Object</code> | | Default info about the command |
| [info.owners] | <code>Array.&lt;String&gt;</code> | | Command authors |
| [info.name] | <code>String</code> | | Full command name |
Expand All @@ -51,6 +48,8 @@
* [.template](#Command+template) : [<code>AxonTemplate</code>](#AxonTemplate)
* [.library](#Command+library) : <code>LibraryInterface</code>
* [.fullLabel](#Command+fullLabel) : <code>String</code>
* [.init()](#Command+init)
* [._init()](#Command+_init) ⇒ <code>Boolean</code>
* [._process(env)](#Command+_process) ⇒ <code>Promise.&lt;CommandContext&gt;</code>
* [._execute(env)](#Command+_execute) ⇒ <code>Promise.&lt;CommandContext&gt;</code>
* [.execute(env)](#Command+execute) ⇒ <code>Promise.&lt;CommandResponse&gt;</code>
Expand Down Expand Up @@ -96,6 +95,16 @@ Returns the full label for this command (label + all parent labels)

**Kind**: instance property of [<code>Command</code>](#Command)
**Read only**: true
<a name="Command+init"></a>

### command.init() ⇒
Returns all the subcommands for a command

**Kind**: instance method of [<code>Command</code>](#Command)
<a name="Command+_init"></a>

### command.\_init() ⇒ <code>Boolean</code>
**Kind**: instance method of [<code>Command</code>](#Command)
<a name="Command+_process"></a>

### command.\_process(env) ⇒ <code>Promise.&lt;CommandContext&gt;</code>
Expand Down Expand Up @@ -215,11 +224,9 @@ Overrides the execute method. Execute method will be called every time the comma
| [data] | <code>Object</code> | <code>{}</code> | All command parameters |
| [data.label] | <code>String</code> | | The command label |
| [data.aliases] | <code>Array.&lt;String&gt;</code> | | The command aliases |
| [data.isSubcmd] | <code>Boolean</code> | | Whether the command IS a subcommand |
| [data.hasSubcmd] | <code>Boolean</code> | | Whether the command HAS subcommands |
| [data.enabled] | <code>Boolean</code> | | Whether the command is enabled |
| [data.serverBypass] | <code>Boolean</code> | | Whether the command can be server disabled |
| | | | |
| [data.info] | <code>Object</code> | | |
| [data.info.owners] | <code>Array.&lt;String&gt;</code> | | Who created the command |
| [data.info.description] | <code>String</code> | | The command description |
Expand Down
76 changes: 26 additions & 50 deletions docs/Commands/CommandLoader.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,10 @@
* [new CommandLoader(module)](#new_CommandLoader_new)
* [.axon](#CommandLoader+axon) : <code>AxonClient</code>
* [.logger](#CommandLoader+logger) : <code>Logger</code>
* [.load(command, [parent])](#CommandLoader+load) ⇒ <code>Boolean</code>
* [.load(command, parent)](#CommandLoader+load) ⇒ <code>Boolean</code>
* [.loadAll(commands)](#CommandLoader+loadAll) ⇒ <code>Boolean</code>
* [.unload(label)](#CommandLoader+unload) ⇒ <code>Boolean</code>
* [.registerCommand(command)](#CommandLoader+registerCommand)
* [.registerSubCommand(command, parent)](#CommandLoader+registerSubCommand)
* [.registerCommand(command, registry)](#CommandLoader+registerCommand)
* [.unregisterCommand(fullLabel)](#CommandLoader+unregisterCommand) ⇒ <code>Boolean</code>
* [.unregisterSubCommand(command, subCommand)](#CommandLoader+unregisterSubCommand)

Expand Down Expand Up @@ -59,28 +58,28 @@ Returns the Logger instance
**Read only**: true
<a name="CommandLoader+load"></a>

### commandLoader.load(command, [parent]) ⇒ <code>Boolean</code>
### commandLoader.load(command, parent) ⇒ <code>Boolean</code>
Load one command instance in the module.
Validate and correct the command before registering it.

**Kind**: instance method of [<code>CommandLoader</code>](#CommandLoader)

| Param | Type | Default | Description |
| --- | --- | --- | --- |
| command | <code>Command</code> | | The command to load |
| [parent] | <code>Command</code> | <code></code> | The optional parent command |
| Param | Type | Description |
| --- | --- | --- |
| command | <code>Command</code> | The command to load |
| parent | <code>CommandRegistry</code> | The registry to load the command into |

<a name="CommandLoader+loadAll"></a>

### commandLoader.loadAll(commands) ⇒ <code>Boolean</code>
Load all commands in the module.
Load all non instantiated commands in the module.
Instantiate all commands.

**Kind**: instance method of [<code>CommandLoader</code>](#CommandLoader)

| Param | Type |
| --- | --- |
| commands | <code>Object.&lt;string, Command&gt;</code> |
| Param | Type | Description |
| --- | --- | --- |
| commands | <code>Object.&lt;string, Command&gt;</code> | Non instantiated Commands |

<a name="CommandLoader+unload"></a>

Expand All @@ -96,26 +95,15 @@ Unload a Command from the client

<a name="CommandLoader+registerCommand"></a>

### commandLoader.registerCommand(command)
### commandLoader.registerCommand(command, registry)
Register a Command. Register its subcommands if it has any.

**Kind**: instance method of [<code>CommandLoader</code>](#CommandLoader)

| Param | Type | Description |
| --- | --- | --- |
| command | <code>Command</code> | Command object |

<a name="CommandLoader+registerSubCommand"></a>

### commandLoader.registerSubCommand(command, parent)
Register a SubCommand.Register its subcommands if it has any

**Kind**: instance method of [<code>CommandLoader</code>](#CommandLoader)

| Param | Type | Description |
| --- | --- | --- |
| command | <code>Command</code> | The subcommand to register |
| parent | <code>Command</code> | The parent command |
| registry | <code>CommandRegistry</code> | The registry to register the command into |

<a name="CommandLoader+unregisterCommand"></a>

Expand Down Expand Up @@ -151,11 +139,10 @@ Remove a subcommand from a command
* [new CommandLoader(module)](#new_CommandLoader_new)
* [.axon](#CommandLoader+axon) : <code>AxonClient</code>
* [.logger](#CommandLoader+logger) : <code>Logger</code>
* [.load(command, [parent])](#CommandLoader+load) ⇒ <code>Boolean</code>
* [.load(command, parent)](#CommandLoader+load) ⇒ <code>Boolean</code>
* [.loadAll(commands)](#CommandLoader+loadAll) ⇒ <code>Boolean</code>
* [.unload(label)](#CommandLoader+unload) ⇒ <code>Boolean</code>
* [.registerCommand(command)](#CommandLoader+registerCommand)
* [.registerSubCommand(command, parent)](#CommandLoader+registerSubCommand)
* [.registerCommand(command, registry)](#CommandLoader+registerCommand)
* [.unregisterCommand(fullLabel)](#CommandLoader+unregisterCommand) ⇒ <code>Boolean</code>
* [.unregisterSubCommand(command, subCommand)](#CommandLoader+unregisterSubCommand)

Expand Down Expand Up @@ -191,28 +178,28 @@ Returns the Logger instance
**Read only**: true
<a name="CommandLoader+load"></a>

### commandLoader.load(command, [parent]) ⇒ <code>Boolean</code>
### commandLoader.load(command, parent) ⇒ <code>Boolean</code>
Load one command instance in the module.
Validate and correct the command before registering it.

**Kind**: instance method of [<code>CommandLoader</code>](#CommandLoader)

| Param | Type | Default | Description |
| --- | --- | --- | --- |
| command | <code>Command</code> | | The command to load |
| [parent] | <code>Command</code> | <code></code> | The optional parent command |
| Param | Type | Description |
| --- | --- | --- |
| command | <code>Command</code> | The command to load |
| parent | <code>CommandRegistry</code> | The registry to load the command into |

<a name="CommandLoader+loadAll"></a>

### commandLoader.loadAll(commands) ⇒ <code>Boolean</code>
Load all commands in the module.
Load all non instantiated commands in the module.
Instantiate all commands.

**Kind**: instance method of [<code>CommandLoader</code>](#CommandLoader)

| Param | Type |
| --- | --- |
| commands | <code>Object.&lt;string, Command&gt;</code> |
| Param | Type | Description |
| --- | --- | --- |
| commands | <code>Object.&lt;string, Command&gt;</code> | Non instantiated Commands |

<a name="CommandLoader+unload"></a>

Expand All @@ -228,26 +215,15 @@ Unload a Command from the client

<a name="CommandLoader+registerCommand"></a>

### commandLoader.registerCommand(command)
### commandLoader.registerCommand(command, registry)
Register a Command. Register its subcommands if it has any.

**Kind**: instance method of [<code>CommandLoader</code>](#CommandLoader)

| Param | Type | Description |
| --- | --- | --- |
| command | <code>Command</code> | Command object |

<a name="CommandLoader+registerSubCommand"></a>

### commandLoader.registerSubCommand(command, parent)
Register a SubCommand.Register its subcommands if it has any

**Kind**: instance method of [<code>CommandLoader</code>](#CommandLoader)

| Param | Type | Description |
| --- | --- | --- |
| command | <code>Command</code> | The subcommand to register |
| parent | <code>Command</code> | The parent command |
| registry | <code>CommandRegistry</code> | The registry to register the command into |

<a name="CommandLoader+unregisterCommand"></a>

Expand Down
14 changes: 7 additions & 7 deletions docs/Core/Base.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
## Typedefs

<dl>
<dt><a href="#Ctx">Ctx</a> : <code>Object</code></dt>
<dt><a href="#AllowedMentions">AllowedMentions</a> : <code>Object</code></dt>
<dd></dd>
</dl>

Expand Down Expand Up @@ -138,7 +138,7 @@ Reject promise if not
| user | <code>User</code> | | User object to get the DM channel |
| content | <code>String</code> \| <code>MessageObject</code> | | String or object (embed) |
| [options] | <code>Object</code> | <code>{}</code> | Options { disableEveryone: Boolean, delete: Boolean, delay: Number } |
| [options.disableEveryone] | <code>Boolean</code> | <code>true</code> | Whether to allow mentioning everyone or not |
| [options.allowedMentions] | [<code>AllowedMentions</code>](#AllowedMentions) | | Custom allowed mentions object |
| [options.delete] | <code>Boolean</code> | <code>false</code> | Whether to delete the message or not |
| [options.delay] | <code>Number</code> | <code></code> | Delay after which the message will be deleted |

Expand All @@ -157,7 +157,7 @@ Doesn't support file
| channel | <code>Channel</code> | | The channel Object |
| content | <code>String</code> \| <code>MessageObject</code> | | Message content, String or Embed Object |
| [options] | <code>Object</code> | <code>{}</code> | Options { disableEveryone: Boolean, delete: Boolean, delay: Number } |
| [options.disableEveryone] | <code>Boolean</code> | <code>true</code> | Whether to allow mentioning everyone or not |
| [options.allowedMentions] | [<code>AllowedMentions</code>](#AllowedMentions) | | Custom allowed mentions object |
| [options.delete] | <code>Boolean</code> | <code>false</code> | Whether to delete the message or not |
| [options.delay] | <code>Number</code> | <code></code> | Delay after which the message will be deleted |

Expand Down Expand Up @@ -190,7 +190,7 @@ Await for sendMessage to throw correctly potential errors.
| channel | <code>Channel</code> | | The channel Object |
| content | <code>String</code> \| <code>MessageObject</code> | | Success message content |
| [options] | <code>Object</code> | <code>{}</code> | Additional options |
| [options.disableEveryone] | <code>Boolean</code> | <code>true</code> | Whether to allow mentioning everyone or not |
| [options.allowedMentions] | [<code>AllowedMentions</code>](#AllowedMentions) | | Custom allowed mentions object |
| [options.delete] | <code>Boolean</code> | <code>false</code> | Whether to delete the message or not |
| [options.delay] | <code>Number</code> | <code></code> | Delay after which the message will be deleted |
| [options.triggerCooldown] | <code>Boolean</code> | <code>true</code> | Whether the command should trigger cooldown or not |
Expand All @@ -210,7 +210,7 @@ Await for sendMessage to throw correctly potential errors.
| channel | <code>Channel</code> | | The channel Object |
| content | <code>String</code> \| <code>MessageObject</code> | | Success message content |
| [options] | <code>Object</code> | <code>{}</code> | Additional options |
| [options.disableEveryone] | <code>Boolean</code> | <code>true</code> | Whether to allow mentioning everyone or not |
| [options.allowedMentions] | [<code>AllowedMentions</code>](#AllowedMentions) | | Custom allowed mentions object |
| [options.delete] | <code>Boolean</code> | <code>false</code> | Whether to delete the message or not |
| [options.delay] | <code>Number</code> | <code></code> | Delay after which the message will be deleted |
| [options.triggerCooldown] | <code>Boolean</code> | <code>false</code> | Whether the command should trigger cooldown or not |
Expand Down Expand Up @@ -260,7 +260,7 @@ Creates an instance of Base.
| --- | --- |
| axonClient | <code>AxonClient</code> |

<a name="Ctx"></a>
<a name="AllowedMentions"></a>

## Ctx : <code>Object</code>
## AllowedMentions : <code>Object</code>
**Kind**: global typedef
13 changes: 11 additions & 2 deletions docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ AxonCore is lib agnostic, which mean you can use it indifferently with [Eris](ht
- **Translations** - Built-in support for translation and message management system.
- **Logging** - Built-in custom logging.
- **Tracking** - Easily track and debug command usage, events and errors with custom events emitted by AxonCore.
- **Typescript support** - Full typescript and intellisense support

## Philosophy

Expand All @@ -78,6 +79,10 @@ Here's how to use it:
- Available libraries: `eris`, `discordjs`.
- Available module types: `commonjs`, `esm`.

AxonCore has **FULL** typescript support.
When you install the package the first time, you can choose the library you are using, and the package will automatically link the library typings. That will allow you to have full and complete typings for your typescript project or for using intllisense.
Note: AxonCore creates a `.axoncorerc` file with the default configuration. Editing or deleting this file will change the typings link on the next install.

## Features Overview

Because it is built with the correct level abstraction, using AxonCore feels natural and powerful. Everything is easily accessible, extendable and customisable.
Expand Down Expand Up @@ -159,13 +164,17 @@ axonClient.on('listenerError', (eventName: String, listenerName: String, { liste
### Utilities

- [Embed](src/Utility/External/Embed.js)
- Resolver
- [Resolver](src/Libraries/definitions/Resolver.js)
- [Utility](src/Utility/Utils.js)
- Message Collector [TODO-outdated]
- [Collectors](src/Utility/Discord/Collectors/Collector.js)
- [Message Collector](src/Utility/Discord/Collectors/MessageCollector.js)
- Reaction collector [TODO-outdated]

- [LRUCache](src/Utility/External/LRUCache.js)
- [SortedList](src/Utility/External/SortedList.js)
- [Stack](src/Utility/External/Stack.js)
- [Queue](src/Utility/External/Queue.js)
- [FunctionQueue](src/Utility/External/FunctionQueue.js)
- [AsyncQueue](src/Utility/External/AsyncQueue.js)
- [AutoQueue](src/Utility/External/AutoQueue.js)

Expand Down
14 changes: 7 additions & 7 deletions docs/Utility/AxonUtils.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
## Typedefs

<dl>
<dt><a href="#AxonTemplate">AxonTemplate</a> : <code>Object</code></dt>
<dt><a href="#AllowedMentions">AllowedMentions</a> : <code>Object</code></dt>
<dd></dd>
</dl>

Expand All @@ -29,7 +29,7 @@
* _instance_
* [.axon](#AxonUtils+axon) : <code>AxonClient</code>
* [.bot](#AxonUtils+bot) : <code>BotClient</code>
* [.template](#AxonUtils+template) : [<code>AxonTemplate</code>](#AxonTemplate)
* [.template](#AxonUtils+template) : <code>AxonTemplate</code>
* [.logger](#AxonUtils+logger) : <code>ALogger</code>
* [.utils](#AxonUtils+utils) : <code>Utils</code>
* [.library](#AxonUtils+library) : <code>LibraryInterface</code>
Expand Down Expand Up @@ -71,7 +71,7 @@ Returns the BotClient instance
**Read only**: true
<a name="AxonUtils+template"></a>

### axonUtils.template : [<code>AxonTemplate</code>](#AxonTemplate)
### axonUtils.template : <code>AxonTemplate</code>
Returns the template object

**Kind**: instance property of [<code>AxonUtils</code>](#AxonUtils)
Expand Down Expand Up @@ -210,7 +210,7 @@ Reject promise if not
| user | <code>User</code> | | User object to get the DM channel |
| content | <code>String</code> \| <code>MessageObject</code> | | String or object (embed) |
| [options] | <code>Object</code> | <code>{}</code> | Options { disableEveryone: Boolean, delete: Boolean, delay: Number } |
| [options.disableEveryone] | <code>Boolean</code> | <code>true</code> | Whether to allow mentioning everyone or not |
| [options.allowedMentions] | [<code>AllowedMentions</code>](#AllowedMentions) | | Custom allowed mentions object |
| [options.delete] | <code>Boolean</code> | <code>false</code> | Whether to delete the message or not |
| [options.delay] | <code>Number</code> | <code></code> | Delay after which the message will be deleted |

Expand All @@ -229,7 +229,7 @@ Doesn't support file uploads.
| channel | <code>Channel</code> | | The channel Object |
| content | <code>String</code> \| <code>MessageObject</code> | | Message content: String or Embed Object |
| [options] | <code>Object</code> | <code>{}</code> | Options { disableEveryone: Boolean, delete: Boolean, delay: Number } |
| [options.disableEveryone] | <code>Boolean</code> | <code>true</code> | Whether to allow mentioning everyone or not |
| [options.allowedMentions] | [<code>AllowedMentions</code>](#AllowedMentions) | | Custom allowed mentions object |
| [options.delete] | <code>Boolean</code> | <code>false</code> | Whether to delete the message or not |
| [options.delay] | <code>Number</code> | <code></code> | Delay after which the message will be deleted |

Expand Down Expand Up @@ -261,7 +261,7 @@ Creates an AxonUtils instance.
| --- | --- |
| axon | <code>AxonClient</code> |

<a name="AxonTemplate"></a>
<a name="AllowedMentions"></a>

## AxonTemplate : <code>Object</code>
## AllowedMentions : <code>Object</code>
**Kind**: global typedef
Loading

0 comments on commit bc7ad8f

Please sign in to comment.