Update wiki from JSDoc
294
Home.md
294
Home.md
@@ -1 +1,293 @@
|
||||
Welcome to the Wiki.
|
||||
## Classes
|
||||
|
||||
<dl>
|
||||
<dt><a href="#DebugBuilder">DebugBuilder</a></dt>
|
||||
<dd><p>Create the different logging methods for a function
|
||||
Namespace template = ("[app]:[fileName]:['INFO', 'WARNING', 'DEBUG', 'ERROR']")</p>
|
||||
</dd>
|
||||
</dl>
|
||||
|
||||
## Constants
|
||||
|
||||
<dl>
|
||||
<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 '.mjs' will be enabled, to disable just remove the extension or replace with '.mjs.disabled')</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="#addEnabledEventListeners">addEnabledEventListeners(serverClient, _eventsPath)</a> ⇒ <code>any</code></dt>
|
||||
<dd><p>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')</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="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>"./commands"</code> |
|
||||
|
||||
<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="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>"./events"</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> |
|
||||
|
||||
|
||||
Reference in New Issue
Block a user