0.2.0 • Published 4 years ago

@futoin/msgbot-discord v0.2.0

Weekly downloads
6
License
Apache-2.0
Repository
github
Last release
4 years ago

About

WORK IN PROGRESS

This is Discord message system support for reference implementation of FTN22.

Author: Andrey Galkin

Installation for Node.js

Command line:

$ npm install @futoin/msgbot-discord --save

API documentation

Modules

Classes

@futoin/ext-js-msgbot-discord

exports ⏏

Add Discord system to FutoIn Message Bot

Kind: Exported member

ParamTypeDescription
asiAsyncStepsasync steps interface
appServiceAppmessage bot
optionsobjectadditional parameters
options.discordobjectparameters to be passed to Discord.js
options.discordTokenstringbot token

DiscordFace

Discord FTN22 Server Face implementation

Kind: global class

new DiscordFace(options)

C-tor

ParamTypeDescription
optionsobjectcommon options
options.discordClientobjectDiscord client instance

discordFace.systemIface() ⇒ object

Get native message system interface implementation

Kind: instance method of DiscordFace
Returns: object - native implementation

DiscordHelpers

Discord Server-specific helpers

Kind: global class

discordHelpers.bold(str) ⇒ string

Get bold text

Kind: instance method of DiscordHelpers
Returns: string - bold output

ParamTypeDescription
strstringinput

discordHelpers.italic(str) ⇒ string

Get italic text

Kind: instance method of DiscordHelpers
Returns: string - italic output

ParamTypeDescription
strstringinput

discordHelpers.color(str, hexcolor) ⇒ string

Get colored text

Kind: instance method of DiscordHelpers
Returns: string - colored output

ParamTypeDescription
strstringinput
hexcolorstringcolor code

discordHelpers.imgUrl(url) ⇒ string

Get image URL embedded into text

Kind: instance method of DiscordHelpers
Returns: string - URL output

ParamTypeDescription
urlstringinput

discordHelpers.emoji(name) ⇒ string

Get emoji embedded into text

Kind: instance method of DiscordHelpers
Returns: string - emoji output

ParamTypeDescription
namestringinput

discordHelpers.line() ⇒ string

Get new line

Kind: instance method of DiscordHelpers
Returns: string - new line

discordHelpers.menion(ext_id) ⇒ string

Get actor mention into text

Kind: instance method of DiscordHelpers
Returns: string - mention output

ParamTypeDescription
ext_idstringinput actor ID

DiscordService

Discord Server Service

Kind: global class

new DiscordService(options)

C-tor

ParamTypeDescription
optionsobjectcommon options
options.discordClientobjectDiscord client instance
options.asModelAsyncStepsAsyncSteps model to create threads
options.ccmAdvancedCCMCCM

documented by jsdoc-to-markdown.

0.2.0

4 years ago

0.1.1

4 years ago

0.1.0

4 years ago