WORK IN PROGRESS
This is Discord message system support for reference implementation of FTN22.
Author: Andrey Galkin
Command line:
$ npm install @futoin/msgbot-discord --save
- DiscordFace
Discord FTN22 Server Face implementation
- DiscordHelpers
Discord Server-specific helpers
- DiscordService
Discord Server Service
Add Discord system to FutoIn Message Bot
Kind: Exported member
Param | Type | Description |
---|---|---|
asi | AsyncSteps |
async steps interface |
app | ServiceApp |
message bot |
options | object |
additional parameters |
options.discord | object |
parameters to be passed to Discord.js |
options.discordToken | string |
bot token |
Discord FTN22 Server Face implementation
Kind: global class
C-tor
Param | Type | Description |
---|---|---|
options | object |
common options |
options.discordClient | object |
Discord client instance |
Get native message system interface implementation
Kind: instance method of DiscordFace
Returns: object
- native implementation
Discord Server-specific helpers
Kind: global class
- DiscordHelpers
- .bold(str) ⇒
string
- .italic(str) ⇒
string
- .color(str, hexcolor) ⇒
string
- .imgUrl(url) ⇒
string
- .emoji(name) ⇒
string
- .line() ⇒
string
- .menion(ext_id) ⇒
string
- .bold(str) ⇒
Get bold text
Kind: instance method of DiscordHelpers
Returns: string
- bold output
Param | Type | Description |
---|---|---|
str | string |
input |
Get italic text
Kind: instance method of DiscordHelpers
Returns: string
- italic output
Param | Type | Description |
---|---|---|
str | string |
input |
Get colored text
Kind: instance method of DiscordHelpers
Returns: string
- colored output
Param | Type | Description |
---|---|---|
str | string |
input |
hexcolor | string |
color code |
Get image URL embedded into text
Kind: instance method of DiscordHelpers
Returns: string
- URL output
Param | Type | Description |
---|---|---|
url | string |
input |
Get emoji embedded into text
Kind: instance method of DiscordHelpers
Returns: string
- emoji output
Param | Type | Description |
---|---|---|
name | string |
input |
Get new line
Kind: instance method of DiscordHelpers
Returns: string
- new line
Get actor mention into text
Kind: instance method of DiscordHelpers
Returns: string
- mention output
Param | Type | Description |
---|---|---|
ext_id | string |
input actor ID |
Discord Server Service
C-tor
Param | Type | Description |
---|---|---|
options | object |
common options |
options.discordClient | object |
Discord client instance |
options.asModel | AsyncSteps |
AsyncSteps model to create threads |
options.ccm | AdvancedCCM |
CCM |
documented by jsdoc-to-markdown.