forked from DistroByte/AwF-Bot
-
Notifications
You must be signed in to change notification settings - Fork 0
functions
oof2win2 edited this page Jun 19, 2021
·
4 revisions
-
bubbleSort(arr) ⇒
Array
-
Sorts an array with BubbleSort. Tested with strings and numbers.
-
getServerFromChannelInput(channelID) ⇒
object
|null
-
runShellCommand(cmd) ⇒
childprocess.stdout
|childprocess.stderr
-
Run a shell command. Returns only after the command is finished. DOesn't allow for extra specifications
-
sortModifiedDate(pathArr) ⇒
Array.<Object>
-
Sort a directory's contents by date modified
- createPagedEmbed(fields, embedMsgOptions, options, maxPageCount)
Sorts an array with BubbleSort. Tested with strings and numbers.
Kind: global function
Returns: Array
- Sorted array
Param | Type | Description |
---|---|---|
arr | Array |
Unsorted array |
Kind: global function
Returns: object
| null
- A server object from the servers.js file
Param | Type | Description |
---|---|---|
channelID | discord.Snowflake |
ID of the Discord channel that you are trying to get |
Run a shell command. Returns only after the command is finished. DOesn't allow for extra specifications
Kind: global function
Param | Type | Description |
---|---|---|
cmd | string |
Shell command to run |
Sort a directory's contents by date modified
Kind: global function
Returns: Array.<Object>
- Array of path objects, sorted by last modified. has path and mtime (modified time)
Param | Type | Description |
---|---|---|
pathArr | Array.<string> |
Path to the directory you want to get files from and sort by modified date |
Kind: global function
Param | Type | Description |
---|---|---|
fields | Array |
|
embedMsgOptions | object |
Standard |
options | object |
|
maxPageCount | options.maxPageCount |
maximum number of things on the page |