manually updated docs for test

Logan Cusano
2024-08-17 19:39:23 -04:00
parent ffe93ae700
commit 5638985f36

951
Home.md

@@ -1,6 +1,9 @@
## Classes
<dl>
<dt><a href="#PresenceManager">PresenceManager</a></dt>
<dd><p>Control the presence or activity of the discord bot.</p>
</dd>
<dt><a href="#DebugBuilder">DebugBuilder</a></dt>
<dd><p>Create the different logging methods for a function
Namespace template = (&quot;[app]:[fileName]:[&#39;INFO&#39;, &#39;WARNING&#39;, &#39;DEBUG&#39;, &#39;ERROR&#39;]&quot;)</p>
@@ -10,10 +13,46 @@ Namespace template = (&quot;[app]:[fileName]:[&#39;INFO&#39;, &#39;WARNING&#39;,
## Constants
<dl>
<dt><a href="#execute">execute</a></dt>
<dd><p>The function to run when the command is called by a discord user</p>
</dd>
<dt><a href="#execute">execute</a></dt>
<dd><p>The function to run when the command is called by a discord user</p>
</dd>
<dt><a href="#execute">execute</a></dt>
<dd><p>The function to run when the command is called by a discord user</p>
</dd>
<dt><a href="#execute">execute</a></dt>
<dd><p>The function to run when the command is called by a discord user</p>
</dd>
<dt><a href="#execute">execute</a></dt>
<dd><p>The function to run when the command is called by a discord user</p>
</dd>
<dt><a href="#execute">execute</a></dt>
<dd><p>The function to run when the command is called by a discord user</p>
</dd>
<dt><a href="#addEnabledCommands">addEnabledCommands</a><code>any</code></dt>
<dd><p>Add the enabled commands to the bot to be used by users in discord
(commands that end in &#39;.mjs&#39; will be enabled, to disable just remove the extension or replace with &#39;.mjs.disabled&#39;)</p>
</dd>
<dt><a href="#unregisterAllCommands">unregisterAllCommands</a></dt>
<dd><p>Remove all commands for a given bot in a given guild</p>
</dd>
<dt><a href="#refreshActiveCommandsWrapper">refreshActiveCommandsWrapper</a><code>any</code></dt>
<dd><p>This named wrapper will remove all commands and then re-add the commands back, effectively refreshing them</p>
</dd>
<dt><a href="#getAvailableNodes">getAvailableNodes</a><code>any</code></dt>
<dd><p>Get the nodes with given system that are available to be used within a given server</p>
</dd>
<dt><a href="#getUserVoiceChannel">getUserVoiceChannel</a><code>any</code></dt>
<dd><p>Gets the voice channel the user is currently in.</p>
</dd>
<dt><a href="#joinNode">joinNode</a></dt>
<dd><p>Joins a node to a specified system and voice channel.</p>
</dd>
<dt><a href="#promptNodeSelection">promptNodeSelection</a></dt>
<dd><p>Prompts the user to select a node from available nodes.</p>
</dd>
<dt><a href="#nodeLoginWrapper">nodeLoginWrapper</a><code>any</code></dt>
<dd><p>Log the node into the network</p>
</dd>
@@ -61,6 +100,21 @@ Namespace template = (&quot;[app]:[fileName]:[&#39;INFO&#39;, &#39;WARNING&#39;,
## Functions
<dl>
<dt><a href="#autocomplete">autocomplete(nodeIo, interaction)</a></dt>
<dd><p>Function to give the user auto-reply suggestions</p>
</dd>
<dt><a href="#execute">execute(nodeIo, interaction)</a></dt>
<dd><p>Handle join command execution</p>
</dd>
<dt><a href="#autocomplete">autocomplete(nodeIo, interaction)</a></dt>
<dd><p>Function to give the user auto-reply suggestions</p>
</dd>
<dt><a href="#execute">execute(nodeIo, interaction)</a></dt>
<dd><p>The function to run when the command is called by a discord user</p>
</dd>
<dt><a href="#autocomplete">autocomplete(nodeIo, interaction)</a></dt>
<dd><p>Function to give the user auto-reply suggestions</p>
</dd>
<dt><a href="#addEnabledEventListeners">addEnabledEventListeners(serverClient, _eventsPath)</a><code>any</code></dt>
<dd><p>Add the enabled event listeners to the bot
(events that end in &#39;.mjs&#39; will be enabled, to disable just remove the extension or replace with &#39;.mjs.disabled&#39;)</p>
@@ -73,6 +127,146 @@ Namespace template = (&quot;[app]:[fileName]:[&#39;INFO&#39;, &#39;WARNING&#39;,
</dd>
</dl>
<a name="PresenceManager"></a>
## PresenceManager
Control the presence or activity of the discord bot.
**Kind**: global class
* [PresenceManager](#PresenceManager)
* [new PresenceManager(client)](#new_PresenceManager_new)
* [.setPresence(status, activityType, activityName, [url])](#PresenceManager+setPresence)
* [.resetToDefault()](#PresenceManager+resetToDefault)
* [.convertActivityType(activityType)](#PresenceManager+convertActivityType) ⇒ <code>ActivityType</code>
* [.convertStatus(status)](#PresenceManager+convertStatus) ⇒ <code>PresenceUpdateStatus</code>
<a name="new_PresenceManager_new"></a>
### new PresenceManager(client)
Creates an instance of PresenceManager.
| Param | Type | Description |
| --- | --- | --- |
| client | <code>Client</code> | The Discord client instance. |
<a name="PresenceManager+setPresence"></a>
### presenceManager.setPresence(status, activityType, activityName, [url])
Set the bot's presence.
**Kind**: instance method of [<code>PresenceManager</code>](#PresenceManager)
| Param | Type | Default | Description |
| --- | --- | --- | --- |
| status | <code>&quot;online&quot;</code> \| <code>&quot;idle&quot;</code> \| <code>&quot;dnd&quot;</code> | | The status of the bot (online, idle, dnd). |
| activityType | <code>&quot;PLAYING&quot;</code> \| <code>&quot;STREAMING&quot;</code> \| <code>&quot;LISTENING&quot;</code> \| <code>&quot;WATCHING&quot;</code> \| <code>&quot;COMPETING&quot;</code> | | The type of activity. |
| activityName | <code>string</code> | | The name of the activity. |
| [url] | <code>string</code> | <code>null</code> | The URL for STREAMING activity type (optional). |
<a name="PresenceManager+resetToDefault"></a>
### presenceManager.resetToDefault()
Reset the bot's presence to the default state.
**Kind**: instance method of [<code>PresenceManager</code>](#PresenceManager)
<a name="PresenceManager+convertActivityType"></a>
### presenceManager.convertActivityType(activityType) ⇒ <code>ActivityType</code>
Convert a string activity type to the corresponding ActivityType enum.
**Kind**: instance method of [<code>PresenceManager</code>](#PresenceManager)
**Returns**: <code>ActivityType</code> - - The corresponding ActivityType enum.
| Param | Type | Description |
| --- | --- | --- |
| activityType | <code>string</code> | The activity type string. |
<a name="PresenceManager+convertStatus"></a>
### presenceManager.convertStatus(status) ⇒ <code>PresenceUpdateStatus</code>
Convert a string status to the corresponding PresenceUpdateStatus enum.
**Kind**: instance method of [<code>PresenceManager</code>](#PresenceManager)
**Returns**: <code>PresenceUpdateStatus</code> - - The corresponding PresenceUpdateStatus enum.
| Param | Type | Description |
| --- | --- | --- |
| status | <code>string</code> | The status string. |
<a name="execute"></a>
## execute
The function to run when the command is called by a discord user
**Kind**: global constant
| Param | Type | Description |
| --- | --- | --- |
| nodeIo | <code>any</code> | The nodeIO server for manipulation of sockets |
| interaction | <code>any</code> | The interaction object |
<a name="execute"></a>
## execute
The function to run when the command is called by a discord user
**Kind**: global constant
| Param | Type | Description |
| --- | --- | --- |
| nodeIo | <code>any</code> | The nodeIO server for manipulation of sockets |
| interaction | <code>any</code> | The interaction object |
<a name="execute"></a>
## execute
The function to run when the command is called by a discord user
**Kind**: global constant
| Param | Type | Description |
| --- | --- | --- |
| nodeIo | <code>any</code> | The nodeIO server for manipulation of sockets |
| interaction | <code>any</code> | The interaction object |
<a name="execute"></a>
## execute
The function to run when the command is called by a discord user
**Kind**: global constant
| Param | Type | Description |
| --- | --- | --- |
| nodeIo | <code>any</code> | The nodeIO server for manipulation of sockets |
| interaction | <code>any</code> | The interaction object |
<a name="execute"></a>
## execute
The function to run when the command is called by a discord user
**Kind**: global constant
| Param | Type | Description |
| --- | --- | --- |
| nodeIo | <code>any</code> | The nodeIO server for manipulation of sockets |
| interaction | <code>any</code> | The interaction object |
<a name="execute"></a>
## execute
The function to run when the command is called by a discord user
**Kind**: global constant
| Param | Type | Description |
| --- | --- | --- |
| nodeIo | <code>any</code> | The nodeIO server for manipulation of sockets |
| interaction | <code>any</code> | The interaction object |
<a name="addEnabledCommands"></a>
## addEnabledCommands ⇒ <code>any</code>
@@ -86,6 +280,81 @@ Add the enabled commands to the bot to be used by users in discord
| serverClient | <code>any</code> | |
| _commandsPath | <code>any</code> | <code>&quot;./commands&quot;</code> |
<a name="unregisterAllCommands"></a>
## unregisterAllCommands
Remove all commands for a given bot in a given guild
**Kind**: global constant
| Param | Type | Description |
| --- | --- | --- |
| serverClient | <code>any</code> | The discord bot client |
<a name="refreshActiveCommandsWrapper"></a>
## refreshActiveCommandsWrapper ⇒ <code>any</code>
This named wrapper will remove all commands and then re-add the commands back, effectively refreshing them
**Kind**: global constant
| Param | Type | Description |
| --- | --- | --- |
| serverClient | <code>any</code> | The discord bot client object |
<a name="getAvailableNodes"></a>
## getAvailableNodes ⇒ <code>any</code>
Get the nodes with given system that are available to be used within a given server
**Kind**: global constant
| Param | Type | Description |
| --- | --- | --- |
| nodeIo | <code>any</code> | The nodeIO object contained in the discord server object |
| guildId | <code>any</code> | The guild ID to search in |
| system | <code>any</code> | The system to filter the nodes by |
<a name="getUserVoiceChannel"></a>
## getUserVoiceChannel ⇒ <code>any</code>
Gets the voice channel the user is currently in.
**Kind**: global constant
**Returns**: <code>any</code> - - The voice channel object, or null if the user is not in a voice channel.
| Param | Type | Description |
| --- | --- | --- |
| interaction | <code>any</code> | The interaction object. |
<a name="joinNode"></a>
## joinNode
Joins a node to a specified system and voice channel.
**Kind**: global constant
| Param | Type | Description |
| --- | --- | --- |
| nodeIo | <code>any</code> | The nodeIO server for manipulation of sockets. |
| interaction | <code>any</code> | The interaction object. |
| nodeId | <code>string</code> | The ID of the node to join. |
| system | <code>any</code> | The system object to join. |
| channel | <code>any</code> | The voice channel to join. |
<a name="promptNodeSelection"></a>
## promptNodeSelection
Prompts the user to select a node from available nodes.
**Kind**: global constant
| Param | Type | Description |
| --- | --- | --- |
| interaction | <code>any</code> | The interaction object. |
| availableNodes | <code>Array</code> | The list of available nodes. |
| onNodeSelected | <code>function</code> | Callback function to handle the selected node. |
<a name="nodeLoginWrapper"></a>
## nodeLoginWrapper ⇒ <code>any</code>
@@ -253,6 +522,688 @@ Update the active RSS feeds and send any new posts to their discord channels
| --- | --- | --- |
| client | <code>any</code> | The discord client to send posts with |
<a name="autocomplete"></a>
## autocomplete(nodeIo, interaction)
Function to give the user auto-reply suggestions
**Kind**: global function
| Param | Type | Description |
| --- | --- | --- |
| nodeIo | <code>any</code> | The nodeIO server for manipulation of sockets |
| interaction | <code>any</code> | The interaction object |
<a name="execute"></a>
## execute(nodeIo, interaction)
Handle join command execution
**Kind**: global function
| Param | Type | Description |
| --- | --- | --- |
| nodeIo | <code>any</code> | The nodeIO server for manipulation of sockets |
| interaction | <code>any</code> | The interaction object |
<a name="autocomplete"></a>
## autocomplete(nodeIo, interaction)
Function to give the user auto-reply suggestions
**Kind**: global function
| Param | Type | Description |
| --- | --- | --- |
| nodeIo | <code>any</code> | The nodeIO server for manipulation of sockets |
| interaction | <code>any</code> | The interaction object |
<a name="execute"></a>
## execute(nodeIo, interaction)
The function to run when the command is called by a discord user
**Kind**: global function
| Param | Type | Description |
| --- | --- | --- |
| nodeIo | <code>any</code> | The nodeIO server for manipulation of sockets |
| interaction | <code>any</code> | The interaction object |
<a name="autocomplete"></a>
## autocomplete(nodeIo, interaction)
Function to give the user auto-reply suggestions
**Kind**: global function
| Param | Type | Description |
| --- | --- | --- |
| nodeIo | <code>any</code> | The nodeIO server for manipulation of sockets |
| interaction | <code>any</code> | The interaction object |
<a name="addEnabledEventListeners"></a>
## addEnabledEventListeners(serverClient, _eventsPath) ⇒ <code>any</code>
Add the enabled event listeners to the bot
(events that end in '.mjs' will be enabled, to disable just remove the extension or replace with '.mjs.disabled')
**Kind**: global function
| Param | Type | Default |
| --- | --- | --- |
| serverClient | <code>any</code> | |
| _eventsPath | <code>any</code> | <code>&quot;./events&quot;</code> |
<a name="writeToLog"></a>
## writeToLog(logMessage, appName)
Write a given message to the log file
**Kind**: global function
| Param | Type | Description |
| --- | --- | --- |
| logMessage | <code>any</code> | The message to write to the log file |
| appName | <code>string</code> | The app name that created the log entry |
<a name="sendNodeCommand"></a>
## sendNodeCommand(socket, command, data) ⇒ <code>any</code>
Description
**Kind**: global function
| Param | Type |
| --- | --- |
| socket | <code>any</code> |
| command | <code>any</code> |
| data | <code>any</code> |
## Classes
<dl>
<dt><a href="#PresenceManager">PresenceManager</a></dt>
<dd><p>Control the presence or activity of the discord bot.</p>
</dd>
<dt><a href="#DebugBuilder">DebugBuilder</a></dt>
<dd><p>Create the different logging methods for a function
Namespace template = (&quot;[app]:[fileName]:[&#39;INFO&#39;, &#39;WARNING&#39;, &#39;DEBUG&#39;, &#39;ERROR&#39;]&quot;)</p>
</dd>
</dl>
## Constants
<dl>
<dt><a href="#execute">execute</a></dt>
<dd><p>The function to run when the command is called by a discord user</p>
</dd>
<dt><a href="#execute">execute</a></dt>
<dd><p>The function to run when the command is called by a discord user</p>
</dd>
<dt><a href="#execute">execute</a></dt>
<dd><p>The function to run when the command is called by a discord user</p>
</dd>
<dt><a href="#execute">execute</a></dt>
<dd><p>The function to run when the command is called by a discord user</p>
</dd>
<dt><a href="#execute">execute</a></dt>
<dd><p>The function to run when the command is called by a discord user</p>
</dd>
<dt><a href="#execute">execute</a></dt>
<dd><p>The function to run when the command is called by a discord user</p>
</dd>
<dt><a href="#addEnabledCommands">addEnabledCommands</a><code>any</code></dt>
<dd><p>Add the enabled commands to the bot to be used by users in discord
(commands that end in &#39;.mjs&#39; will be enabled, to disable just remove the extension or replace with &#39;.mjs.disabled&#39;)</p>
</dd>
<dt><a href="#unregisterAllCommands">unregisterAllCommands</a></dt>
<dd><p>Remove all commands for a given bot in a given guild</p>
</dd>
<dt><a href="#refreshActiveCommandsWrapper">refreshActiveCommandsWrapper</a><code>any</code></dt>
<dd><p>This named wrapper will remove all commands and then re-add the commands back, effectively refreshing them</p>
</dd>
<dt><a href="#getAvailableNodes">getAvailableNodes</a><code>any</code></dt>
<dd><p>Get the nodes with given system that are available to be used within a given server</p>
</dd>
<dt><a href="#getUserVoiceChannel">getUserVoiceChannel</a><code>any</code></dt>
<dd><p>Gets the voice channel the user is currently in.</p>
</dd>
<dt><a href="#joinNode">joinNode</a></dt>
<dd><p>Joins a node to a specified system and voice channel.</p>
</dd>
<dt><a href="#promptNodeSelection">promptNodeSelection</a></dt>
<dd><p>Prompts the user to select a node from available nodes.</p>
</dd>
<dt><a href="#nodeLoginWrapper">nodeLoginWrapper</a><code>any</code></dt>
<dd><p>Log the node into the network</p>
</dd>
<dt><a href="#nodeDisconnectWrapper">nodeDisconnectWrapper</a><code>any</code></dt>
<dd><p>Disconnect the client from the server</p>
</dd>
<dt><a href="#nodeUpdateWrapper">nodeUpdateWrapper</a><code>any</code></dt>
<dd><p>Update node data in the database</p>
</dd>
<dt><a href="#nearbySystemsUpdateWraper">nearbySystemsUpdateWraper</a></dt>
<dd><p>Wrapper to update the systems from the nearbySystems object passed from clients</p>
</dd>
<dt><a href="#getSocketIdByNuid">getSocketIdByNuid</a><code>string</code> | <code>null</code></dt>
<dd><p>Get the open socket connection ID for a node from the NUID</p>
</dd>
<dt><a href="#getAllSocketsConnectedToVC">getAllSocketsConnectedToVC</a><code>Array</code></dt>
<dd><p>Get all nodes that are connected to a voice channel</p>
</dd>
<dt><a href="#checkIfNodeHasOpenDiscordClient">checkIfNodeHasOpenDiscordClient</a><code>boolean</code></dt>
<dd><p>Check if the given node has an open discord client</p>
</dd>
<dt><a href="#checkIfNodeIsConnectedToVC">checkIfNodeIsConnectedToVC</a><code>boolean</code></dt>
<dd><p>Wrapper to check if the given NUID is connected to a VC</p>
</dd>
<dt><a href="#getNodeDiscordUsername">getNodeDiscordUsername</a><code>string</code></dt>
<dd><p>Get the discord username from a given socket</p>
</dd>
<dt><a href="#getNodeDiscordID">getNodeDiscordID</a><code>string</code></dt>
<dd><p>Get the discord ID from a given socket</p>
</dd>
<dt><a href="#requestNodeJoinSystem">requestNodeJoinSystem</a></dt>
<dd><p>Request a given socket node to join a given voice channel</p>
</dd>
<dt><a href="#requestBotLeaveServer">requestBotLeaveServer</a></dt>
<dd><p>Request a given socket node to leave VC in a given server</p>
</dd>
<dt><a href="#requestNodeUpdate">requestNodeUpdate</a></dt>
<dd><p>Requset a given socket node to update themselves</p>
</dd>
<dt><a href="#updateFeeds">updateFeeds</a><code>any</code></dt>
<dd><p>Update the active RSS feeds and send any new posts to their discord channels</p>
</dd>
</dl>
## Functions
<dl>
<dt><a href="#autocomplete">autocomplete(nodeIo, interaction)</a></dt>
<dd><p>Function to give the user auto-reply suggestions</p>
</dd>
<dt><a href="#execute">execute(nodeIo, interaction)</a></dt>
<dd><p>Handle join command execution</p>
</dd>
<dt><a href="#autocomplete">autocomplete(nodeIo, interaction)</a></dt>
<dd><p>Function to give the user auto-reply suggestions</p>
</dd>
<dt><a href="#execute">execute(nodeIo, interaction)</a></dt>
<dd><p>The function to run when the command is called by a discord user</p>
</dd>
<dt><a href="#autocomplete">autocomplete(nodeIo, interaction)</a></dt>
<dd><p>Function to give the user auto-reply suggestions</p>
</dd>
<dt><a href="#addEnabledEventListeners">addEnabledEventListeners(serverClient, _eventsPath)</a><code>any</code></dt>
<dd><p>Add the enabled event listeners to the bot
(events that end in &#39;.mjs&#39; will be enabled, to disable just remove the extension or replace with &#39;.mjs.disabled&#39;)</p>
</dd>
<dt><a href="#writeToLog">writeToLog(logMessage, appName)</a></dt>
<dd><p>Write a given message to the log file</p>
</dd>
<dt><a href="#sendNodeCommand">sendNodeCommand(socket, command, data)</a><code>any</code></dt>
<dd><p>Description</p>
</dd>
</dl>
<a name="PresenceManager"></a>
## PresenceManager
Control the presence or activity of the discord bot.
**Kind**: global class
* [PresenceManager](#PresenceManager)
* [new PresenceManager(client)](#new_PresenceManager_new)
* [.setPresence(status, activityType, activityName, [url])](#PresenceManager+setPresence)
* [.resetToDefault()](#PresenceManager+resetToDefault)
* [.convertActivityType(activityType)](#PresenceManager+convertActivityType) ⇒ <code>ActivityType</code>
* [.convertStatus(status)](#PresenceManager+convertStatus) ⇒ <code>PresenceUpdateStatus</code>
<a name="new_PresenceManager_new"></a>
### new PresenceManager(client)
Creates an instance of PresenceManager.
| Param | Type | Description |
| --- | --- | --- |
| client | <code>Client</code> | The Discord client instance. |
<a name="PresenceManager+setPresence"></a>
### presenceManager.setPresence(status, activityType, activityName, [url])
Set the bot's presence.
**Kind**: instance method of [<code>PresenceManager</code>](#PresenceManager)
| Param | Type | Default | Description |
| --- | --- | --- | --- |
| status | <code>&quot;online&quot;</code> \| <code>&quot;idle&quot;</code> \| <code>&quot;dnd&quot;</code> | | The status of the bot (online, idle, dnd). |
| activityType | <code>&quot;PLAYING&quot;</code> \| <code>&quot;STREAMING&quot;</code> \| <code>&quot;LISTENING&quot;</code> \| <code>&quot;WATCHING&quot;</code> \| <code>&quot;COMPETING&quot;</code> | | The type of activity. |
| activityName | <code>string</code> | | The name of the activity. |
| [url] | <code>string</code> | <code>null</code> | The URL for STREAMING activity type (optional). |
<a name="PresenceManager+resetToDefault"></a>
### presenceManager.resetToDefault()
Reset the bot's presence to the default state.
**Kind**: instance method of [<code>PresenceManager</code>](#PresenceManager)
<a name="PresenceManager+convertActivityType"></a>
### presenceManager.convertActivityType(activityType) ⇒ <code>ActivityType</code>
Convert a string activity type to the corresponding ActivityType enum.
**Kind**: instance method of [<code>PresenceManager</code>](#PresenceManager)
**Returns**: <code>ActivityType</code> - - The corresponding ActivityType enum.
| Param | Type | Description |
| --- | --- | --- |
| activityType | <code>string</code> | The activity type string. |
<a name="PresenceManager+convertStatus"></a>
### presenceManager.convertStatus(status) ⇒ <code>PresenceUpdateStatus</code>
Convert a string status to the corresponding PresenceUpdateStatus enum.
**Kind**: instance method of [<code>PresenceManager</code>](#PresenceManager)
**Returns**: <code>PresenceUpdateStatus</code> - - The corresponding PresenceUpdateStatus enum.
| Param | Type | Description |
| --- | --- | --- |
| status | <code>string</code> | The status string. |
<a name="execute"></a>
## execute
The function to run when the command is called by a discord user
**Kind**: global constant
| Param | Type | Description |
| --- | --- | --- |
| nodeIo | <code>any</code> | The nodeIO server for manipulation of sockets |
| interaction | <code>any</code> | The interaction object |
<a name="execute"></a>
## execute
The function to run when the command is called by a discord user
**Kind**: global constant
| Param | Type | Description |
| --- | --- | --- |
| nodeIo | <code>any</code> | The nodeIO server for manipulation of sockets |
| interaction | <code>any</code> | The interaction object |
<a name="execute"></a>
## execute
The function to run when the command is called by a discord user
**Kind**: global constant
| Param | Type | Description |
| --- | --- | --- |
| nodeIo | <code>any</code> | The nodeIO server for manipulation of sockets |
| interaction | <code>any</code> | The interaction object |
<a name="execute"></a>
## execute
The function to run when the command is called by a discord user
**Kind**: global constant
| Param | Type | Description |
| --- | --- | --- |
| nodeIo | <code>any</code> | The nodeIO server for manipulation of sockets |
| interaction | <code>any</code> | The interaction object |
<a name="execute"></a>
## execute
The function to run when the command is called by a discord user
**Kind**: global constant
| Param | Type | Description |
| --- | --- | --- |
| nodeIo | <code>any</code> | The nodeIO server for manipulation of sockets |
| interaction | <code>any</code> | The interaction object |
<a name="execute"></a>
## execute
The function to run when the command is called by a discord user
**Kind**: global constant
| Param | Type | Description |
| --- | --- | --- |
| nodeIo | <code>any</code> | The nodeIO server for manipulation of sockets |
| interaction | <code>any</code> | The interaction object |
<a name="addEnabledCommands"></a>
## addEnabledCommands ⇒ <code>any</code>
Add the enabled commands to the bot to be used by users in discord
(commands that end in '.mjs' will be enabled, to disable just remove the extension or replace with '.mjs.disabled')
**Kind**: global constant
| Param | Type | Default |
| --- | --- | --- |
| serverClient | <code>any</code> | |
| _commandsPath | <code>any</code> | <code>&quot;./commands&quot;</code> |
<a name="unregisterAllCommands"></a>
## unregisterAllCommands
Remove all commands for a given bot in a given guild
**Kind**: global constant
| Param | Type | Description |
| --- | --- | --- |
| serverClient | <code>any</code> | The discord bot client |
<a name="refreshActiveCommandsWrapper"></a>
## refreshActiveCommandsWrapper ⇒ <code>any</code>
This named wrapper will remove all commands and then re-add the commands back, effectively refreshing them
**Kind**: global constant
| Param | Type | Description |
| --- | --- | --- |
| serverClient | <code>any</code> | The discord bot client object |
<a name="getAvailableNodes"></a>
## getAvailableNodes ⇒ <code>any</code>
Get the nodes with given system that are available to be used within a given server
**Kind**: global constant
| Param | Type | Description |
| --- | --- | --- |
| nodeIo | <code>any</code> | The nodeIO object contained in the discord server object |
| guildId | <code>any</code> | The guild ID to search in |
| system | <code>any</code> | The system to filter the nodes by |
<a name="getUserVoiceChannel"></a>
## getUserVoiceChannel ⇒ <code>any</code>
Gets the voice channel the user is currently in.
**Kind**: global constant
**Returns**: <code>any</code> - - The voice channel object, or null if the user is not in a voice channel.
| Param | Type | Description |
| --- | --- | --- |
| interaction | <code>any</code> | The interaction object. |
<a name="joinNode"></a>
## joinNode
Joins a node to a specified system and voice channel.
**Kind**: global constant
| Param | Type | Description |
| --- | --- | --- |
| nodeIo | <code>any</code> | The nodeIO server for manipulation of sockets. |
| interaction | <code>any</code> | The interaction object. |
| nodeId | <code>string</code> | The ID of the node to join. |
| system | <code>any</code> | The system object to join. |
| channel | <code>any</code> | The voice channel to join. |
<a name="promptNodeSelection"></a>
## promptNodeSelection
Prompts the user to select a node from available nodes.
**Kind**: global constant
| Param | Type | Description |
| --- | --- | --- |
| interaction | <code>any</code> | The interaction object. |
| availableNodes | <code>Array</code> | The list of available nodes. |
| onNodeSelected | <code>function</code> | Callback function to handle the selected node. |
<a name="nodeLoginWrapper"></a>
## nodeLoginWrapper ⇒ <code>any</code>
Log the node into the network
**Kind**: global constant
| Param | Type | Description |
| --- | --- | --- |
| data | <code>object</code> | The data sent from the node |
| socket | <code>any</code> | The socket the node is connected from |
<a name="nodeDisconnectWrapper"></a>
## nodeDisconnectWrapper ⇒ <code>any</code>
Disconnect the client from the server
**Kind**: global constant
| Param | Type | Description |
| --- | --- | --- |
| socketId | <code>string</code> | The socket ID that was disconnected |
<a name="nodeUpdateWrapper"></a>
## nodeUpdateWrapper ⇒ <code>any</code>
Update node data in the database
**Kind**: global constant
| Param | Type | Description |
| --- | --- | --- |
| nodeData | <code>object</code> | The data object sent from the node |
<a name="nearbySystemsUpdateWraper"></a>
## nearbySystemsUpdateWraper
Wrapper to update the systems from the nearbySystems object passed from clients
**Kind**: global constant
| Param | Type | Description |
| --- | --- | --- |
| nuid | <code>string</code> | The NUID of the node that sent the update |
| nearbySystems | <code>object</code> | The nearby systems object passed from the node to be updated |
<a name="getSocketIdByNuid"></a>
## getSocketIdByNuid ⇒ <code>string</code> \| <code>null</code>
Get the open socket connection ID for a node from the NUID
**Kind**: global constant
**Returns**: <code>string</code> \| <code>null</code> - Will return the open socket ID or NULL
| Param | Type | Description |
| --- | --- | --- |
| nuid | <code>string</code> | The NUID to find within the open sockets |
<a name="getAllSocketsConnectedToVC"></a>
## getAllSocketsConnectedToVC ⇒ <code>Array</code>
Get all nodes that are connected to a voice channel
**Kind**: global constant
**Returns**: <code>Array</code> - The sockets connected to VC in a given server
| Param | Type | Description |
| --- | --- | --- |
| nodeIo | <code>any</code> | The nodeIo object that contains the IO server |
| guildId | <code>string</code> | The guild ID string for the guild we are looking in |
<a name="checkIfNodeHasOpenDiscordClient"></a>
## checkIfNodeHasOpenDiscordClient ⇒ <code>boolean</code>
Check if the given node has an open discord client
**Kind**: global constant
**Returns**: <code>boolean</code> - If the given node has an open discord client or not
| Param | Type | Description |
| --- | --- | --- |
| openSocket | <code>any</code> | The open socket connection with the node to check |
<a name="checkIfNodeIsConnectedToVC"></a>
## checkIfNodeIsConnectedToVC ⇒ <code>boolean</code>
Wrapper to check if the given NUID is connected to a VC
**Kind**: global constant
**Returns**: <code>boolean</code> - If the node is connected to VC in the given server
| Param | Type | Description |
| --- | --- | --- |
| nodeIo | <code>any</code> | The nodeIo object that contains the IO server |
| nuid | <code>string</code> | The NUID string that we would like to find in the open socket connections |
<a name="getNodeDiscordUsername"></a>
## getNodeDiscordUsername ⇒ <code>string</code>
Get the discord username from a given socket
**Kind**: global constant
**Returns**: <code>string</code> - The username of the bot in the requested server
| Param | Type | Description |
| --- | --- | --- |
| socket | <code>any</code> | The socket object of the node to check the username of * @param {string} guildId The guild ID to check the username in |
<a name="getNodeDiscordID"></a>
## getNodeDiscordID ⇒ <code>string</code>
Get the discord ID from a given socket
**Kind**: global constant
**Returns**: <code>string</code> - The ID of the bot
| Param | Type | Description |
| --- | --- | --- |
| socket | <code>any</code> | The socket object of the node to check the ID of |
<a name="requestNodeJoinSystem"></a>
## requestNodeJoinSystem
Request a given socket node to join a given voice channel
**Kind**: global constant
| Param | Type | Description |
| --- | --- | --- |
| socket | <code>any</code> | The socket object of the node the request should be sent to |
| systemName | <code>any</code> | The system preset name that we would like to listen to |
| discordChanelId | <code>string</code> | The Discord channel ID to join the listening bot to |
<a name="requestBotLeaveServer"></a>
## requestBotLeaveServer
Request a given socket node to leave VC in a given server
**Kind**: global constant
| Param | Type | Description |
| --- | --- | --- |
| socket | <code>any</code> | The socket object of the node the request should be sent to |
| guildId | <code>string</code> | The guild ID to disconnect the socket node from |
<a name="requestNodeUpdate"></a>
## requestNodeUpdate
Requset a given socket node to update themselves
**Kind**: global constant
| Param | Type | Description |
| --- | --- | --- |
| socket | <code>any</code> | The socket object of the node to request to update |
<a name="updateFeeds"></a>
## updateFeeds ⇒ <code>any</code>
Update the active RSS feeds and send any new posts to their discord channels
**Kind**: global constant
| Param | Type | Description |
| --- | --- | --- |
| client | <code>any</code> | The discord client to send posts with |
<a name="autocomplete"></a>
## autocomplete(nodeIo, interaction)
Function to give the user auto-reply suggestions
**Kind**: global function
| Param | Type | Description |
| --- | --- | --- |
| nodeIo | <code>any</code> | The nodeIO server for manipulation of sockets |
| interaction | <code>any</code> | The interaction object |
<a name="execute"></a>
## execute(nodeIo, interaction)
Handle join command execution
**Kind**: global function
| Param | Type | Description |
| --- | --- | --- |
| nodeIo | <code>any</code> | The nodeIO server for manipulation of sockets |
| interaction | <code>any</code> | The interaction object |
<a name="autocomplete"></a>
## autocomplete(nodeIo, interaction)
Function to give the user auto-reply suggestions
**Kind**: global function
| Param | Type | Description |
| --- | --- | --- |
| nodeIo | <code>any</code> | The nodeIO server for manipulation of sockets |
| interaction | <code>any</code> | The interaction object |
<a name="execute"></a>
## execute(nodeIo, interaction)
The function to run when the command is called by a discord user
**Kind**: global function
| Param | Type | Description |
| --- | --- | --- |
| nodeIo | <code>any</code> | The nodeIO server for manipulation of sockets |
| interaction | <code>any</code> | The interaction object |
<a name="autocomplete"></a>
## autocomplete(nodeIo, interaction)
Function to give the user auto-reply suggestions
**Kind**: global function
| Param | Type | Description |
| --- | --- | --- |
| nodeIo | <code>any</code> | The nodeIO server for manipulation of sockets |
| interaction | <code>any</code> | The interaction object |
<a name="addEnabledEventListeners"></a>
## addEnabledEventListeners(serverClient, _eventsPath) ⇒ <code>any</code>